1340 lines
46 KiB
C#
1340 lines
46 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_Shop
|
|
{
|
|
public partial class shopItemInfo : 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 :
|
|
sellId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
itemId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
shopId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4 :
|
|
labelId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5 :
|
|
level = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 6 :
|
|
guildLevel = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 7 :
|
|
militaryRankLevel = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 8 :
|
|
vipLevel = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 9 :
|
|
limitType = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 10 :
|
|
buyLimit = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 11 :
|
|
coinType = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 12 :
|
|
coinNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 13 :
|
|
originalCoinNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 14 :
|
|
discount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 15 :
|
|
hot = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 16 :
|
|
sort = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 17 :
|
|
lostTime = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 18 :
|
|
duration = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
case 19 :
|
|
bind = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 20 :
|
|
refreshCurrency = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 21 :
|
|
refreshNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 22 :
|
|
shopType = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 23 :
|
|
guildShopLvlStart = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 24 :
|
|
guildShopLvlEnd = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 25 :
|
|
worldlvlstart = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 26 :
|
|
worldlvlend = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 27 :
|
|
isdiscount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 28 :
|
|
countdiscount = ProtoBufUtils.ReadString(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,sellId);
|
|
ProtoBufUtils.WriteInt32(2,itemId);
|
|
ProtoBufUtils.WriteInt32(3,shopId);
|
|
ProtoBufUtils.WriteInt32(4,labelId);
|
|
ProtoBufUtils.WriteInt32(5,level);
|
|
ProtoBufUtils.WriteInt32(6,guildLevel);
|
|
ProtoBufUtils.WriteInt32(7,militaryRankLevel);
|
|
ProtoBufUtils.WriteInt32(8,vipLevel);
|
|
ProtoBufUtils.WriteInt32(9,limitType);
|
|
ProtoBufUtils.WriteInt32(10,buyLimit);
|
|
ProtoBufUtils.WriteInt32(11,coinType);
|
|
ProtoBufUtils.WriteInt32(12,coinNum);
|
|
ProtoBufUtils.WriteInt32(13,originalCoinNum);
|
|
ProtoBufUtils.WriteInt32(14,discount);
|
|
ProtoBufUtils.WriteInt32(15,hot);
|
|
ProtoBufUtils.WriteInt32(16,sort);
|
|
ProtoBufUtils.WriteString(17,lostTime);
|
|
ProtoBufUtils.WriteInt64(18,duration);
|
|
ProtoBufUtils.WriteInt32(19,bind);
|
|
ProtoBufUtils.WriteInt32(20,refreshCurrency);
|
|
ProtoBufUtils.WriteInt32(21,refreshNum);
|
|
ProtoBufUtils.WriteString(22,shopType);
|
|
ProtoBufUtils.WriteInt32(23,guildShopLvlStart);
|
|
ProtoBufUtils.WriteInt32(24,guildShopLvlEnd);
|
|
ProtoBufUtils.WriteInt32(25,worldlvlstart);
|
|
ProtoBufUtils.WriteInt32(26,worldlvlend);
|
|
ProtoBufUtils.WriteInt32(27,isdiscount);
|
|
ProtoBufUtils.WriteString(28,countdiscount);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
sellId = 0;
|
|
itemId = 0;
|
|
shopId = 0;
|
|
labelId = 0;
|
|
level = 0;
|
|
guildLevel = 0;
|
|
militaryRankLevel = 0;
|
|
vipLevel = 0;
|
|
limitType = 0;
|
|
buyLimit = 0;
|
|
coinType = 0;
|
|
coinNum = 0;
|
|
originalCoinNum = 0;
|
|
discount = 0;
|
|
hot = 0;
|
|
sort = 0;
|
|
lostTime = null;
|
|
duration = 0;
|
|
bind = 0;
|
|
refreshCurrency = 0;
|
|
refreshNum = 0;
|
|
shopType = null;
|
|
guildShopLvlStart = 0;
|
|
guildShopLvlEnd = 0;
|
|
worldlvlstart = 0;
|
|
worldlvlend = 0;
|
|
isdiscount = 0;
|
|
countdiscount = null;
|
|
}
|
|
public int sellId;
|
|
public int itemId;
|
|
public int shopId;
|
|
public int labelId;
|
|
public int level;
|
|
public int guildLevel;
|
|
public int militaryRankLevel;
|
|
public int vipLevel;
|
|
public int limitType;
|
|
public int buyLimit;
|
|
public int coinType;
|
|
public int coinNum;
|
|
public int originalCoinNum;
|
|
public int discount;
|
|
public int hot;
|
|
public int sort;
|
|
public string lostTime;
|
|
public long duration;
|
|
public int bind;
|
|
public int refreshCurrency;
|
|
public int refreshNum;
|
|
public string shopType;
|
|
public int guildShopLvlStart;
|
|
public int guildShopLvlEnd;
|
|
public int worldlvlstart;
|
|
public int worldlvlend;
|
|
public int isdiscount;
|
|
public string countdiscount;
|
|
}
|
|
public partial class ShopData : 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 :
|
|
sellId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
buyNum = 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,sellId);
|
|
ProtoBufUtils.WriteInt32(2,buyNum);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
sellId = 0;
|
|
buyNum = 0;
|
|
}
|
|
public int sellId;
|
|
public int buyNum;
|
|
}
|
|
public partial class shopSubMess : 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 :
|
|
shopId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
if(labelList == null)
|
|
{
|
|
labelList = new List<int>();
|
|
}
|
|
labelList.Add(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,shopId);
|
|
for (int i = 0; i < labelList.Count; i++)
|
|
{
|
|
ProtoBufUtils.WriteInt32(2,labelList[i]);
|
|
}
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
shopId = 0;
|
|
if(labelList != null)
|
|
{
|
|
labelList.Clear();
|
|
}
|
|
}
|
|
public int shopId;
|
|
public List<int> labelList = new List<int>();
|
|
}
|
|
public partial class ReqShopSubList : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120201;
|
|
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 ResShopSubList : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResShopSubList(this);
|
|
}
|
|
|
|
public const uint MsgID = 120101;
|
|
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(sublist == null)
|
|
{
|
|
sublist = new List<shopSubMess>();
|
|
}
|
|
sublist.Add(new shopSubMess());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
sublist[sublist.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(sublist != null)
|
|
{
|
|
sublist.Clear();
|
|
}
|
|
}
|
|
public List<shopSubMess> sublist = new List<shopSubMess>();
|
|
}
|
|
public partial class ReqShopList : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120202;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,shopId);
|
|
ProtoBufUtils.WriteInt32(2,labelId);
|
|
ProtoBufUtils.WriteInt32(3,gradeLimit);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
shopId = 0;
|
|
labelId = 0;
|
|
gradeLimit = 0;
|
|
}
|
|
public int shopId;
|
|
public int labelId;
|
|
public int gradeLimit;
|
|
}
|
|
public partial class ResShopItemList : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResShopItemList(this);
|
|
}
|
|
|
|
public const uint MsgID = 120102;
|
|
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:
|
|
shopId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
labelId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(itemList == null)
|
|
{
|
|
itemList = new List<shopItemInfo>();
|
|
}
|
|
itemList.Add(new shopItemInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
itemList[itemList.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 4:
|
|
if(dataList == null)
|
|
{
|
|
dataList = new List<ShopData>();
|
|
}
|
|
dataList.Add(new ShopData());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
dataList[dataList.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
shopId = 0;
|
|
labelId = 0;
|
|
if(itemList != null)
|
|
{
|
|
itemList.Clear();
|
|
}
|
|
if(dataList != null)
|
|
{
|
|
dataList.Clear();
|
|
}
|
|
}
|
|
public int shopId;
|
|
public int labelId;
|
|
public List<shopItemInfo> itemList = new List<shopItemInfo>();
|
|
public List<ShopData> dataList = new List<ShopData>();
|
|
}
|
|
public partial class ReqBuyItem : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120203;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,sellId);
|
|
ProtoBufUtils.WriteInt32(2,num);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
sellId = 0;
|
|
num = 0;
|
|
}
|
|
public int sellId;
|
|
public int num;
|
|
}
|
|
public partial class ResBuySuccess : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResBuySuccess(this);
|
|
}
|
|
|
|
public const uint MsgID = 120103;
|
|
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:
|
|
sellId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
num = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
sellId = 0;
|
|
num = 0;
|
|
}
|
|
public int sellId;
|
|
public int num;
|
|
}
|
|
public partial class ResBuyFailure : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResBuyFailure(this);
|
|
}
|
|
|
|
public const uint MsgID = 120104;
|
|
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:
|
|
sellId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
reason = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
sellId = 0;
|
|
reason = 0;
|
|
}
|
|
public int sellId;
|
|
public int reason;
|
|
}
|
|
public partial class ReqRefreshShop : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120204;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,shopId);
|
|
ProtoBufUtils.WriteInt32(2,labelId);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
shopId = 0;
|
|
labelId = 0;
|
|
}
|
|
public int shopId;
|
|
public int labelId;
|
|
}
|
|
public partial class ResFreshItemInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResFreshItemInfo(this);
|
|
}
|
|
|
|
public const uint MsgID = 120105;
|
|
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(itemInfo == null)
|
|
{
|
|
itemInfo = new shopItemInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
itemInfo.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(itemInfo != null)
|
|
{
|
|
itemInfo.Clear();
|
|
}
|
|
}
|
|
public shopItemInfo itemInfo;
|
|
}
|
|
public partial class SyncShopData : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_SyncShopData(this);
|
|
}
|
|
|
|
public const uint MsgID = 120107;
|
|
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:
|
|
shopId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
labelId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(data == null)
|
|
{
|
|
data = new ShopData();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
data.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
shopId = 0;
|
|
labelId = 0;
|
|
if(data != null)
|
|
{
|
|
data.Clear();
|
|
}
|
|
}
|
|
public int shopId;
|
|
public int labelId;
|
|
public ShopData data;
|
|
}
|
|
public partial class LimitShop : 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 :
|
|
id = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
endTime = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
case 3 :
|
|
isOverTime = 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,id);
|
|
ProtoBufUtils.WriteInt64(2,endTime);
|
|
ProtoBufUtils.WriteBoolean(3,isOverTime);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
endTime = 0;
|
|
isOverTime = false;
|
|
}
|
|
public int id;
|
|
public long endTime;
|
|
public bool isOverTime;
|
|
}
|
|
public partial class SyncLimitShop : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_SyncLimitShop(this);
|
|
}
|
|
|
|
public const uint MsgID = 120106;
|
|
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(shops == null)
|
|
{
|
|
shops = new List<LimitShop>();
|
|
}
|
|
shops.Add(new LimitShop());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
shops[shops.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
if(buyIds == null)
|
|
{
|
|
buyIds = new List<int>();
|
|
}
|
|
buyIds.Add(ProtoBufUtils.ReadInt32(ref readPos));
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(shops != null)
|
|
{
|
|
shops.Clear();
|
|
}
|
|
if(buyIds != null)
|
|
{
|
|
buyIds.Clear();
|
|
}
|
|
}
|
|
public List<LimitShop> shops = new List<LimitShop>();
|
|
public List<int> buyIds = new List<int>();
|
|
}
|
|
public partial class ReqLimitBuy : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120205;
|
|
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 ReqMysteryShopBuy : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120206;
|
|
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 SyncMysteryShop : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_SyncMysteryShop(this);
|
|
}
|
|
|
|
public const uint MsgID = 120108;
|
|
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(shops == null)
|
|
{
|
|
shops = new List<LimitShop>();
|
|
}
|
|
shops.Add(new LimitShop());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
shops[shops.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
if(buyIds == null)
|
|
{
|
|
buyIds = new List<int>();
|
|
}
|
|
buyIds.Add(ProtoBufUtils.ReadInt32(ref readPos));
|
|
break;
|
|
case 3:
|
|
succID = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(shops != null)
|
|
{
|
|
shops.Clear();
|
|
}
|
|
if(buyIds != null)
|
|
{
|
|
buyIds.Clear();
|
|
}
|
|
succID = 0;
|
|
}
|
|
public List<LimitShop> shops = new List<LimitShop>();
|
|
public List<int> buyIds = new List<int>();
|
|
public int succID;
|
|
}
|
|
public partial class FreeShopData : 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 :
|
|
id = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
isGet = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 3 :
|
|
buyTime = 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,id);
|
|
ProtoBufUtils.WriteBoolean(2,isGet);
|
|
ProtoBufUtils.WriteInt64(3,buyTime);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
isGet = false;
|
|
buyTime = 0;
|
|
}
|
|
public int id;
|
|
public bool isGet;
|
|
public long buyTime;
|
|
}
|
|
public partial class ReqFreeShop : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120207;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
ProtoBufUtils.WriteInt32(2,type);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
type = 0;
|
|
}
|
|
public int id;
|
|
public int type;
|
|
}
|
|
public partial class SyncFreeShopResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_SyncFreeShopResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 120109;
|
|
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(buyData == null)
|
|
{
|
|
buyData = new FreeShopData();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
buyData.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(buyData != null)
|
|
{
|
|
buyData.Clear();
|
|
}
|
|
type = 0;
|
|
}
|
|
public FreeShopData buyData;
|
|
public int type;
|
|
}
|
|
public partial class SyncOnlineInitFreeShop : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_SyncOnlineInitFreeShop(this);
|
|
}
|
|
|
|
public const uint MsgID = 120110;
|
|
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(zeroBuyList == null)
|
|
{
|
|
zeroBuyList = new List<FreeShopData>();
|
|
}
|
|
zeroBuyList.Add(new FreeShopData());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
zeroBuyList[zeroBuyList.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(zeroBuyList != null)
|
|
{
|
|
zeroBuyList.Clear();
|
|
}
|
|
}
|
|
public List<FreeShopData> zeroBuyList = new List<FreeShopData>();
|
|
}
|
|
public partial class BuyInfo : 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 :
|
|
name = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 2 :
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
id = 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.WriteString(1,name);
|
|
ProtoBufUtils.WriteInt32(2,type);
|
|
ProtoBufUtils.WriteInt32(3,id);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
name = null;
|
|
type = 0;
|
|
id = 0;
|
|
}
|
|
public string name;
|
|
public int type;
|
|
public int id;
|
|
}
|
|
public partial class ReqBuyNewFreeShop : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120208;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
ProtoBufUtils.WriteInt32(2,type);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
type = 0;
|
|
}
|
|
public int id;
|
|
public int type;
|
|
}
|
|
public partial class SyncBuyNewFreeShopResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_SyncBuyNewFreeShopResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 120111;
|
|
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(buyData == null)
|
|
{
|
|
buyData = new FreeShopData();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
buyData.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(buyData != null)
|
|
{
|
|
buyData.Clear();
|
|
}
|
|
type = 0;
|
|
}
|
|
public FreeShopData buyData;
|
|
public int type;
|
|
}
|
|
public partial class SyncOnlineInitNewFreeShop : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_SyncOnlineInitNewFreeShop(this);
|
|
}
|
|
|
|
public const uint MsgID = 120112;
|
|
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(zeroBuyList == null)
|
|
{
|
|
zeroBuyList = new List<FreeShopData>();
|
|
}
|
|
zeroBuyList.Add(new FreeShopData());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
zeroBuyList[zeroBuyList.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(zeroBuyList != null)
|
|
{
|
|
zeroBuyList.Clear();
|
|
}
|
|
}
|
|
public List<FreeShopData> zeroBuyList = new List<FreeShopData>();
|
|
}
|
|
public partial class ReqOpenNewFreeShop : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 120209;
|
|
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 ResOpenNewFreeShopResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOpenNewFreeShopResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 120113;
|
|
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(buyInfos == null)
|
|
{
|
|
buyInfos = new List<BuyInfo>();
|
|
}
|
|
buyInfos.Add(new BuyInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
buyInfos[buyInfos.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(buyInfos != null)
|
|
{
|
|
buyInfos.Clear();
|
|
}
|
|
}
|
|
public List<BuyInfo> buyInfos = new List<BuyInfo>();
|
|
}
|
|
}
|
|
|