using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_Hook { public partial class hookExpAddRateInfo : 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 : rate = 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,rate); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { type = 0; rate = 0; } public int type; public int rate; } public partial class ReqHookSetInfo : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 174201; 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 ResHookSetInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResHookSetInfo(this); } public const uint MsgID = 174101; 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: hookRemainTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: hookExpAddRate = ProtoBufUtils.ReadInt64(ref readPos); break; case 3: fightExpAddRate = ProtoBufUtils.ReadInt32(ref readPos); break; case 4: if(expAddRateList == null) { expAddRateList = new List(); } expAddRateList.Add(new hookExpAddRateInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); expAddRateList[expAddRateList.Count - 1].ReadMessage(ref readPos, totalCount); break; case 5: worldlevel = ProtoBufUtils.ReadInt32(ref readPos); break; case 6: curExpItemRamineTime = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { hookRemainTime = 0; hookExpAddRate = 0; fightExpAddRate = 0; if(expAddRateList != null) { expAddRateList.Clear(); } worldlevel = 0; curExpItemRamineTime = 0; } public int hookRemainTime; public long hookExpAddRate; public int fightExpAddRate; public List expAddRateList = new List(); public int worldlevel; public int curExpItemRamineTime; } public partial class ResOfflineHookResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResOfflineHookResult(this); } public const uint MsgID = 174102; 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: offlineTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: hookRemainTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 3: oldLevel = ProtoBufUtils.ReadInt32(ref readPos); break; case 4: newLevel = ProtoBufUtils.ReadInt32(ref readPos); break; case 5: addedExp = ProtoBufUtils.ReadInt64(ref readPos); break; case 6: if(itemInfoList == null) { itemInfoList = new List(); } itemInfoList.Add(new MSG_backpack.ItemInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); itemInfoList[itemInfoList.Count - 1].ReadMessage(ref readPos, totalCount); break; case 7: if(useNumList == null) { useNumList = new List(); } useNumList.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; default: break; } } } } public void Clear() { offlineTime = 0; hookRemainTime = 0; oldLevel = 0; newLevel = 0; addedExp = 0; if(itemInfoList != null) { itemInfoList.Clear(); } if(useNumList != null) { useNumList.Clear(); } } public int offlineTime; public int hookRemainTime; public int oldLevel; public int newLevel; public long addedExp; public List itemInfoList = new List(); public List useNumList = new List(); } public partial class ResOfflineHookFindTime : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResOfflineHookFindTime(this); } public const uint MsgID = 174108; 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: offlineTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: exp = ProtoBufUtils.ReadInt64(ref readPos); break; default: break; } } } } public void Clear() { offlineTime = 0; exp = 0; } public int offlineTime; public long exp; } public partial class ReqOfflineHookFindTime : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 174205; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteBoolean(1,isfind); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { isfind = false; } public bool isfind; } public partial class ReqStartSitDown : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 174202; 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 ResStartSitDown : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResStartSitDown(this); } public const uint MsgID = 174103; 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: roleId = ProtoBufUtils.ReadInt64(ref readPos); break; case 2: canSitDown = ProtoBufUtils.ReadBoolean(ref readPos); break; default: break; } } } } public void Clear() { roleId = 0; canSitDown = false; } public long roleId; public bool canSitDown; } public partial class ResSyncExpAdd : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResSyncExpAdd(this); } public const uint MsgID = 174104; 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: addExp = ProtoBufUtils.ReadInt64(ref readPos); break; case 2: rate = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { addExp = 0; rate = 0; } public long addExp; public int rate; } public partial class ReqEndSitDown : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 174203; 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 ResEndSitDown : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResEndSitDown(this); } public const uint MsgID = 174105; 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: roleId = ProtoBufUtils.ReadInt64(ref readPos); break; case 2: success = ProtoBufUtils.ReadBoolean(ref readPos); break; default: break; } } } } public void Clear() { roleId = 0; success = false; } public long roleId; public bool success; } public partial class ResExpRateChange : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResExpRateChange(this); } public const uint MsgID = 174106; 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 hookExpAddRateInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); info.ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(info != null) { info.Clear(); } } public hookExpAddRateInfo info; } public partial class ReqLeaderSitDown : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 174204; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteBoolean(1,isTrue); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { isTrue = false; } public bool isTrue; } public partial class ResLeaderSitDown : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResLeaderSitDown(this); } public const uint MsgID = 174107; 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: roleId = ProtoBufUtils.ReadInt64(ref readPos); break; case 2: isTrue = ProtoBufUtils.ReadBoolean(ref readPos); break; default: break; } } } } public void Clear() { roleId = 0; isTrue = false; } public long roleId; public bool isTrue; } }