using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_Treasure { public partial class ResTreasureUnlockInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResTreasureUnlockInfo(this); } public const uint MsgID = 505101; 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: progress = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: count = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { progress = 0; count = 0; } public int progress; public int count; } public partial class ReqAddUnlockProgress : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 505201; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,addProgress); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { addProgress = 0; } public int addProgress; } public partial class ReqUnlockTreasure : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 505202; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { } } public partial class ResUnlockTreasure : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResUnlockTreasure(this); } public const uint MsgID = 505105; 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: success = ProtoBufUtils.ReadBoolean(ref readPos); break; default: break; } } } } public void Clear() { success = false; } public bool success; } public partial class treasureInfo : 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 : id = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : stage = ProtoBufUtils.ReadInt32(ref readPos); break; case 3 : level = 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,id); ProtoBufUtils.WriteInt32(2,stage); ProtoBufUtils.WriteInt32(3,level); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { id = 0; stage = 0; level = 0; } public int id; public int stage; public int level; } public partial class ReqTreasureInfoList : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 505203; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { } } public partial class ResTreasureInfoList : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResTreasureInfoList(this); } public const uint MsgID = 505102; 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(infoList == null) { infoList = new List(); } infoList.Add(new treasureInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); infoList[infoList.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(infoList != null) { infoList.Clear(); } } public List infoList = new List(); } public partial class ReqTreasureUpgrade : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 505204; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,id); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { id = 0; } public int id; } public partial class ResTreasureInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResTreasureInfo(this); } public const uint MsgID = 505103; 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(info == null) { info = new treasureInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); info.ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(info != null) { info.Clear(); } } public treasureInfo info; } public partial class ReqTreasureActive : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 505205; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,id); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { id = 0; } public int id; } public partial class ReqWearTreasure : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 505206; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,id); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { id = 0; } public int id; } public partial class ResWearTreasure : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResWearTreasure(this); } public const uint MsgID = 505104; 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: id = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { id = 0; } public int id; } public partial class ReqUpTreasureSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 505207; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,id); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { id = 0; } public int id; } }