524 lines
17 KiB
C#
524 lines
17 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_Cangbaoge
|
|
{
|
|
public partial class CangBaogeRecord : 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 :
|
|
time = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
case 2 :
|
|
playerName = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 3 :
|
|
itemId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4 :
|
|
num = 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.WriteInt64(1,time);
|
|
ProtoBufUtils.WriteString(2,playerName);
|
|
ProtoBufUtils.WriteInt32(3,itemId);
|
|
ProtoBufUtils.WriteInt32(4,num);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
time = 0;
|
|
playerName = null;
|
|
itemId = 0;
|
|
num = 0;
|
|
}
|
|
public long time;
|
|
public string playerName;
|
|
public int itemId;
|
|
public int num;
|
|
}
|
|
public partial class CangbaogeExchangeData : 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 :
|
|
exchangeID = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
exchangeNum = 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,exchangeID);
|
|
ProtoBufUtils.WriteInt32(2,exchangeNum);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
exchangeID = 0;
|
|
exchangeNum = 0;
|
|
}
|
|
public int exchangeID;
|
|
public int exchangeNum;
|
|
}
|
|
public partial class ReqOpenCangbaogePanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 189201;
|
|
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 ResOpenCangbaogePanel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOpenCangbaogePanel(this);
|
|
}
|
|
|
|
public const uint MsgID = 189101;
|
|
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:
|
|
lotteryTimes = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
curSuperRound = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(alreadyGetID == null)
|
|
{
|
|
alreadyGetID = new List<int>();
|
|
}
|
|
alreadyGetID.Add(ProtoBufUtils.ReadInt32(ref readPos));
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
lotteryTimes = 0;
|
|
curSuperRound = 0;
|
|
if(alreadyGetID != null)
|
|
{
|
|
alreadyGetID.Clear();
|
|
}
|
|
}
|
|
public int lotteryTimes;
|
|
public int curSuperRound;
|
|
public List<int> alreadyGetID = new List<int>();
|
|
}
|
|
public partial class ReqOpenRecordPanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 189202;
|
|
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 ResOpenRecordPanel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOpenRecordPanel(this);
|
|
}
|
|
|
|
public const uint MsgID = 189102;
|
|
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 6:
|
|
if(recordList == null)
|
|
{
|
|
recordList = new List<CangBaogeRecord>();
|
|
}
|
|
recordList.Add(new CangBaogeRecord());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
recordList[recordList.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(recordList != null)
|
|
{
|
|
recordList.Clear();
|
|
}
|
|
}
|
|
public List<CangBaogeRecord> recordList = new List<CangBaogeRecord>();
|
|
}
|
|
public partial class ReqCangbaogeLottery : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 189203;
|
|
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 ResCangbaogeLottery : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResCangbaogeLottery(this);
|
|
}
|
|
|
|
public const uint MsgID = 189103;
|
|
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:
|
|
lotteryTimes = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
lotteryID = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
lotteryTimes = 0;
|
|
lotteryID = 0;
|
|
}
|
|
public int lotteryTimes;
|
|
public int lotteryID;
|
|
}
|
|
public partial class ReqCangbaogeReward : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 189204;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
}
|
|
public int id;
|
|
}
|
|
public partial class ResCangbaogeReward : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResCangbaogeReward(this);
|
|
}
|
|
|
|
public const uint MsgID = 189104;
|
|
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:
|
|
curSuperRound = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
if(alreadyGetID == null)
|
|
{
|
|
alreadyGetID = new List<int>();
|
|
}
|
|
alreadyGetID.Add(ProtoBufUtils.ReadInt32(ref readPos));
|
|
break;
|
|
case 3:
|
|
lotteryTimes = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
curSuperRound = 0;
|
|
if(alreadyGetID != null)
|
|
{
|
|
alreadyGetID.Clear();
|
|
}
|
|
lotteryTimes = 0;
|
|
}
|
|
public int curSuperRound;
|
|
public List<int> alreadyGetID = new List<int>();
|
|
public int lotteryTimes;
|
|
}
|
|
public partial class ReqOpenCangbaogeExchange : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 189205;
|
|
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 ResOpenCangbaogeExchange : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOpenCangbaogeExchange(this);
|
|
}
|
|
|
|
public const uint MsgID = 189105;
|
|
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(exchangeMaps == null)
|
|
{
|
|
exchangeMaps = new List<CangbaogeExchangeData>();
|
|
}
|
|
exchangeMaps.Add(new CangbaogeExchangeData());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
exchangeMaps[exchangeMaps.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(exchangeMaps != null)
|
|
{
|
|
exchangeMaps.Clear();
|
|
}
|
|
}
|
|
public List<CangbaogeExchangeData> exchangeMaps = new List<CangbaogeExchangeData>();
|
|
}
|
|
public partial class ReqCangbaogeExchange : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 189206;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,exchangeId);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
exchangeId = 0;
|
|
}
|
|
public int exchangeId;
|
|
}
|
|
public partial class ResCangbaogeExchange : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResCangbaogeExchange(this);
|
|
}
|
|
|
|
public const uint MsgID = 189106;
|
|
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(exchangeData == null)
|
|
{
|
|
exchangeData = new CangbaogeExchangeData();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
exchangeData.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(exchangeData != null)
|
|
{
|
|
exchangeData.Clear();
|
|
}
|
|
}
|
|
public CangbaogeExchangeData exchangeData;
|
|
}
|
|
}
|
|
|