Files
Main/Assets/Code/Logic/_NetMessage/Messages/PeopleSoulEx.cs

465 lines
15 KiB
C#
Raw Normal View History

2025-01-25 04:38:09 +08:00
using System.Collections.Generic;
using Thousandto.Plugins.Common;
using Thousandto.Code.Logic.Network;
namespace MSG_PeopleSoul
{
public partial class PeopleSoul : 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 :
config = 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,config);
ProtoBufUtils.WriteInt32(3,level);
ProtoBufUtils.WriteInt32(4,exp);
ProtoBufUtils.WriteInt32(5,location);
ProtoBufUtils.SetVEndIndex(subItemInfoId);
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
}
public void Clear()
{
id = 0;
config = 0;
level = 0;
exp = 0;
location = 0;
}
public ulong id;
public int config;
public int level;
public int exp;
public int location;
}
public partial class ResOnlineSendAllPeopleSoul : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResOnlineSendAllPeopleSoul(this);
}
public const uint MsgID = 164101;
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<PeopleSoul>();
}
souls.Add(new PeopleSoul());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
souls[souls.Count - 1].ReadMessage(ref readPos, totalCount);
break;
case 2:
operateType = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(souls != null)
{
souls.Clear();
}
operateType = 0;
}
public List<PeopleSoul> souls = new List<PeopleSoul>();
public int operateType;
}
public partial class ResDeletePeopleSoul : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResDeletePeopleSoul(this);
}
public const uint MsgID = 164102;
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;
case 2:
operateType = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(ids != null)
{
ids.Clear();
}
operateType = 0;
}
public List<ulong> ids = new List<ulong>();
public int operateType;
}
public partial class ResUpdatePeopleSoul : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResUpdatePeopleSoul(this);
}
public const uint MsgID = 164103;
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<PeopleSoul>();
}
souls.Add(new PeopleSoul());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
souls[souls.Count - 1].ReadMessage(ref readPos, totalCount);
break;
case 2:
operateType = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(souls != null)
{
souls.Clear();
}
operateType = 0;
}
public List<PeopleSoul> souls = new List<PeopleSoul>();
public int operateType;
}
public partial class ResAddNewPeopleSoul : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResAddNewPeopleSoul(this);
}
public const uint MsgID = 164104;
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<PeopleSoul>();
}
souls.Add(new PeopleSoul());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
souls[souls.Count - 1].ReadMessage(ref readPos, totalCount);
break;
case 2:
operateType = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(souls != null)
{
souls.Clear();
}
operateType = 0;
}
public List<PeopleSoul> souls = new List<PeopleSoul>();
public int operateType;
}
public partial class ResResolveSetting : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResResolveSetting(this);
}
public const uint MsgID = 164105;
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:
color = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
color = 0;
}
public int color;
}
public partial class ReqUpPeopleSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 164201;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteUint64(1,id);
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
id = 0;
}
public ulong id;
}
public partial class ReqGeneratePeopleSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 164202;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteInt32(1,targetId);
for (int i = 0; i < soulId.Count; i++)
{
ProtoBufUtils.WriteUint64(2,soulId[i]);
}
ProtoBufUtils.WriteInt32(3,type);
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
targetId = 0;
if(soulId != null)
{
soulId.Clear();
}
type = 0;
}
public int targetId;
public List<ulong> soulId = new List<ulong>();
public int type;
}
public partial class ReqWearPeopleSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 164203;
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 ReqDecomposePeopleSoul : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 164204;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
for (int i = 0; i < soulID.Count; i++)
{
ProtoBufUtils.WriteUint64(1,soulID[i]);
}
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
if(soulID != null)
{
soulID.Clear();
}
}
public List<ulong> soulID = new List<ulong>();
}
public partial class ReqOpenPanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 164205;
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 ReqResolveSetting : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 164206;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteInt32(1,color);
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
color = 0;
}
public int color;
}
}