using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_TowerDefense { public partial class ReqCreateTDBuild : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 165201; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,buildNo); ProtoBufUtils.WriteInt32(2,modelId); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { buildNo = 0; modelId = 0; } public int buildNo; public int modelId; } public partial class ResCreateTDBuild : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResCreateTDBuild(this); } public const uint MsgID = 165101; 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: buildNo = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: success = ProtoBufUtils.ReadBoolean(ref readPos); break; default: break; } } } } public void Clear() { buildNo = 0; success = false; } public int buildNo; public bool success; } public partial class ReqUpdateTDBuild : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 165202; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,buildNo); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { buildNo = 0; } public int buildNo; } public partial class ResUpdateTDBuild : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResUpdateTDBuild(this); } public const uint MsgID = 165102; 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: buildNo = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: success = ProtoBufUtils.ReadBoolean(ref readPos); break; default: break; } } } } public void Clear() { buildNo = 0; success = false; } public int buildNo; public bool success; } public partial class ReqDeleteTDBuild : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 165203; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,buildNo); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { buildNo = 0; } public int buildNo; } public partial class ResDeleteTDBuild : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResDeleteTDBuild(this); } public const uint MsgID = 165103; 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: buildNo = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: success = ProtoBufUtils.ReadBoolean(ref readPos); break; default: break; } } } } public void Clear() { buildNo = 0; success = false; } public int buildNo; public bool success; } public partial class ReqBirthBossInTDWar : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 165204; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteBoolean(1,autoGet); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { autoGet = false; } public bool autoGet; } public partial class ResBirthBossInTDWar : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResBirthBossInTDWar(this); } public const uint MsgID = 165104; 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 ReqBeginBirthMonster : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 165205; 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 ResBeginBirthMonster : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResBeginBirthMonster(this); } public const uint MsgID = 165105; 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 ResPeopleSoulHuntingCarInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResPeopleSoulHuntingCarInfo(this); } public const uint MsgID = 165106; 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: curLayer = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: maxLayer = ProtoBufUtils.ReadInt32(ref readPos); break; case 3: soulScore = ProtoBufUtils.ReadInt64(ref readPos); break; case 4: paoNum = ProtoBufUtils.ReadInt32(ref readPos); break; case 5: expValue = ProtoBufUtils.ReadInt64(ref readPos); break; case 6: autoZhaoBoss = ProtoBufUtils.ReadBoolean(ref readPos); break; case 7: bossModelId = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { curLayer = 0; maxLayer = 0; soulScore = 0; paoNum = 0; expValue = 0; autoZhaoBoss = false; bossModelId = 0; } public int curLayer; public int maxLayer; public long soulScore; public int paoNum; public long expValue; public bool autoZhaoBoss; public int bossModelId; } public partial class buildInfo : 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 : buildNo = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : buildType = ProtoBufUtils.ReadInt32(ref readPos); break; case 3 : uplevel = ProtoBufUtils.ReadInt32(ref readPos); break; case 4 : monsterInstanceId = ProtoBufUtils.ReadInt64(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,buildNo); ProtoBufUtils.WriteInt32(2,buildType); ProtoBufUtils.WriteInt32(3,uplevel); ProtoBufUtils.WriteInt64(4,monsterInstanceId); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { buildNo = 0; buildType = 0; uplevel = 0; monsterInstanceId = 0; } public int buildNo; public int buildType; public int uplevel; public long monsterInstanceId; } public partial class ResMapBuildInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResMapBuildInfo(this); } public const uint MsgID = 165107; 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(buildList == null) { buildList = new List(); } buildList.Add(new buildInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); buildList[buildList.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(buildList != null) { buildList.Clear(); } } public List buildList = new List(); } }