831 lines
28 KiB
C#
831 lines
28 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_TreasureHunt
|
|
{
|
|
public partial class simpleItemInfo : 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 :
|
|
itemNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
bind = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4 :
|
|
uid = 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.WriteInt32(1,itemId);
|
|
ProtoBufUtils.WriteInt32(2,itemNum);
|
|
ProtoBufUtils.WriteInt32(3,bind);
|
|
ProtoBufUtils.WriteInt64(4,uid);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
itemId = 0;
|
|
itemNum = 0;
|
|
bind = 0;
|
|
uid = 0;
|
|
}
|
|
public int itemId;
|
|
public int itemNum;
|
|
public int bind;
|
|
public long uid;
|
|
}
|
|
public partial class itemRecordInfo : 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 :
|
|
itemNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
playername = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 4 :
|
|
bind = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5 :
|
|
type = 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,itemNum);
|
|
ProtoBufUtils.WriteString(3,playername);
|
|
ProtoBufUtils.WriteInt32(4,bind);
|
|
ProtoBufUtils.WriteInt32(5,type);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
itemId = 0;
|
|
itemNum = 0;
|
|
playername = null;
|
|
bind = 0;
|
|
type = 0;
|
|
}
|
|
public int itemId;
|
|
public int itemNum;
|
|
public string playername;
|
|
public int bind;
|
|
public int type;
|
|
}
|
|
public partial class treasureRecordInfo : 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 :
|
|
if(info == null)
|
|
{
|
|
info = new List<itemRecordInfo>();
|
|
}
|
|
info.Add(new itemRecordInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
info[info.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2 :
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
serverLuckCount = 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);
|
|
for (int i = 0; i < info.Count; i++)
|
|
{
|
|
if(info != null)
|
|
{
|
|
info[i].WriteMessage(1);
|
|
}
|
|
}
|
|
ProtoBufUtils.WriteInt32(2,type);
|
|
ProtoBufUtils.WriteInt32(3,serverLuckCount);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(info != null)
|
|
{
|
|
info.Clear();
|
|
}
|
|
type = 0;
|
|
serverLuckCount = 0;
|
|
}
|
|
public List<itemRecordInfo> info = new List<itemRecordInfo>();
|
|
public int type;
|
|
public int serverLuckCount;
|
|
}
|
|
public partial class warehouseInfo : 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 :
|
|
if(simpleItems == null)
|
|
{
|
|
simpleItems = new List<simpleItemInfo>();
|
|
}
|
|
simpleItems.Add(new simpleItemInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
simpleItems[simpleItems.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2 :
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
mustTypeleftTimes = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4 :
|
|
freetimes = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5 :
|
|
todayLeftTimes = 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);
|
|
for (int i = 0; i < simpleItems.Count; i++)
|
|
{
|
|
if(simpleItems != null)
|
|
{
|
|
simpleItems[i].WriteMessage(1);
|
|
}
|
|
}
|
|
ProtoBufUtils.WriteInt32(2,type);
|
|
ProtoBufUtils.WriteInt32(3,mustTypeleftTimes);
|
|
ProtoBufUtils.WriteInt32(4,freetimes);
|
|
ProtoBufUtils.WriteInt32(5,todayLeftTimes);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(simpleItems != null)
|
|
{
|
|
simpleItems.Clear();
|
|
}
|
|
type = 0;
|
|
mustTypeleftTimes = 0;
|
|
freetimes = 0;
|
|
todayLeftTimes = 0;
|
|
}
|
|
public List<simpleItemInfo> simpleItems = new List<simpleItemInfo>();
|
|
public int type;
|
|
public int mustTypeleftTimes;
|
|
public int freetimes;
|
|
public int todayLeftTimes;
|
|
}
|
|
public partial class ReqTreasureHunt : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 510201;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,type);
|
|
ProtoBufUtils.WriteInt32(2,times);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
type = 0;
|
|
times = 0;
|
|
}
|
|
public int type;
|
|
public int times;
|
|
}
|
|
public partial class ResTreasureResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResTreasureResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 510101;
|
|
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 warehouseInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
info.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(info != null)
|
|
{
|
|
info.Clear();
|
|
}
|
|
}
|
|
public warehouseInfo info;
|
|
}
|
|
public partial class ReqBuy : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 510202;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,type);
|
|
ProtoBufUtils.WriteInt32(2,times);
|
|
ProtoBufUtils.WriteInt32(3,num);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
type = 0;
|
|
times = 0;
|
|
num = 0;
|
|
}
|
|
public int type;
|
|
public int times;
|
|
public int num;
|
|
}
|
|
public partial class ResBuyResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResBuyResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 510102;
|
|
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:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
type = 0;
|
|
}
|
|
public int type;
|
|
}
|
|
public partial class ReqOnekeyExtract : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 510203;
|
|
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 ResOnekeyExtractResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOnekeyExtractResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 510103;
|
|
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:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
type = 0;
|
|
}
|
|
public int type;
|
|
}
|
|
public partial class ResUpdateRecord : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResUpdateRecord(this);
|
|
}
|
|
|
|
public const uint MsgID = 510104;
|
|
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(record == null)
|
|
{
|
|
record = new treasureRecordInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
record.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(record != null)
|
|
{
|
|
record.Clear();
|
|
}
|
|
type = 0;
|
|
}
|
|
public treasureRecordInfo record;
|
|
public int type;
|
|
}
|
|
public partial class ResAllWarehouseInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResAllWarehouseInfo(this);
|
|
}
|
|
|
|
public const uint MsgID = 510105;
|
|
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 List<warehouseInfo>();
|
|
}
|
|
info.Add(new warehouseInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
info[info.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
if(allRecordInfo == null)
|
|
{
|
|
allRecordInfo = new List<treasureRecordInfo>();
|
|
}
|
|
allRecordInfo.Add(new treasureRecordInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
allRecordInfo[allRecordInfo.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 3:
|
|
if(selfRecordInfo == null)
|
|
{
|
|
selfRecordInfo = new List<treasureRecordInfo>();
|
|
}
|
|
selfRecordInfo.Add(new treasureRecordInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
selfRecordInfo[selfRecordInfo.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(info != null)
|
|
{
|
|
info.Clear();
|
|
}
|
|
if(allRecordInfo != null)
|
|
{
|
|
allRecordInfo.Clear();
|
|
}
|
|
if(selfRecordInfo != null)
|
|
{
|
|
selfRecordInfo.Clear();
|
|
}
|
|
}
|
|
public List<warehouseInfo> info = new List<warehouseInfo>();
|
|
public List<treasureRecordInfo> allRecordInfo = new List<treasureRecordInfo>();
|
|
public List<treasureRecordInfo> selfRecordInfo = new List<treasureRecordInfo>();
|
|
}
|
|
public partial class ResNoticeReward : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResNoticeReward(this);
|
|
}
|
|
|
|
public const uint MsgID = 510106;
|
|
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 itemRecordInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
info.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(info != null)
|
|
{
|
|
info.Clear();
|
|
}
|
|
type = 0;
|
|
}
|
|
public itemRecordInfo info;
|
|
public int type;
|
|
}
|
|
public partial class ResRewardResultPanle : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResRewardResultPanle(this);
|
|
}
|
|
|
|
public const uint MsgID = 510107;
|
|
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(simpleItems == null)
|
|
{
|
|
simpleItems = new List<simpleItemInfo>();
|
|
}
|
|
simpleItems.Add(new simpleItemInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
simpleItems[simpleItems.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
ext1 = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4:
|
|
ext2 = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(simpleItems != null)
|
|
{
|
|
simpleItems.Clear();
|
|
}
|
|
type = 0;
|
|
ext1 = 0;
|
|
ext2 = 0;
|
|
}
|
|
public List<simpleItemInfo> simpleItems = new List<simpleItemInfo>();
|
|
public int type;
|
|
public int ext1;
|
|
public int ext2;
|
|
}
|
|
public partial class ReqOnekeyRecovery : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 510205;
|
|
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 ResRecoveryResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResRecoveryResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 510108;
|
|
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:
|
|
result = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
result = 0;
|
|
}
|
|
public int result;
|
|
}
|
|
public partial class ReqChooseRecovery : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 510206;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,itemId);
|
|
ProtoBufUtils.WriteInt32(2,num);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
itemId = 0;
|
|
num = 0;
|
|
}
|
|
public int itemId;
|
|
public int num;
|
|
}
|
|
public partial class ResFreeTreasureTime : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResFreeTreasureTime(this);
|
|
}
|
|
|
|
public const uint MsgID = 510109;
|
|
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:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
tick = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
type = 0;
|
|
tick = 0;
|
|
}
|
|
public int type;
|
|
public int tick;
|
|
}
|
|
}
|
|
|