using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_Recovery { public partial class ReqOpenRecoveryPanl : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 163201; 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 recoverySystemInfo : 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 : curLevel = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : curExp = 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,curLevel); ProtoBufUtils.WriteInt32(2,curExp); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { curLevel = 0; curExp = 0; } public int curLevel; public int curExp; } public partial class ResOpenRecoveryPanlResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResOpenRecoveryPanlResult(this); } public const uint MsgID = 163101; 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(recoveryInfo == null) { recoveryInfo = new recoverySystemInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); recoveryInfo.ReadMessage(ref readPos, totalCount); break; case 2: if(canRecoveryItemIds == null) { canRecoveryItemIds = new List(); } canRecoveryItemIds.Add(ProtoBufUtils.ReadInt64(ref readPos)); break; default: break; } } } } public void Clear() { if(recoveryInfo != null) { recoveryInfo.Clear(); } if(canRecoveryItemIds != null) { canRecoveryItemIds.Clear(); } } public recoverySystemInfo recoveryInfo; public List canRecoveryItemIds = new List(); } public partial class ReqRecovery : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 163202; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); for (int i = 0; i < canRecoveryItemIds.Count; i++) { ProtoBufUtils.WriteInt64(1,canRecoveryItemIds[i]); } bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { if(canRecoveryItemIds != null) { canRecoveryItemIds.Clear(); } } public List canRecoveryItemIds = new List(); } public partial class ResRecoveryResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResRecoveryResult(this); } public const uint MsgID = 163102; 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(recoveryInfo == null) { recoveryInfo = new recoverySystemInfo(); } totalCount = ProtoBufUtils.ReadInt32(ref readPos); recoveryInfo.ReadMessage(ref readPos, totalCount); break; case 2: state = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { if(recoveryInfo != null) { recoveryInfo.Clear(); } state = 0; } public recoverySystemInfo recoveryInfo; public int state; } public partial class ResRecoveryRedPoint : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResRecoveryRedPoint(this); } public const uint MsgID = 163103; 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: state = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { state = 0; } public int state; } }