406 lines
13 KiB
C#
406 lines
13 KiB
C#
|
using System.Collections.Generic;
|
||
|
using Thousandto.Plugins.Common;
|
||
|
using Thousandto.Code.Logic.Network;
|
||
|
|
||
|
namespace MSG_store
|
||
|
{
|
||
|
public partial class ResStoreItemInfos : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResStoreItemInfos(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 109101;
|
||
|
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:
|
||
|
cellnum = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2:
|
||
|
if(itemInfoList == null)
|
||
|
{
|
||
|
itemInfoList = new List<MSG_backpack.ItemInfo>();
|
||
|
}
|
||
|
itemInfoList.Add(new MSG_backpack.ItemInfo());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
itemInfoList[itemInfoList.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
case 3:
|
||
|
cellTime = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
cellnum = 0;
|
||
|
if(itemInfoList != null)
|
||
|
{
|
||
|
itemInfoList.Clear();
|
||
|
}
|
||
|
cellTime = 0;
|
||
|
}
|
||
|
public int cellnum;
|
||
|
public List<MSG_backpack.ItemInfo> itemInfoList = new List<MSG_backpack.ItemInfo>();
|
||
|
public int cellTime;
|
||
|
}
|
||
|
public partial class ResStoreItemAdd : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResStoreItemAdd(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 109102;
|
||
|
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:
|
||
|
reason = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2:
|
||
|
if(itemInfo == null)
|
||
|
{
|
||
|
itemInfo = new MSG_backpack.ItemInfo();
|
||
|
}
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
itemInfo.ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
reason = 0;
|
||
|
if(itemInfo != null)
|
||
|
{
|
||
|
itemInfo.Clear();
|
||
|
}
|
||
|
}
|
||
|
public int reason;
|
||
|
public MSG_backpack.ItemInfo itemInfo;
|
||
|
}
|
||
|
public partial class ResStoreItemChange : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResStoreItemChange(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 109103;
|
||
|
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:
|
||
|
reason = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2:
|
||
|
if(itemInfo == null)
|
||
|
{
|
||
|
itemInfo = new MSG_backpack.ItemInfo();
|
||
|
}
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
itemInfo.ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
reason = 0;
|
||
|
if(itemInfo != null)
|
||
|
{
|
||
|
itemInfo.Clear();
|
||
|
}
|
||
|
}
|
||
|
public int reason;
|
||
|
public MSG_backpack.ItemInfo itemInfo;
|
||
|
}
|
||
|
public partial class ResStoreItemDelete : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResStoreItemDelete(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 109104;
|
||
|
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:
|
||
|
reason = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2:
|
||
|
itemId = ProtoBufUtils.ReadFixed64(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
reason = 0;
|
||
|
itemId = 0;
|
||
|
}
|
||
|
public int reason;
|
||
|
public ulong itemId;
|
||
|
}
|
||
|
public partial class ResOpenStoreCellSuccess : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResOpenStoreCellSuccess(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 109105;
|
||
|
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:
|
||
|
nowCellId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
nowCellId = 0;
|
||
|
}
|
||
|
public int nowCellId;
|
||
|
}
|
||
|
public partial class ResOpenStoreCellFailed : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResOpenStoreCellFailed(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 109106;
|
||
|
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:
|
||
|
reason = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
reason = 0;
|
||
|
}
|
||
|
public int reason;
|
||
|
}
|
||
|
public partial class ReqStoreToBag : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 109201;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,cellId);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
cellId = 0;
|
||
|
}
|
||
|
public int cellId;
|
||
|
}
|
||
|
public partial class ReqBagToStore : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 109202;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,cellId);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
cellId = 0;
|
||
|
}
|
||
|
public int cellId;
|
||
|
}
|
||
|
public partial class ReqStoreMoveItem : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 109203;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteFixed64(1,itemId);
|
||
|
ProtoBufUtils.WriteInt32(2,toGridId);
|
||
|
ProtoBufUtils.WriteInt32(3,num);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
itemId = 0;
|
||
|
toGridId = 0;
|
||
|
num = 0;
|
||
|
}
|
||
|
public ulong itemId;
|
||
|
public int toGridId;
|
||
|
public int num;
|
||
|
}
|
||
|
public partial class ReqStoreClearUp : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 109204;
|
||
|
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 ReqOpenStoreCell : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 109205;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,cellId);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
cellId = 0;
|
||
|
}
|
||
|
public int cellId;
|
||
|
}
|
||
|
}
|
||
|
|