source: Daodan/MSVC/Mariusnet_Defs.h@ 588

Last change on this file since 588 was 588, checked in by gumby, 14 years ago
File size: 4.8 KB
Line 
1//to client
2enum
3{
4pt_RoomList = 0x0000,
5pt_PlayerList = 0x0001,
6pt_GameList = 0x0002,
7pt_UserLoggedIn = 0x7,//0x0003,
8pt_EncryptionKey = 0x0006,
9pt_LoginInfo = 0x3,//0x0007,
10pt_PlayerInfo = 0x0008,
11pt_PlayerId = 0x0009,
12pt_BlueBarMsg = 0x000A,
13pt_PasswordAck = 0x000C,
14pt_FindResponse = 0x000E,
15pt_BuddyList = 0x000F, // the actual buddy list - i.e. names and such
16pt_OrderList = 0x0010,
17pt_PlayerInfoResponse = 0x0011,
18pt_UpdatePlayerStats = 0x0012,
19pt_UpdateBuddyList = 0x0013, // buddy status - i.e. online/offline
20pt_UpdateOrderList = 0x0014,
21};
22
23//from client
24enum
25{
26pt_PlayerLogin = 0x0064,
27pt_ChatRoomLogin = 0x0065,
28pt_RoomPlayerInfo = 0x0067,
29pt_GameInfo = 0x0068,
30pt_RemoveGame = 0x0069,
31pt_SetPlayerState = 0x006B,
32pt_Password = 0x006D,
33pt_RequestRefresh = 0x006E,
34pt_GamePlayerList = 0x006F, // game start player list
35pt_PlayerScores = 0x0070, // game over player scores
36pt_ResetScoring = 0x0071, // reset metaserver game scoring
37pt_StartGame = 0x0072,
38pt_Localization = 0x0073,
39pt_GameSearchQuery = 0x0074,
40pt_FindPlayer = 0x0075,
41pt_BuddyListQuery = 0x0076, // request a buddy list update
42pt_OrderListQuery = 0x0077,
43pt_UpdateBuddy = 0x0078, // add/remove buddy
44pt_PlayerInfoQuery = 0x0079,
45pt_SetPlayerStats = 0x007A, // change player stats (city/state/profile)
46pt_ChatMessage = 0x00C8,
47pt_WhisperMessage = 0x00C9,
48pt_KeepAlive = 0x00CA,
49pt_SessionKey = 0x00CB,
50};
51
52enum
53{
54ctMyth1 = 0,
55ctMyth2 = 1,
56// ctMyth3 = 2;
57ctMarathon = 3,
58ctMyth1Unified = 4,
59ctMyth2Unified = 5,
60ctMyth3Unified = 6,
61};
62
63
64typedef struct
65{
66 short PacketSignature;// = 0xDEAD;
67 short PacketId;
68 unsigned int PacketSize;
69} marius_header;
70
71typedef struct
72{
73 short Red;
74 short Green;
75 short Blue;
76 short Flags;
77} m_colour;
78
79typedef struct
80{
81 char Icon;
82 char pad;
83 short Flags; // 0=active, 1=inactive, in a game, grayed out, can't see chat
84 m_colour Colors[2];
85 short orderIndex;
86 short clientVersion;
87 char stupid_14byte_pad[14];
88 char Name[112]; // 2 #0 terminated fields - Name, Team Name
89} m_player_info;
90
91typedef struct
92{
93 short Platform; //Windows - 1
94 short MetaVersion; //0
95 char pad[3];
96 char UpdateAppearance; // save player settings on server, change to bits, bit 0=update, bit 1=demo
97 int PlayerId; //0
98 short EncryptionType; //0 - kCRYPT_PLAINTEXT, screw encryption for now
99 short PlayerInfoSize; //40 + strlen(playername) + strlen(plaerteam(
100 char AppName[32]; //MARATHON...later ONI ;)
101 char BuildDate[32]; //_DATE_
102 char BuildTime[32]; //_TIME_
103 char LoginId[32]; //username
104 m_player_info PlayerInfo;
105} m_player_login;
106
107typedef struct
108{
109 short EncryptionType;
110 unsigned char salt[16];
111} m_salt;
112
113typedef struct
114{
115 int one;
116 int two;
117 int three;
118 int zero;
119} m_localization;
120
121typedef struct
122{
123 unsigned char passHash[16];
124} m_password;
125
126typedef struct
127{
128 int userID;
129 short order;
130 short unused;
131 char Token[32];
132
133} m_login_success;
134
135typedef struct
136{
137 int code;
138 char DenialMessage[];
139} m_login_denied;
140
141typedef struct
142{
143 short RoomIndex;
144 short PlayerCount;
145 int IPAddress;
146 short Port;
147 short GameCount;
148 int pad[3];
149} m_room;
150
151typedef struct
152{
153 m_room Rooms[64];
154} m_roomlist;
155
156typedef struct
157{
158 char RoomKey[32];
159 char Name[32];
160} m_chatroom_join;
161
162typedef struct
163{
164 char Message[512];
165} m_motd;
166
167typedef struct
168{
169 m_colour PrimaryColor;
170 m_colour SecondaryColor;
171 int SenderId;
172 int TargetId;
173 char Message[256];
174} m_message;
175
176typedef struct
177{
178 short unknown16;
179 short type;
180 int options;
181 int timelimit;
182 int checksum;
183 short difficulty;
184 short maxplayers;
185 short teamrandomseed;
186 short maxteams; //-1
187 int planningtime;
188 int unusedint;
189 int unusedint_2;
190 short unknown16_2;
191 short pluginflag;
192 char pluginlist[512];
193 int clientversion;//0xc136e436
194 int unknownint;
195 short status;
196 short numplayers;
197 char action;
198 char pad[3];
199 char Buffer[128];
200} m_gamedescription;
201
202typedef struct
203{
204 short port;
205 short zero;
206 m_gamedescription g;
207} m_announcegame;
208
209typedef struct
210{
211 unsigned int gameID;
212 unsigned int ipAddress;
213 unsigned short port;
214 unsigned char verb;
215 unsigned char gameEnable;
216 unsigned int timeRemaining;
217 unsigned int hostPlayerID;
218 unsigned short len;
219 int unused1;
220 int unused2;
221 short pad;
222 m_gamedescription g;
223} m_gameinfo;
224
225typedef struct
226{
227 m_gameinfo Games[];
228} m_gamelist;
229typedef struct
230{
231 marius_header header;
232 union
233 {
234 m_player_login login;
235 m_password password;
236 m_localization localization;
237 m_salt salt;
238 m_login_success login_success;
239 m_login_denied login_denied;
240 m_roomlist roomlist;
241 m_chatroom_join chatroom_join;
242 m_player_info player_info;
243 m_motd motd;
244 m_message message;
245 m_announcegame newgame;
246 m_gamelist gamelist;
247 };
248} marius_packet;
Note: See TracBrowser for help on using the repository browser.