using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_KaoShangLing { public partial class ReqOpenKaoShangLingPanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 192201; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,type); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { type = 0; } public int type; } public partial class ReqKaoShangLingReward : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 192202; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,type); ProtoBufUtils.WriteInt32(2,isOneKey); ProtoBufUtils.WriteInt32(3,key); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { type = 0; isOneKey = 0; key = 0; } public int type; public int isOneKey; public int key; } public partial class ReqKaoShangLingRefreshRank : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 192203; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,type); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { type = 0; } public int type; } public partial class ReqBuySpecailKaoShangLing : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 192204; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,type); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { type = 0; } public int type; } public partial class KaoShangLingInfo : ProtoBuf.IMessageInfo, ProtoBuf.IExtensible { public void Send(){} public void Excute(){} public void ReadMessage(ref int readPos, int totalCount) { int endIndex = totalCount + readPos - 1; while (readPos <= endIndex) { int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos); switch (fieldNumber) { case 1 : type = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : rank = ProtoBufUtils.ReadInt32(ref readPos); break; case 3 : if(commonRewardList == null) { commonRewardList = new List<int>(); } commonRewardList.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; case 4 : if(specailRewardist == null) { specailRewardist = new List<int>(); } specailRewardist.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; case 5 : scoreTotal = ProtoBufUtils.ReadInt32(ref readPos); break; case 6 : scoreDay = ProtoBufUtils.ReadInt32(ref readPos); break; case 7 : isBuySpecail = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } public int WriteMessage(int fieldNumber) { ProtoBufUtils.WriteHeader(fieldNumber, ProtoBuf.WireType.String); int subItemInfoId = ProtoBufUtils.GetSubItemInfoId(); ProtoBufUtils.SetEmptyLength(subItemInfoId); ProtoBufUtils.SetVBeginIndex(subItemInfoId); ProtoBufUtils.WriteInt32(1,type); ProtoBufUtils.WriteInt32(2,rank); for (int i = 0; i < commonRewardList.Count; i++) { ProtoBufUtils.WriteInt32(3,commonRewardList[i]); } for (int i = 0; i < specailRewardist.Count; i++) { ProtoBufUtils.WriteInt32(4,specailRewardist[i]); } ProtoBufUtils.WriteInt32(5,scoreTotal); ProtoBufUtils.WriteInt32(6,scoreDay); ProtoBufUtils.WriteInt32(7,isBuySpecail); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { type = 0; rank = 0; if(commonRewardList != null) { commonRewardList.Clear(); } if(specailRewardist != null) { specailRewardist.Clear(); } scoreTotal = 0; scoreDay = 0; isBuySpecail = 0; } public int type; public int rank; public List<int> commonRewardList = new List<int>(); public List<int> specailRewardist = new List<int>(); public int scoreTotal; public int scoreDay; public int isBuySpecail; } public partial class ResOpenKaoShangLingPanel : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResOpenKaoShangLingPanel(this); } public const uint MsgID = 192101; public void Send(){} public void ReadMessage(byte[] bytes) { lock (ProtoBufUtils.ReadLocker) { Clear(); int endIndex = bytes.Length - 1; int readPos = 0; int totalCount = 0; ProtoBufUtils.InitReadData(bytes, ref readPos); while (readPos <= endIndex) { int curType = bytes[readPos] & 7; int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos); switch (fieldNumber) { case 1: if(kaoShangLingInfoList == null) { kaoShangLingInfoList = new List<KaoShangLingInfo>(); } kaoShangLingInfoList.Add(new KaoShangLingInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); kaoShangLingInfoList[kaoShangLingInfoList.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(kaoShangLingInfoList != null) { kaoShangLingInfoList.Clear(); } } public List<KaoShangLingInfo> kaoShangLingInfoList = new List<KaoShangLingInfo>(); } public partial class ResKaoShangLingReward : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResKaoShangLingReward(this); } public const uint MsgID = 192102; public void Send(){} public void ReadMessage(byte[] bytes) { lock (ProtoBufUtils.ReadLocker) { Clear(); int endIndex = bytes.Length - 1; int readPos = 0; int totalCount = 0; ProtoBufUtils.InitReadData(bytes, ref readPos); while (readPos <= endIndex) { int curType = bytes[readPos] & 7; int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos); switch (fieldNumber) { case 1: type = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: if(commonRewardList == null) { commonRewardList = new List<int>(); } commonRewardList.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; case 3: if(specailRewardist == null) { specailRewardist = new List<int>(); } specailRewardist.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; default: break; } } } } public void Clear() { type = 0; if(commonRewardList != null) { commonRewardList.Clear(); } if(specailRewardist != null) { specailRewardist.Clear(); } } public int type; public List<int> commonRewardList = new List<int>(); public List<int> specailRewardist = new List<int>(); } public partial class ResKaoShangLingRefreshRank : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResKaoShangLingRefreshRank(this); } public const uint MsgID = 192103; public void Send(){} public void ReadMessage(byte[] bytes) { lock (ProtoBufUtils.ReadLocker) { Clear(); int endIndex = bytes.Length - 1; int readPos = 0; int totalCount = 0; ProtoBufUtils.InitReadData(bytes, ref readPos); while (readPos <= endIndex) { int curType = bytes[readPos] & 7; int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos); switch (fieldNumber) { case 1: type = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { type = 0; } public int type; } public partial class ResBuySpecailKaoShangLing : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResBuySpecailKaoShangLing(this); } public const uint MsgID = 192104; public void Send(){} public void ReadMessage(byte[] bytes) { lock (ProtoBufUtils.ReadLocker) { Clear(); int endIndex = bytes.Length - 1; int readPos = 0; int totalCount = 0; ProtoBufUtils.InitReadData(bytes, ref readPos); while (readPos <= endIndex) { int curType = bytes[readPos] & 7; int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos); switch (fieldNumber) { case 1: type = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: isBuySpecail = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { type = 0; isBuySpecail = 0; } public int type; public int isBuySpecail; } }