354 lines
12 KiB
C#
354 lines
12 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_TreasureHuntWuyou
|
|
{
|
|
public partial class ResAllInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResAllInfo(this);
|
|
}
|
|
|
|
public const uint MsgID = 537101;
|
|
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 MSG_TreasureHunt.warehouseInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
info.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
if(allRecordInfo == null)
|
|
{
|
|
allRecordInfo = new List<MSG_TreasureHunt.treasureRecordInfo>();
|
|
}
|
|
allRecordInfo.Add(new MSG_TreasureHunt.treasureRecordInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
allRecordInfo[allRecordInfo.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 3:
|
|
if(selfRecordInfo == null)
|
|
{
|
|
selfRecordInfo = new List<MSG_TreasureHunt.treasureRecordInfo>();
|
|
}
|
|
selfRecordInfo.Add(new MSG_TreasureHunt.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 MSG_TreasureHunt.warehouseInfo info;
|
|
public List<MSG_TreasureHunt.treasureRecordInfo> allRecordInfo = new List<MSG_TreasureHunt.treasureRecordInfo>();
|
|
public List<MSG_TreasureHunt.treasureRecordInfo> selfRecordInfo = new List<MSG_TreasureHunt.treasureRecordInfo>();
|
|
}
|
|
public partial class ReqOpenPanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 537201;
|
|
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 ResOpenPanel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOpenPanel(this);
|
|
}
|
|
|
|
public const uint MsgID = 537102;
|
|
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:
|
|
getItem = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 2:
|
|
lastTime = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
case 3:
|
|
getItemTime = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
getItem = false;
|
|
lastTime = 0;
|
|
getItemTime = 0;
|
|
}
|
|
public bool getItem;
|
|
public long lastTime;
|
|
public long getItemTime;
|
|
}
|
|
public partial class ReqGetItem : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 537202;
|
|
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 ResGetItem : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResGetItem(this);
|
|
}
|
|
|
|
public const uint MsgID = 537103;
|
|
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:
|
|
success = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 2:
|
|
if(simpleItems == null)
|
|
{
|
|
simpleItems = new MSG_TreasureHunt.simpleItemInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
simpleItems.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
success = false;
|
|
if(simpleItems != null)
|
|
{
|
|
simpleItems.Clear();
|
|
}
|
|
}
|
|
public bool success;
|
|
public MSG_TreasureHunt.simpleItemInfo simpleItems;
|
|
}
|
|
public partial class ReqHunt : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 537203;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,num);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
num = 0;
|
|
}
|
|
public int num;
|
|
}
|
|
public partial class ResHuntResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResHuntResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 537104;
|
|
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<MSG_TreasureHunt.simpleItemInfo>();
|
|
}
|
|
simpleItems.Add(new MSG_TreasureHunt.simpleItemInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
simpleItems[simpleItems.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(simpleItems != null)
|
|
{
|
|
simpleItems.Clear();
|
|
}
|
|
}
|
|
public List<MSG_TreasureHunt.simpleItemInfo> simpleItems = new List<MSG_TreasureHunt.simpleItemInfo>();
|
|
}
|
|
public partial class ReqExtract : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 537204;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt64(1,uid);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
uid = 0;
|
|
}
|
|
public long uid;
|
|
}
|
|
public partial class ResExtractResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResExtractResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 537105;
|
|
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:
|
|
uid = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
uid = 0;
|
|
}
|
|
public long uid;
|
|
}
|
|
}
|
|
|