685 lines
23 KiB
C#
685 lines
23 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_Server
|
|
{
|
|
public partial class gameServerInfo : 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 :
|
|
serverId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
serverIP = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 3 :
|
|
serverPort = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4 :
|
|
serverType = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5 :
|
|
platformMark = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 6 :
|
|
version = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 7 :
|
|
if(mapIds == null)
|
|
{
|
|
mapIds = new List<int>();
|
|
}
|
|
mapIds.Add(ProtoBufUtils.ReadInt32(ref readPos));
|
|
break;
|
|
case 8 :
|
|
serverOpentime = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
case 9 :
|
|
serverWorldlv = 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.WriteInt32(1,serverId);
|
|
ProtoBufUtils.WriteString(2,serverIP);
|
|
ProtoBufUtils.WriteInt32(3,serverPort);
|
|
ProtoBufUtils.WriteInt32(4,serverType);
|
|
ProtoBufUtils.WriteString(5,platformMark);
|
|
ProtoBufUtils.WriteString(6,version);
|
|
for (int i = 0; i < mapIds.Count; i++)
|
|
{
|
|
ProtoBufUtils.WriteInt32(7,mapIds[i]);
|
|
}
|
|
ProtoBufUtils.WriteString(8,serverOpentime);
|
|
ProtoBufUtils.WriteInt32(9,serverWorldlv);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
serverId = 0;
|
|
serverIP = null;
|
|
serverPort = 0;
|
|
serverType = 0;
|
|
platformMark = null;
|
|
version = null;
|
|
if(mapIds != null)
|
|
{
|
|
mapIds.Clear();
|
|
}
|
|
serverOpentime = null;
|
|
serverWorldlv = 0;
|
|
}
|
|
public int serverId;
|
|
public string serverIP;
|
|
public int serverPort;
|
|
public int serverType;
|
|
public string platformMark;
|
|
public string version;
|
|
public List<int> mapIds = new List<int>();
|
|
public string serverOpentime;
|
|
public int serverWorldlv;
|
|
}
|
|
public partial class G2PReqRegister : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_G2PReqRegister(this);
|
|
}
|
|
|
|
public const uint MsgID = 999302;
|
|
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(sinfo == null)
|
|
{
|
|
sinfo = new gameServerInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
sinfo.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
if(combinedIds == null)
|
|
{
|
|
combinedIds = new List<int>();
|
|
}
|
|
combinedIds.Add(ProtoBufUtils.ReadInt32(ref readPos));
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(sinfo != null)
|
|
{
|
|
sinfo.Clear();
|
|
}
|
|
if(combinedIds != null)
|
|
{
|
|
combinedIds.Clear();
|
|
}
|
|
}
|
|
public gameServerInfo sinfo;
|
|
public List<int> combinedIds = new List<int>();
|
|
}
|
|
public partial class P2GResRegister : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_P2GResRegister(this);
|
|
}
|
|
|
|
public const uint MsgID = 999402;
|
|
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:
|
|
publicId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
publicName = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
publicId = 0;
|
|
publicName = null;
|
|
}
|
|
public int publicId;
|
|
public string publicName;
|
|
}
|
|
public partial class G2FReqRegister : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_G2FReqRegister(this);
|
|
}
|
|
|
|
public const uint MsgID = 999303;
|
|
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(sinfo == null)
|
|
{
|
|
sinfo = new gameServerInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
sinfo.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(sinfo != null)
|
|
{
|
|
sinfo.Clear();
|
|
}
|
|
}
|
|
public gameServerInfo sinfo;
|
|
}
|
|
public partial class F2GResRegister : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_F2GResRegister(this);
|
|
}
|
|
|
|
public const uint MsgID = 999403;
|
|
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:
|
|
fsId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
fsName = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
fsId = 0;
|
|
fsName = null;
|
|
}
|
|
public int fsId;
|
|
public string fsName;
|
|
}
|
|
public partial class G2PReqFightServerList : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_G2PReqFightServerList(this);
|
|
}
|
|
|
|
public const uint MsgID = 999304;
|
|
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 P2GResFightServerList : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_P2GResFightServerList(this);
|
|
}
|
|
|
|
public const uint MsgID = 999404;
|
|
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(infoList == null)
|
|
{
|
|
infoList = new List<gameServerInfo>();
|
|
}
|
|
infoList.Add(new gameServerInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
infoList[infoList.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
if(social == null)
|
|
{
|
|
social = new gameServerInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
social.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(infoList != null)
|
|
{
|
|
infoList.Clear();
|
|
}
|
|
if(social != null)
|
|
{
|
|
social.Clear();
|
|
}
|
|
}
|
|
public List<gameServerInfo> infoList = new List<gameServerInfo>();
|
|
public gameServerInfo social;
|
|
}
|
|
public partial class G2PReqFightServer : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_G2PReqFightServer(this);
|
|
}
|
|
|
|
public const uint MsgID = 999305;
|
|
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:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
guildId = ProtoBufUtils.ReadFixed64(ref readPos);
|
|
break;
|
|
case 3:
|
|
kpId = ProtoBufUtils.ReadFixed64(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
type = 0;
|
|
guildId = 0;
|
|
kpId = 0;
|
|
}
|
|
public int type;
|
|
public ulong guildId;
|
|
public ulong kpId;
|
|
}
|
|
public partial class P2GResFightServer : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_P2GResFightServer(this);
|
|
}
|
|
|
|
public const uint MsgID = 999405;
|
|
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:
|
|
fightId = ProtoBufUtils.ReadFixed64(ref readPos);
|
|
break;
|
|
case 2:
|
|
if(info == null)
|
|
{
|
|
info = new gameServerInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
info.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 3:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4:
|
|
guildId = ProtoBufUtils.ReadFixed64(ref readPos);
|
|
break;
|
|
case 5:
|
|
kpId = ProtoBufUtils.ReadFixed64(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
fightId = 0;
|
|
if(info != null)
|
|
{
|
|
info.Clear();
|
|
}
|
|
type = 0;
|
|
guildId = 0;
|
|
kpId = 0;
|
|
}
|
|
public ulong fightId;
|
|
public gameServerInfo info;
|
|
public int type;
|
|
public ulong guildId;
|
|
public ulong kpId;
|
|
}
|
|
public partial class S2PRegisterServer : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_S2PRegisterServer(this);
|
|
}
|
|
|
|
public const uint MsgID = 999306;
|
|
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(sinfo == null)
|
|
{
|
|
sinfo = new gameServerInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
sinfo.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(sinfo != null)
|
|
{
|
|
sinfo.Clear();
|
|
}
|
|
}
|
|
public gameServerInfo sinfo;
|
|
}
|
|
public partial class P2SRegisterCallback : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_P2SRegisterCallback(this);
|
|
}
|
|
|
|
public const uint MsgID = 999406;
|
|
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:
|
|
publicId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
publicName = ProtoBufUtils.ReadString(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
publicId = 0;
|
|
publicName = null;
|
|
}
|
|
public int publicId;
|
|
public string publicName;
|
|
}
|
|
public partial class G2SRegisterServer : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_G2SRegisterServer(this);
|
|
}
|
|
|
|
public const uint MsgID = 999307;
|
|
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(server == null)
|
|
{
|
|
server = new gameServerInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
server.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(server != null)
|
|
{
|
|
server.Clear();
|
|
}
|
|
}
|
|
public gameServerInfo server;
|
|
}
|
|
public partial class S2GRegisterCallback : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_S2GRegisterCallback(this);
|
|
}
|
|
|
|
public const uint MsgID = 999407;
|
|
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:
|
|
serverId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
serverId = 0;
|
|
}
|
|
public int serverId;
|
|
}
|
|
}
|
|
|