|
发表于 2020-3-5 22:30:44
|
显示全部楼层
来自 中国–内蒙古–呼伦贝尔
- // Client is sending it's CD Key to Client Master
- #define S2A_INFO_DETAILED 'm' // New Query protocol, returns dedicated or not, + other performance info.
- #define S2A_INFO_SOURCE 'I' //
复制代码
- case S2A_INFO_SOURCE:
- Packet_InfoSource();
- break;
- case S2A_INFO_DETAILED:
- Packet_InfoDetailed();
- break;
复制代码
- void CHLMaster::Packet_InfoSource()
- {
- int protocol;
- char *name;
- char *map;
- char *mod;
- char *gamedir;
- char *game;
- int appid;
- int players;
- int maxplayers;
- int bots;
- int dedicated;
- char os[2];
- int password;
- int secure;
- sv_t *sv;
- msg_readcount = 5;
- protocol = MSG_ReadByte();
- name = MSG_ReadString();
- map = MSG_ReadString();
- gamedir = MSG_ReadString();
- game = MSG_ReadString();
- appid = MSG_ReadShort();
- players = MSG_ReadByte();
- maxplayers = MSG_ReadByte();
- bots = MSG_ReadByte();
- dedicated = MSG_ReadByte();
- os[0] = MSG_ReadByte();
- os[1] = 0;
- password = MSG_ReadByte();
- secure = MSG_ReadByte();
- }
复制代码
- void CHLMaster::Packet_InfoDetailed()
- {
- char *address;
- char *name;
- char *map;
- char *mod;
- char *gamedir;
- char *game;
- int players;
- int maxplayers;
- int protocol;
- int dedicated;
- char os[2];
- int password;
- int secure;
- int bots;
- sv_t *sv;
- msg_readcount = 5;
- address = MSG_ReadString();
- name = MSG_ReadString();
- map = MSG_ReadString();
- gamedir = MSG_ReadString();
- game = MSG_ReadString();
- players = MSG_ReadByte();
- maxplayers = MSG_ReadByte();
- protocol = MSG_ReadByte();
- dedicated = MSG_ReadByte();
- os[0] = MSG_ReadByte();
- os[1] = 0;
- password = MSG_ReadByte();
- if (MSG_ReadByte() == 1)
- {
- MSG_ReadString(); //Link
- MSG_ReadString(); //Download Link
- MSG_ReadByte(); //NULL
- MSG_ReadLong(); //Version
- MSG_ReadLong(); //Size
- MSG_ReadByte(); //Type
- MSG_ReadByte(); //DLL
- }
- secure = MSG_ReadByte();
- bots = MSG_ReadByte();
- }
复制代码 |
|