840 lines
28 KiB
C#
840 lines
28 KiB
C#
|
using System.Collections.Generic;
|
||
|
using Thousandto.Plugins.Common;
|
||
|
using Thousandto.Code.Logic.Network;
|
||
|
|
||
|
namespace MSG_SoulBeast
|
||
|
{
|
||
|
public partial class SoulCostItem : 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.ReadInt64(ref readPos);
|
||
|
break;
|
||
|
case 2 :
|
||
|
count = 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,id);
|
||
|
ProtoBufUtils.WriteInt32(2,count);
|
||
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
||
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
id = 0;
|
||
|
count = 0;
|
||
|
}
|
||
|
public long id;
|
||
|
public int count;
|
||
|
}
|
||
|
public partial class ReqSoulBeastFight : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 168201;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,soulId);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
soulId = 0;
|
||
|
}
|
||
|
public int soulId;
|
||
|
}
|
||
|
public partial class ReqSoulBeastEquipWear : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 168202;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,soulBeastId);
|
||
|
for (int i = 0; i < equipIds.Count; i++)
|
||
|
{
|
||
|
ProtoBufUtils.WriteInt64(2,equipIds[i]);
|
||
|
}
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
soulBeastId = 0;
|
||
|
if(equipIds != null)
|
||
|
{
|
||
|
equipIds.Clear();
|
||
|
}
|
||
|
}
|
||
|
public int soulBeastId;
|
||
|
public List<long> equipIds = new List<long>();
|
||
|
}
|
||
|
public partial class ReqSoulBeastEquipDown : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 168203;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,soulBeastId);
|
||
|
for (int i = 0; i < equipIds.Count; i++)
|
||
|
{
|
||
|
ProtoBufUtils.WriteInt64(2,equipIds[i]);
|
||
|
}
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
soulBeastId = 0;
|
||
|
if(equipIds != null)
|
||
|
{
|
||
|
equipIds.Clear();
|
||
|
}
|
||
|
}
|
||
|
public int soulBeastId;
|
||
|
public List<long> equipIds = new List<long>();
|
||
|
}
|
||
|
public partial class ReqSoulBeastEquipUp : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 168204;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,soulId);
|
||
|
ProtoBufUtils.WriteInt64(2,fixEquipId);
|
||
|
for (int i = 0; i < costs.Count; i++)
|
||
|
{
|
||
|
if(costs != null)
|
||
|
{
|
||
|
costs[i].WriteMessage(3);
|
||
|
}
|
||
|
}
|
||
|
ProtoBufUtils.WriteBoolean(4,needDouble);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
soulId = 0;
|
||
|
fixEquipId = 0;
|
||
|
if(costs != null)
|
||
|
{
|
||
|
costs.Clear();
|
||
|
}
|
||
|
needDouble = false;
|
||
|
}
|
||
|
public int soulId;
|
||
|
public long fixEquipId;
|
||
|
public List<SoulCostItem> costs = new List<SoulCostItem>();
|
||
|
public bool needDouble;
|
||
|
}
|
||
|
public partial class ReqAddGrid : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 168205;
|
||
|
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 ReqSell : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 168206;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
for (int i = 0; i < id.Count; i++)
|
||
|
{
|
||
|
ProtoBufUtils.WriteFixed64(1,id[i]);
|
||
|
}
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(id != null)
|
||
|
{
|
||
|
id.Clear();
|
||
|
}
|
||
|
}
|
||
|
public List<ulong> id = new List<ulong>();
|
||
|
}
|
||
|
public partial class ResSoulBeastBag : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSoulBeastBag(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168102;
|
||
|
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(equips == null)
|
||
|
{
|
||
|
equips = new List<SoulBeastEquip>();
|
||
|
}
|
||
|
equips.Add(new SoulBeastEquip());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
equips[equips.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
case 2:
|
||
|
if(items == null)
|
||
|
{
|
||
|
items = new List<itemModel>();
|
||
|
}
|
||
|
items.Add(new itemModel());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
items[items.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(equips != null)
|
||
|
{
|
||
|
equips.Clear();
|
||
|
}
|
||
|
if(items != null)
|
||
|
{
|
||
|
items.Clear();
|
||
|
}
|
||
|
}
|
||
|
public List<SoulBeastEquip> equips = new List<SoulBeastEquip>();
|
||
|
public List<itemModel> items = new List<itemModel>();
|
||
|
}
|
||
|
public partial class ResSoulBeastList : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSoulBeastList(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168103;
|
||
|
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(beasts == null)
|
||
|
{
|
||
|
beasts = new List<SoulBeast>();
|
||
|
}
|
||
|
beasts.Add(new SoulBeast());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
beasts[beasts.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(beasts != null)
|
||
|
{
|
||
|
beasts.Clear();
|
||
|
}
|
||
|
}
|
||
|
public List<SoulBeast> beasts = new List<SoulBeast>();
|
||
|
}
|
||
|
public partial class ResSoulBeastInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSoulBeastInfo(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168104;
|
||
|
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(beast == null)
|
||
|
{
|
||
|
beast = new SoulBeast();
|
||
|
}
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
beast.ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(beast != null)
|
||
|
{
|
||
|
beast.Clear();
|
||
|
}
|
||
|
}
|
||
|
public SoulBeast beast;
|
||
|
}
|
||
|
public partial class ResSoulBeastEquipInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSoulBeastEquipInfo(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168107;
|
||
|
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(equip == null)
|
||
|
{
|
||
|
equip = new SoulBeastEquip();
|
||
|
}
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
equip.ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
case 2:
|
||
|
soulId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(equip != null)
|
||
|
{
|
||
|
equip.Clear();
|
||
|
}
|
||
|
soulId = 0;
|
||
|
}
|
||
|
public SoulBeastEquip equip;
|
||
|
public int soulId;
|
||
|
}
|
||
|
public partial class ResSoulBeastEquipAdd : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSoulBeastEquipAdd(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168108;
|
||
|
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(equips == null)
|
||
|
{
|
||
|
equips = new List<SoulBeastEquip>();
|
||
|
}
|
||
|
equips.Add(new SoulBeastEquip());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
equips[equips.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
case 2:
|
||
|
reason = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(equips != null)
|
||
|
{
|
||
|
equips.Clear();
|
||
|
}
|
||
|
reason = 0;
|
||
|
}
|
||
|
public List<SoulBeastEquip> equips = new List<SoulBeastEquip>();
|
||
|
public int reason;
|
||
|
}
|
||
|
public partial class ResSoulBeastItemAdd : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSoulBeastItemAdd(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168109;
|
||
|
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(items == null)
|
||
|
{
|
||
|
items = new List<itemModel>();
|
||
|
}
|
||
|
items.Add(new itemModel());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
items[items.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
case 2:
|
||
|
reason = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(items != null)
|
||
|
{
|
||
|
items.Clear();
|
||
|
}
|
||
|
reason = 0;
|
||
|
}
|
||
|
public List<itemModel> items = new List<itemModel>();
|
||
|
public int reason;
|
||
|
}
|
||
|
public partial class ResSoulBeastGridNum : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSoulBeastGridNum(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168110;
|
||
|
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:
|
||
|
num = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
num = 0;
|
||
|
}
|
||
|
public int num;
|
||
|
}
|
||
|
public partial class ResDeleteSoulBeast : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResDeleteSoulBeast(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168111;
|
||
|
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(deleteEquipIds == null)
|
||
|
{
|
||
|
deleteEquipIds = new List<long>();
|
||
|
}
|
||
|
deleteEquipIds.Add(ProtoBufUtils.ReadInt64(ref readPos));
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(deleteEquipIds != null)
|
||
|
{
|
||
|
deleteEquipIds.Clear();
|
||
|
}
|
||
|
}
|
||
|
public List<long> deleteEquipIds = new List<long>();
|
||
|
}
|
||
|
public partial class ResSoulBeastItemUpdate : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSoulBeastItemUpdate(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 168112;
|
||
|
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(items == null)
|
||
|
{
|
||
|
items = new List<itemModel>();
|
||
|
}
|
||
|
items.Add(new itemModel());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
items[items.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
case 2:
|
||
|
reason = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(items != null)
|
||
|
{
|
||
|
items.Clear();
|
||
|
}
|
||
|
reason = 0;
|
||
|
}
|
||
|
public List<itemModel> items = new List<itemModel>();
|
||
|
public int reason;
|
||
|
}
|
||
|
public partial class SoulBeast : 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 :
|
||
|
soulId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2 :
|
||
|
fight = ProtoBufUtils.ReadBoolean(ref readPos);
|
||
|
break;
|
||
|
case 3 :
|
||
|
if(equips == null)
|
||
|
{
|
||
|
equips = new List<SoulBeastEquip>();
|
||
|
}
|
||
|
equips.Add(new SoulBeastEquip());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
equips[equips.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
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,soulId);
|
||
|
ProtoBufUtils.WriteBoolean(2,fight);
|
||
|
for (int i = 0; i < equips.Count; i++)
|
||
|
{
|
||
|
if(equips != null)
|
||
|
{
|
||
|
equips[i].WriteMessage(3);
|
||
|
}
|
||
|
}
|
||
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
||
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
soulId = 0;
|
||
|
fight = false;
|
||
|
if(equips != null)
|
||
|
{
|
||
|
equips.Clear();
|
||
|
}
|
||
|
}
|
||
|
public int soulId;
|
||
|
public bool fight;
|
||
|
public List<SoulBeastEquip> equips = new List<SoulBeastEquip>();
|
||
|
}
|
||
|
public partial class SoulBeastEquip : 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 :
|
||
|
itemId = ProtoBufUtils.ReadFixed64(ref readPos);
|
||
|
break;
|
||
|
case 2 :
|
||
|
itemModelId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 3 :
|
||
|
level = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 4 :
|
||
|
curExp = 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.WriteFixed64(1,itemId);
|
||
|
ProtoBufUtils.WriteInt32(2,itemModelId);
|
||
|
ProtoBufUtils.WriteInt32(3,level);
|
||
|
ProtoBufUtils.WriteInt32(4,curExp);
|
||
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
||
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
itemId = 0;
|
||
|
itemModelId = 0;
|
||
|
level = 0;
|
||
|
curExp = 0;
|
||
|
}
|
||
|
public ulong itemId;
|
||
|
public int itemModelId;
|
||
|
public int level;
|
||
|
public int curExp;
|
||
|
}
|
||
|
public partial class itemModel : 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 :
|
||
|
itemModelId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2 :
|
||
|
num = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 3 :
|
||
|
itemId = ProtoBufUtils.ReadFixed64(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,itemModelId);
|
||
|
ProtoBufUtils.WriteInt32(2,num);
|
||
|
ProtoBufUtils.WriteFixed64(3,itemId);
|
||
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
||
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
itemModelId = 0;
|
||
|
num = 0;
|
||
|
itemId = 0;
|
||
|
}
|
||
|
public int itemModelId;
|
||
|
public int num;
|
||
|
public ulong itemId;
|
||
|
}
|
||
|
}
|
||
|
|