using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_BossHome { public partial class ReqBossHomeInfo : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 158201; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,level); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { level = 0; } public int level; } public partial class ResBossHomeInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResBossHomeInfo(this); } public const uint MsgID = 158101; 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: level = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: if(bossInfo == null) { bossInfo = new List(); } bossInfo.Add(new bossHomeBossInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); bossInfo[bossInfo.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { level = 0; if(bossInfo != null) { bossInfo.Clear(); } } public int level; public List bossInfo = new List(); } public partial class bossHomeBossInfo : 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 : bossId = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : state = ProtoBufUtils.ReadInt32(ref readPos); break; case 3 : killer = ProtoBufUtils.ReadString(ref readPos); break; case 4 : haveUseCount = ProtoBufUtils.ReadInt32(ref readPos); break; case 5 : nextRefreshTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 6 : maxNum = 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,bossId); ProtoBufUtils.WriteInt32(2,state); ProtoBufUtils.WriteString(3,killer); ProtoBufUtils.WriteInt32(4,haveUseCount); ProtoBufUtils.WriteInt32(5,nextRefreshTime); ProtoBufUtils.WriteInt32(6,maxNum); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { bossId = 0; state = 0; killer = null; haveUseCount = 0; nextRefreshTime = 0; maxNum = 0; } public int bossId; public int state; public string killer; public int haveUseCount; public int nextRefreshTime; public int maxNum; } public partial class itemInfo : 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 : itemId = 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,itemId); ProtoBufUtils.WriteInt32(2,num); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { itemId = 0; num = 0; } public int itemId; public int num; } public partial class ReqBossRecord : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 158202; 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 ResBossRecord : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResBossRecord(this); } public const uint MsgID = 158102; 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(records == null) { records = new List(); } records.Add(new bossRecordInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); records[records.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(records != null) { records.Clear(); } } public List records = new List(); } public partial class bossRecordInfo : 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 : playerName = ProtoBufUtils.ReadString(ref readPos); break; case 2 : mapName = ProtoBufUtils.ReadString(ref readPos); break; case 3 : xPos = ProtoBufUtils.ReadInt32(ref readPos); break; case 4 : yPos = ProtoBufUtils.ReadInt32(ref readPos); break; case 5 : time = ProtoBufUtils.ReadInt64(ref readPos); break; case 6 : bossName = ProtoBufUtils.ReadString(ref readPos); break; case 7 : if(reward == null) { reward = new List(); } reward.Add(new MSG_backpack.ItemInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); reward[reward.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.WriteString(1,playerName); ProtoBufUtils.WriteString(2,mapName); ProtoBufUtils.WriteInt32(3,xPos); ProtoBufUtils.WriteInt32(4,yPos); ProtoBufUtils.WriteInt64(5,time); ProtoBufUtils.WriteString(6,bossName); for (int i = 0; i < reward.Count; i++) { if(reward != null) { reward[i].WriteMessage(7); } } ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { playerName = null; mapName = null; xPos = 0; yPos = 0; time = 0; bossName = null; if(reward != null) { reward.Clear(); } } public string playerName; public string mapName; public int xPos; public int yPos; public long time; public string bossName; public List reward = new List(); } public partial class ReqYYHJBossInfo : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 158203; 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 ResYYHJBossInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResYYHJBossInfo(this); } public const uint MsgID = 158103; 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(bossInfo == null) { bossInfo = new List(); } bossInfo.Add(new bossHomeBossInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); bossInfo[bossInfo.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(bossInfo != null) { bossInfo.Clear(); } } public List bossInfo = new List(); } public partial class BossInfo : 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 : bossId = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : refreshTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 3 : isFollowed = ProtoBufUtils.ReadBoolean(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,bossId); ProtoBufUtils.WriteInt32(2,refreshTime); ProtoBufUtils.WriteBoolean(3,isFollowed); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { bossId = 0; refreshTime = 0; isFollowed = false; } public int bossId; public int refreshTime; public bool isFollowed; } public partial class ResYyhjBossRefreshInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResYyhjBossRefreshInfo(this); } public const uint MsgID = 158104; 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(bossRefreshList == null) { bossRefreshList = new List(); } bossRefreshList.Add(new BossInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); bossRefreshList[bossRefreshList.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(bossRefreshList != null) { bossRefreshList.Clear(); } } public List bossRefreshList = new List(); } public partial class ResHomeBossRefreshInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResHomeBossRefreshInfo(this); } public const uint MsgID = 158105; 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(bossRefreshList == null) { bossRefreshList = new List(); } bossRefreshList.Add(new BossInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); bossRefreshList[bossRefreshList.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(bossRefreshList != null) { bossRefreshList.Clear(); } } public List bossRefreshList = new List(); } }