using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_Command { public partial class CommandInfo : 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 : roleId = ProtoBufUtils.ReadUint64(ref readPos); break; case 2 : targetId = ProtoBufUtils.ReadUint64(ref readPos); break; case 3 : num = ProtoBufUtils.ReadInt32(ref readPos); break; case 4 : roleName = ProtoBufUtils.ReadString(ref readPos); break; case 5 : roleCareer = ProtoBufUtils.ReadInt32(ref readPos); break; case 6 : fightPower = ProtoBufUtils.ReadUint64(ref readPos); break; case 7 : guildName = ProtoBufUtils.ReadString(ref readPos); break; case 8 : if(facade == null) { facade = new MSG_Common.FacadeAttribute(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); facade.ReadMessage(ref readPos, totalCount); break; case 9 : if(head == null) { head = new MSG_Common.HeadAttribute(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); head.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.WriteUint64(1,roleId); ProtoBufUtils.WriteUint64(2,targetId); ProtoBufUtils.WriteInt32(3,num); ProtoBufUtils.WriteString(4,roleName); ProtoBufUtils.WriteInt32(5,roleCareer); ProtoBufUtils.WriteUint64(6,fightPower); ProtoBufUtils.WriteString(7,guildName); if(facade != null) { facade.WriteMessage(8); } if(head != null) { head.WriteMessage(9); } ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { roleId = 0; targetId = 0; num = 0; roleName = null; roleCareer = 0; fightPower = 0; guildName = null; if(facade != null) { facade.Clear(); } if(head != null) { head.Clear(); } } public ulong roleId; public ulong targetId; public int num; public string roleName; public int roleCareer; public ulong fightPower; public string guildName; public MSG_Common.FacadeAttribute facade; public MSG_Common.HeadAttribute head; } public partial class GuildBattleInfo : 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 : rank = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : masterId = ProtoBufUtils.ReadUint64(ref readPos); break; case 3 : if(secMasterId == null) { secMasterId = new List(); } secMasterId.Add(ProtoBufUtils.ReadUint64(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,rank); ProtoBufUtils.WriteUint64(2,masterId); for (int i = 0; i < secMasterId.Count; i++) { ProtoBufUtils.WriteUint64(3,secMasterId[i]); } ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { rank = 0; masterId = 0; if(secMasterId != null) { secMasterId.Clear(); } } public int rank; public ulong masterId; public List secMasterId = new List(); } public partial class ReqJoinCommand : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 531201; 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 ReqExitCommand : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 531202; 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 ResCommandInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResCommandInfo(this); } public const uint MsgID = 531101; 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 CommandInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); info.ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(info != null) { info.Clear(); } } public CommandInfo info; } public partial class ReqFocusTarget : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 531203; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteUint64(1,targetId); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { targetId = 0; } public ulong targetId; } public partial class ReqTargetPos : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 531204; 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 ResTargetPos : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResTargetPos(this); } public const uint MsgID = 531102; 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: x = ProtoBufUtils.ReadFloat(ref readPos); break; case 2: Y = ProtoBufUtils.ReadFloat(ref readPos); break; default: break; } } } } public void Clear() { x = 0; Y = 0; } public float x; public float Y; } public partial class G2PSynGuildBattleInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_G2PSynGuildBattleInfo(this); } public const uint MsgID = 531301; 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(guildBattleInfos == null) { guildBattleInfos = new List(); } guildBattleInfos.Add(new GuildBattleInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); guildBattleInfos[guildBattleInfos.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(guildBattleInfos != null) { guildBattleInfos.Clear(); } } public List guildBattleInfos = new List(); } public partial class ReqCommandBulletScreen : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 531205; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteString(1,context); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { context = null; } public string context; } public partial class ResCommandBulletScreen : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResCommandBulletScreen(this); } public const uint MsgID = 531103; 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: context = ProtoBufUtils.ReadString(ref readPos); break; case 2: roleId = ProtoBufUtils.ReadInt64(ref readPos); break; case 3: roleName = ProtoBufUtils.ReadString(ref readPos); break; case 4: roleCareer = ProtoBufUtils.ReadInt32(ref readPos); break; case 5: if(paramLists == null) { paramLists = new List(); } paramLists.Add(new MSG_Mail.paramStruct()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); paramLists[paramLists.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { context = null; roleId = 0; roleName = null; roleCareer = 0; if(paramLists != null) { paramLists.Clear(); } } public string context; public long roleId; public string roleName; public int roleCareer; public List paramLists = new List(); } }