615 lines
20 KiB
C#
615 lines
20 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_Trade
|
|
{
|
|
public partial class ReqTradeApply : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 147201;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteUint64(1,tradePlayerId);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
tradePlayerId = 0;
|
|
}
|
|
public ulong tradePlayerId;
|
|
}
|
|
public partial class ResTradeApply : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResTradeApply(this);
|
|
}
|
|
|
|
public const uint MsgID = 147101;
|
|
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:
|
|
applyName = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
applyName = null;
|
|
}
|
|
public string applyName;
|
|
}
|
|
public partial class ReqTradeCancel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 147202;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,cancelType);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
cancelType = 0;
|
|
}
|
|
public int cancelType;
|
|
}
|
|
public partial class ResTradeCancel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResTradeCancel(this);
|
|
}
|
|
|
|
public const uint MsgID = 147102;
|
|
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)
|
|
{
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
}
|
|
}
|
|
public partial class ReqOpenTradePanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 147203;
|
|
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 ResOpenTradePanel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOpenTradePanel(this);
|
|
}
|
|
|
|
public const uint MsgID = 147103;
|
|
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:
|
|
oppositeName = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
oppositeName = null;
|
|
}
|
|
public string oppositeName;
|
|
}
|
|
public partial class ReqTradeItem : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 147204;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,itemOrCoin);
|
|
ProtoBufUtils.WriteInt32(2,num);
|
|
ProtoBufUtils.WriteInt32(3,itemGridId);
|
|
ProtoBufUtils.WriteInt32(4,coinType);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
itemOrCoin = 0;
|
|
num = 0;
|
|
itemGridId = 0;
|
|
coinType = 0;
|
|
}
|
|
public int itemOrCoin;
|
|
public int num;
|
|
public int itemGridId;
|
|
public int coinType;
|
|
}
|
|
public partial class ResTradeItem : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResTradeItem(this);
|
|
}
|
|
|
|
public const uint MsgID = 147104;
|
|
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:
|
|
canTrade = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 2:
|
|
itemOrCoin = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(tradeItemInfo == null)
|
|
{
|
|
tradeItemInfo = new MSG_backpack.ItemInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
tradeItemInfo.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 4:
|
|
tradeGridNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5:
|
|
if(tradeCoinInfo == null)
|
|
{
|
|
tradeCoinInfo = new MSG_backpack.ItemCoin();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
tradeCoinInfo.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
canTrade = false;
|
|
itemOrCoin = 0;
|
|
if(tradeItemInfo != null)
|
|
{
|
|
tradeItemInfo.Clear();
|
|
}
|
|
tradeGridNum = 0;
|
|
if(tradeCoinInfo != null)
|
|
{
|
|
tradeCoinInfo.Clear();
|
|
}
|
|
}
|
|
public bool canTrade;
|
|
public int itemOrCoin;
|
|
public MSG_backpack.ItemInfo tradeItemInfo;
|
|
public int tradeGridNum;
|
|
public MSG_backpack.ItemCoin tradeCoinInfo;
|
|
}
|
|
public partial class ResOppositeTradeItem : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOppositeTradeItem(this);
|
|
}
|
|
|
|
public const uint MsgID = 147105;
|
|
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:
|
|
itemOrCoin = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
if(tradeItemInfo == null)
|
|
{
|
|
tradeItemInfo = new MSG_backpack.ItemInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
tradeItemInfo.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 3:
|
|
tradeGridNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4:
|
|
if(tradeCoinInfo == null)
|
|
{
|
|
tradeCoinInfo = new MSG_backpack.ItemCoin();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
tradeCoinInfo.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
itemOrCoin = 0;
|
|
if(tradeItemInfo != null)
|
|
{
|
|
tradeItemInfo.Clear();
|
|
}
|
|
tradeGridNum = 0;
|
|
if(tradeCoinInfo != null)
|
|
{
|
|
tradeCoinInfo.Clear();
|
|
}
|
|
}
|
|
public int itemOrCoin;
|
|
public MSG_backpack.ItemInfo tradeItemInfo;
|
|
public int tradeGridNum;
|
|
public MSG_backpack.ItemCoin tradeCoinInfo;
|
|
}
|
|
public partial class ReqUnloadTradeItem : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 147205;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,unloadGridNum);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
unloadGridNum = 0;
|
|
}
|
|
public int unloadGridNum;
|
|
}
|
|
public partial class ResUnloadTradeItem : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResUnloadTradeItem(this);
|
|
}
|
|
|
|
public const uint MsgID = 147106;
|
|
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:
|
|
isSuccess = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 2:
|
|
unloadGridNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
isSuccess = false;
|
|
unloadGridNum = 0;
|
|
}
|
|
public bool isSuccess;
|
|
public int unloadGridNum;
|
|
}
|
|
public partial class ResOppositeUnloadTradeItem : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOppositeUnloadTradeItem(this);
|
|
}
|
|
|
|
public const uint MsgID = 147107;
|
|
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:
|
|
unloadGridNum = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
unloadGridNum = 0;
|
|
}
|
|
public int unloadGridNum;
|
|
}
|
|
public partial class ReqLockTrade : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 147206;
|
|
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 ResLockTrade : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResLockTrade(this);
|
|
}
|
|
|
|
public const uint MsgID = 147108;
|
|
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:
|
|
isLockOK = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
isLockOK = false;
|
|
}
|
|
public bool isLockOK;
|
|
}
|
|
public partial class ResOppositeLockTrade : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOppositeLockTrade(this);
|
|
}
|
|
|
|
public const uint MsgID = 147109;
|
|
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)
|
|
{
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
}
|
|
}
|
|
public partial class ReqTrade : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 147207;
|
|
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 ResTrade : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResTrade(this);
|
|
}
|
|
|
|
public const uint MsgID = 147110;
|
|
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:
|
|
isSuccess = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
isSuccess = false;
|
|
}
|
|
public bool isSuccess;
|
|
}
|
|
}
|
|
|