736 lines
25 KiB
C#
736 lines
25 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_WorldAnswer
|
|
{
|
|
public partial class totalIntegral : 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 :
|
|
integral = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
exp = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
case 3 :
|
|
money = 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,integral);
|
|
ProtoBufUtils.WriteInt64(2,exp);
|
|
ProtoBufUtils.WriteInt32(3,money);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
integral = 0;
|
|
exp = 0;
|
|
money = 0;
|
|
}
|
|
public int integral;
|
|
public long exp;
|
|
public int money;
|
|
}
|
|
public partial class totalChooseNum : 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 :
|
|
chooseACount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
chooseBCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
chooseCCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4 :
|
|
chooseDCount = 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,chooseACount);
|
|
ProtoBufUtils.WriteInt32(2,chooseBCount);
|
|
ProtoBufUtils.WriteInt32(3,chooseCCount);
|
|
ProtoBufUtils.WriteInt32(4,chooseDCount);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
chooseACount = 0;
|
|
chooseBCount = 0;
|
|
chooseCCount = 0;
|
|
chooseDCount = 0;
|
|
}
|
|
public int chooseACount;
|
|
public int chooseBCount;
|
|
public int chooseCCount;
|
|
public int chooseDCount;
|
|
}
|
|
public partial class ReqApplyAnswer : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 512201;
|
|
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 G2PReqApplyAnswer : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_G2PReqApplyAnswer(this);
|
|
}
|
|
|
|
public const uint MsgID = 512301;
|
|
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:
|
|
level = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
roleName = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
level = 0;
|
|
roleName = null;
|
|
}
|
|
public long roleId;
|
|
public int level;
|
|
public string roleName;
|
|
}
|
|
public partial class ResApplyAnswerResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResApplyAnswerResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 512101;
|
|
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:
|
|
questionRound = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
questionID = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(integral == null)
|
|
{
|
|
integral = new totalIntegral();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
integral.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 4:
|
|
lastTime = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5:
|
|
curQuestionNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 6:
|
|
if(chooseNum == null)
|
|
{
|
|
chooseNum = new totalChooseNum();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
chooseNum.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 7:
|
|
curChoose = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
questionRound = 0;
|
|
questionID = 0;
|
|
if(integral != null)
|
|
{
|
|
integral.Clear();
|
|
}
|
|
lastTime = 0;
|
|
curQuestionNum = 0;
|
|
if(chooseNum != null)
|
|
{
|
|
chooseNum.Clear();
|
|
}
|
|
curChoose = 0;
|
|
}
|
|
public int questionRound;
|
|
public int questionID;
|
|
public totalIntegral integral;
|
|
public int lastTime;
|
|
public int curQuestionNum;
|
|
public totalChooseNum chooseNum;
|
|
public int curChoose;
|
|
}
|
|
public partial class ReqAnswerResult : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 512202;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,resultIndex);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
resultIndex = 0;
|
|
}
|
|
public int resultIndex;
|
|
}
|
|
public partial class G2PReqAnswerResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_G2PReqAnswerResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 512302;
|
|
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:
|
|
resultIndex = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
resultIndex = 0;
|
|
}
|
|
public long roleId;
|
|
public int resultIndex;
|
|
}
|
|
public partial class ReqLeaveOutAnswer : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 512203;
|
|
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 G2PReqLeaveOutAnswer : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_G2PReqLeaveOutAnswer(this);
|
|
}
|
|
|
|
public const uint MsgID = 512303;
|
|
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;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
}
|
|
public long roleId;
|
|
}
|
|
public partial class ResSendQuestion : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResSendQuestion(this);
|
|
}
|
|
|
|
public const uint MsgID = 512102;
|
|
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:
|
|
questionID = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
questionRound = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(chooseNum == null)
|
|
{
|
|
chooseNum = new totalChooseNum();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
chooseNum.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 4:
|
|
lastTime = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5:
|
|
curQuestionNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 6:
|
|
if(integral == null)
|
|
{
|
|
integral = new totalIntegral();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
integral.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
questionID = 0;
|
|
questionRound = 0;
|
|
if(chooseNum != null)
|
|
{
|
|
chooseNum.Clear();
|
|
}
|
|
lastTime = 0;
|
|
curQuestionNum = 0;
|
|
if(integral != null)
|
|
{
|
|
integral.Clear();
|
|
}
|
|
}
|
|
public int questionID;
|
|
public int questionRound;
|
|
public totalChooseNum chooseNum;
|
|
public int lastTime;
|
|
public int curQuestionNum;
|
|
public totalIntegral integral;
|
|
}
|
|
public partial class ResSendOtherPlayerSelect : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResSendOtherPlayerSelect(this);
|
|
}
|
|
|
|
public const uint MsgID = 512103;
|
|
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:
|
|
roleName = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 2:
|
|
questionIndex = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleName = null;
|
|
questionIndex = 0;
|
|
}
|
|
public string roleName;
|
|
public int questionIndex;
|
|
}
|
|
public partial class itemReward : 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 :
|
|
itmeID = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
itmeNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
isBind = 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,itmeID);
|
|
ProtoBufUtils.WriteInt32(2,itmeNum);
|
|
ProtoBufUtils.WriteBoolean(3,isBind);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
itmeID = 0;
|
|
itmeNum = 0;
|
|
isBind = false;
|
|
}
|
|
public int itmeID;
|
|
public int itmeNum;
|
|
public bool isBind;
|
|
}
|
|
public partial class ResWorldAnswerOver : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResWorldAnswerOver(this);
|
|
}
|
|
|
|
public const uint MsgID = 512104;
|
|
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:
|
|
rankPer = ProtoBufUtils.ReadFloat(ref readPos);
|
|
break;
|
|
case 2:
|
|
if(reward == null)
|
|
{
|
|
reward = new List<itemReward>();
|
|
}
|
|
reward.Add(new itemReward());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
reward[reward.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 3:
|
|
if(integral == null)
|
|
{
|
|
integral = new totalIntegral();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
integral.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
rankPer = 0;
|
|
if(reward != null)
|
|
{
|
|
reward.Clear();
|
|
}
|
|
if(integral != null)
|
|
{
|
|
integral.Clear();
|
|
}
|
|
}
|
|
public float rankPer;
|
|
public List<itemReward> reward = new List<itemReward>();
|
|
public totalIntegral integral;
|
|
}
|
|
public partial class P2GResQuestionReward : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_P2GResQuestionReward(this);
|
|
}
|
|
|
|
public const uint MsgID = 512401;
|
|
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:
|
|
addExp = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(item == null)
|
|
{
|
|
item = new itemReward();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
item.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
addExp = 0;
|
|
if(item != null)
|
|
{
|
|
item.Clear();
|
|
}
|
|
}
|
|
public long roleId;
|
|
public long addExp;
|
|
public itemReward item;
|
|
}
|
|
public partial class P2GResWorldAnswerOver : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_P2GResWorldAnswerOver(this);
|
|
}
|
|
|
|
public const uint MsgID = 512402;
|
|
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:
|
|
if(item == null)
|
|
{
|
|
item = new List<itemReward>();
|
|
}
|
|
item.Add(new itemReward());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
item[item.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
if(item != null)
|
|
{
|
|
item.Clear();
|
|
}
|
|
}
|
|
public long roleId;
|
|
public List<itemReward> item = new List<itemReward>();
|
|
}
|
|
}
|
|
|