using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_Wonder { public partial class ReqOpenWonderPanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 160201; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,wonderType); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { wonderType = 0; } public int wonderType; } public partial class ResOpenWonderPanel : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResOpenWonderPanel(this); } public const uint MsgID = 160101; 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: wonderType = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: if(wonderInfo == null) { wonderInfo = new wonderInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); wonderInfo.ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { wonderType = 0; if(wonderInfo != null) { wonderInfo.Clear(); } } public int wonderType; public wonderInfo wonderInfo; } public partial class wonderInfo : 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 : curLevel = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : curExp = ProtoBufUtils.ReadInt32(ref readPos); break; case 3 : if(haveActiveSkill == null) { haveActiveSkill = new List(); } haveActiveSkill.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; case 4 : if(fruitInfo == null) { fruitInfo = new List(); } fruitInfo.Add(new attrFruitInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); fruitInfo[fruitInfo.Count - 1].ReadMessage(ref readPos, totalCount); 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,curLevel); ProtoBufUtils.WriteInt32(2,curExp); for (int i = 0; i < haveActiveSkill.Count; i++) { ProtoBufUtils.WriteInt32(3,haveActiveSkill[i]); } for (int i = 0; i < fruitInfo.Count; i++) { if(fruitInfo != null) { fruitInfo[i].WriteMessage(4); } } ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { curLevel = 0; curExp = 0; if(haveActiveSkill != null) { haveActiveSkill.Clear(); } if(fruitInfo != null) { fruitInfo.Clear(); } } public int curLevel; public int curExp; public List haveActiveSkill = new List(); public List fruitInfo = new List(); } public partial class ReqUseItem : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 160202; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,wonderType); for (int i = 0; i < itemOnlyInfo.Count; i++) { if(itemOnlyInfo != null) { itemOnlyInfo[i].WriteMessage(2); } } for (int i = 0; i < itemModelInfo.Count; i++) { if(itemModelInfo != null) { itemModelInfo[i].WriteMessage(3); } } bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { wonderType = 0; if(itemOnlyInfo != null) { itemOnlyInfo.Clear(); } if(itemModelInfo != null) { itemModelInfo.Clear(); } } public int wonderType; public List itemOnlyInfo = new List(); public List itemModelInfo = new List(); } public partial class itemOnlyInfo : 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 : itemOnlyId = ProtoBufUtils.ReadInt64(ref readPos); break; case 2 : num = 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.WriteInt64(1,itemOnlyId); ProtoBufUtils.WriteInt32(2,num); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { itemOnlyId = 0; num = 0; } public long itemOnlyId; public int num; } public partial class itemModelInfo : 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 : itemModelId = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : num = 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,itemModelId); ProtoBufUtils.WriteInt32(2,num); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { itemModelId = 0; num = 0; } public int itemModelId; public int num; } public partial class ResUseItemResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResUseItemResult(this); } public const uint MsgID = 160102; 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: wonderType = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: stateCode = ProtoBufUtils.ReadInt32(ref readPos); break; case 3: if(wonderInfo == null) { wonderInfo = new wonderInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); wonderInfo.ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { wonderType = 0; stateCode = 0; if(wonderInfo != null) { wonderInfo.Clear(); } } public int wonderType; public int stateCode; public wonderInfo wonderInfo; } public partial class ReqActiveWonderModel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 160203; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,wonderType); ProtoBufUtils.WriteInt32(2,modelId); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { wonderType = 0; modelId = 0; } public int wonderType; public int modelId; } public partial class ResWingInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResWingInfo(this); } public const uint MsgID = 160103; 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(wonderInfo == null) { wonderInfo = new wonderInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); wonderInfo.ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(wonderInfo != null) { wonderInfo.Clear(); } } public wonderInfo wonderInfo; } public partial class attrFruitInfo : 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 : fruitId = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : num = 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,fruitId); ProtoBufUtils.WriteInt32(2,num); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { fruitId = 0; num = 0; } public int fruitId; public int num; } public partial class ResUseAttrFruitResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResUseAttrFruitResult(this); } public const uint MsgID = 160104; 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: wonderType = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: if(fruitInfo == null) { fruitInfo = new attrFruitInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); fruitInfo.ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { wonderType = 0; if(fruitInfo != null) { fruitInfo.Clear(); } } public int wonderType; public attrFruitInfo fruitInfo; } public partial class ResEquipSealChangeSync : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResEquipSealChangeSync(this); } public const uint MsgID = 160105; 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: playerId = ProtoBufUtils.ReadInt64(ref readPos); break; case 2: equipSealLevel = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { playerId = 0; equipSealLevel = 0; } public long playerId; public int equipSealLevel; } public partial class ResActiveModelResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResActiveModelResult(this); } public const uint MsgID = 160106; 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: wonderType = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: stateCode = ProtoBufUtils.ReadInt32(ref readPos); break; case 3: if(wonderInfo == null) { wonderInfo = new wonderInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); wonderInfo.ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { wonderType = 0; stateCode = 0; if(wonderInfo != null) { wonderInfo.Clear(); } } public int wonderType; public int stateCode; public wonderInfo wonderInfo; } }