Files
Main/Assets/Code/Logic/_NetMessage/Messages/CrossRankEx.cs
2025-01-25 04:38:09 +08:00

360 lines
12 KiB
C#

using System.Collections.Generic;
using Thousandto.Plugins.Common;
using Thousandto.Code.Logic.Network;
namespace MSG_CrossRank
{
public partial class CrossRankInfo : 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 :
roleId = ProtoBufUtils.ReadUint64(ref readPos);
break;
case 2 :
rank = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 3 :
roleName = ProtoBufUtils.ReadString(ref readPos);
break;
case 4 :
serverId = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 5 :
career = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 6 :
stateVip = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 7 :
level = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 8 :
fightPower = ProtoBufUtils.ReadInt64(ref readPos);
break;
case 9 :
rankData = ProtoBufUtils.ReadString(ref readPos);
break;
case 10 :
if(facade == null)
{
facade = new MSG_Common.FacadeAttribute();
}
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
facade.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.WriteUint64(1,roleId);
ProtoBufUtils.WriteInt32(2,rank);
ProtoBufUtils.WriteString(3,roleName);
ProtoBufUtils.WriteInt32(4,serverId);
ProtoBufUtils.WriteInt32(5,career);
ProtoBufUtils.WriteInt32(6,stateVip);
ProtoBufUtils.WriteInt32(7,level);
ProtoBufUtils.WriteInt64(8,fightPower);
ProtoBufUtils.WriteString(9,rankData);
if(facade != null)
{
facade.WriteMessage(10);
}
ProtoBufUtils.SetVEndIndex(subItemInfoId);
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
}
public void Clear()
{
roleId = 0;
rank = 0;
roleName = null;
serverId = 0;
career = 0;
stateVip = 0;
level = 0;
fightPower = 0;
rankData = null;
if(facade != null)
{
facade.Clear();
}
}
public ulong roleId;
public int rank;
public string roleName;
public int serverId;
public int career;
public int stateVip;
public int level;
public long fightPower;
public string rankData;
public MSG_Common.FacadeAttribute facade;
}
public partial class CrossTypeRankInfo : 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 :
type = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 2 :
if(crossRankList == null)
{
crossRankList = new List<CrossRankInfo>();
}
crossRankList.Add(new CrossRankInfo());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
crossRankList[crossRankList.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,type);
for (int i = 0; i < crossRankList.Count; i++)
{
if(crossRankList != null)
{
crossRankList[i].WriteMessage(2);
}
}
ProtoBufUtils.SetVEndIndex(subItemInfoId);
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
}
public void Clear()
{
type = 0;
if(crossRankList != null)
{
crossRankList.Clear();
}
}
public int type;
public List<CrossRankInfo> crossRankList = new List<CrossRankInfo>();
}
public partial class ReqCrossRankInfo : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 528201;
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 ReqG2PCrossRankInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ReqG2PCrossRankInfo(this);
}
public const uint MsgID = 528301;
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:
roleId = ProtoBufUtils.ReadUint64(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
roleId = 0;
}
public ulong roleId;
}
public partial class ReqG2PSyncCrossRankInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ReqG2PSyncCrossRankInfo(this);
}
public const uint MsgID = 528302;
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(syncRankInfoList == null)
{
syncRankInfoList = new List<CrossRankInfo>();
}
syncRankInfoList.Add(new CrossRankInfo());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
syncRankInfoList[syncRankInfoList.Count - 1].ReadMessage(ref readPos, totalCount);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(syncRankInfoList != null)
{
syncRankInfoList.Clear();
}
}
public List<CrossRankInfo> syncRankInfoList = new List<CrossRankInfo>();
}
public partial class ResCrossRankInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResCrossRankInfo(this);
}
public const uint MsgID = 528101;
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(crossTypeRankList == null)
{
crossTypeRankList = new List<CrossTypeRankInfo>();
}
crossTypeRankList.Add(new CrossTypeRankInfo());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
crossTypeRankList[crossTypeRankList.Count - 1].ReadMessage(ref readPos, totalCount);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(crossTypeRankList != null)
{
crossTypeRankList.Clear();
}
}
public List<CrossTypeRankInfo> crossTypeRankList = new List<CrossTypeRankInfo>();
}
public partial class P2GCrossWorldLv : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_P2GCrossWorldLv(this);
}
public const uint MsgID = 528401;
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:
crossWorldLv = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
crossWorldLv = 0;
}
public int crossWorldLv;
}
}