using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_GuildBoss { public partial class guildBossDamageInfo : 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 : id = ProtoBufUtils.ReadInt64(ref readPos); break; case 2 : name = ProtoBufUtils.ReadString(ref readPos); break; case 3 : damage = 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.WriteInt64(1,id); ProtoBufUtils.WriteString(2,name); ProtoBufUtils.WriteInt64(3,damage); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { id = 0; name = null; damage = 0; } public long id; public string name; public long damage; } public partial class ReqOpenGuildBossPannel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 527201; 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 ResGuildBossPannel : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResGuildBossPannel(this); } public const uint MsgID = 527101; 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(guildInfo == null) { guildInfo = new List(); } guildInfo.Add(new guildBossDamageInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); guildInfo[guildInfo.Count - 1].ReadMessage(ref readPos, totalCount); break; case 2: if(personInfo == null) { personInfo = new List(); } personInfo.Add(new guildBossDamageInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); personInfo[personInfo.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(guildInfo != null) { guildInfo.Clear(); } if(personInfo != null) { personInfo.Clear(); } } public List guildInfo = new List(); public List personInfo = new List(); } public partial class ResSyncGuildBossDamage : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResSyncGuildBossDamage(this); } public const uint MsgID = 527102; 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(guildInfo == null) { guildInfo = new List(); } guildInfo.Add(new guildBossDamageInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); guildInfo[guildInfo.Count - 1].ReadMessage(ref readPos, totalCount); break; case 2: if(personInfo == null) { personInfo = new List(); } personInfo.Add(new guildBossDamageInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); personInfo[personInfo.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(guildInfo != null) { guildInfo.Clear(); } if(personInfo != null) { personInfo.Clear(); } } public List guildInfo = new List(); public List personInfo = new List(); } public partial class ReqGuildBossInspire : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 527202; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteInt32(1,type); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { type = 0; } public int type; } public partial class ResGuildBossInspire : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResGuildBossInspire(this); } public const uint MsgID = 527103; 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: ownMoneyNum = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: ownGoldNum = ProtoBufUtils.ReadInt32(ref readPos); break; case 3: guildNum = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { ownMoneyNum = 0; ownGoldNum = 0; guildNum = 0; } public int ownMoneyNum; public int ownGoldNum; public int guildNum; } public partial class ResGuildBossOCTime : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResGuildBossOCTime(this); } public const uint MsgID = 527104; 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: openTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: closeTime = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { openTime = 0; closeTime = 0; } public int openTime; public int closeTime; } public partial class ResGuildBossResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResGuildBossResult(this); } public const uint MsgID = 527105; 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: rank = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: damage = ProtoBufUtils.ReadInt64(ref readPos); break; case 3: 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 4: if(auctionList == null) { auctionList = new List(); } auctionList.Add(new MSG_backpack.ItemInfo()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); auctionList[auctionList.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { rank = 0; damage = 0; if(itemInfoList != null) { itemInfoList.Clear(); } if(auctionList != null) { auctionList.Clear(); } } public int rank; public long damage; public List itemInfoList = new List(); public List auctionList = new List(); } }