2025-01-25 04:38:09 +08:00

312 lines
9.7 KiB
C#

using System.Collections.Generic;
using Thousandto.Plugins.Common;
using Thousandto.Code.Logic.Network;
namespace MSG_Soul
{
public partial class Soul : 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.ReadUint64(ref readPos);
break;
case 2 :
dataId = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 3 :
level = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 4 :
exp = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 5 :
location = 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.WriteUint64(1,id);
ProtoBufUtils.WriteInt32(2,dataId);
ProtoBufUtils.WriteInt32(3,level);
ProtoBufUtils.WriteInt32(4,exp);
ProtoBufUtils.WriteInt32(5,location);
ProtoBufUtils.SetVEndIndex(subItemInfoId);
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
}
public void Clear()
{
id = 0;
dataId = 0;
level = 0;
exp = 0;
location = 0;
}
public ulong id;
public int dataId;
public int level;
public int exp;
public int location;
}
public partial class ReqSmeltSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 133201;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteUint64(1,soulID);
for (int i = 0; i < ids.Count; i++)
{
ProtoBufUtils.WriteUint64(2,ids[i]);
}
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
soulID = 0;
if(ids != null)
{
ids.Clear();
}
}
public ulong soulID;
public List<ulong> ids = new List<ulong>();
}
public partial class ReqHuntSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 133202;
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 ReqOneKeyHuntSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 133203;
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 ReqActivateHunter : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 133204;
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 ReqWearSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 133205;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteUint64(1,soulID);
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
soulID = 0;
}
public ulong soulID;
}
public partial class ResUpdateSoul : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResUpdateSoul(this);
}
public const uint MsgID = 133101;
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(souls == null)
{
souls = new List<Soul>();
}
souls.Add(new Soul());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
souls[souls.Count - 1].ReadMessage(ref readPos, totalCount);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(souls != null)
{
souls.Clear();
}
}
public List<Soul> souls = new List<Soul>();
}
public partial class ResUpdateHunterLevel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResUpdateHunterLevel(this);
}
public const uint MsgID = 133102;
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:
level = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
level = 0;
}
public int level;
}
public partial class ResDeleteSoul : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResDeleteSoul(this);
}
public const uint MsgID = 133103;
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(ids == null)
{
ids = new List<ulong>();
}
ids.Add(ProtoBufUtils.ReadUint64(ref readPos));
break;
default:
break;
}
}
}
}
public void Clear()
{
if(ids != null)
{
ids.Clear();
}
}
public List<ulong> ids = new List<ulong>();
}
}