ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSVC/Mariusnet_Defs.h
Revision: 588
Committed: Fri Feb 11 08:21:14 2011 UTC (14 years, 8 months ago) by gumby
Content type: text/x-chdr
File size: 4935 byte(s)
Log Message:

File Contents

# Content
1 //to client
2 enum
3 {
4 pt_RoomList = 0x0000,
5 pt_PlayerList = 0x0001,
6 pt_GameList = 0x0002,
7 pt_UserLoggedIn = 0x7,//0x0003,
8 pt_EncryptionKey = 0x0006,
9 pt_LoginInfo = 0x3,//0x0007,
10 pt_PlayerInfo = 0x0008,
11 pt_PlayerId = 0x0009,
12 pt_BlueBarMsg = 0x000A,
13 pt_PasswordAck = 0x000C,
14 pt_FindResponse = 0x000E,
15 pt_BuddyList = 0x000F, // the actual buddy list - i.e. names and such
16 pt_OrderList = 0x0010,
17 pt_PlayerInfoResponse = 0x0011,
18 pt_UpdatePlayerStats = 0x0012,
19 pt_UpdateBuddyList = 0x0013, // buddy status - i.e. online/offline
20 pt_UpdateOrderList = 0x0014,
21 };
22
23 //from client
24 enum
25 {
26 pt_PlayerLogin = 0x0064,
27 pt_ChatRoomLogin = 0x0065,
28 pt_RoomPlayerInfo = 0x0067,
29 pt_GameInfo = 0x0068,
30 pt_RemoveGame = 0x0069,
31 pt_SetPlayerState = 0x006B,
32 pt_Password = 0x006D,
33 pt_RequestRefresh = 0x006E,
34 pt_GamePlayerList = 0x006F, // game start player list
35 pt_PlayerScores = 0x0070, // game over player scores
36 pt_ResetScoring = 0x0071, // reset metaserver game scoring
37 pt_StartGame = 0x0072,
38 pt_Localization = 0x0073,
39 pt_GameSearchQuery = 0x0074,
40 pt_FindPlayer = 0x0075,
41 pt_BuddyListQuery = 0x0076, // request a buddy list update
42 pt_OrderListQuery = 0x0077,
43 pt_UpdateBuddy = 0x0078, // add/remove buddy
44 pt_PlayerInfoQuery = 0x0079,
45 pt_SetPlayerStats = 0x007A, // change player stats (city/state/profile)
46 pt_ChatMessage = 0x00C8,
47 pt_WhisperMessage = 0x00C9,
48 pt_KeepAlive = 0x00CA,
49 pt_SessionKey = 0x00CB,
50 };
51
52 enum
53 {
54 ctMyth1 = 0,
55 ctMyth2 = 1,
56 // ctMyth3 = 2;
57 ctMarathon = 3,
58 ctMyth1Unified = 4,
59 ctMyth2Unified = 5,
60 ctMyth3Unified = 6,
61 };
62
63
64 typedef struct
65 {
66 short PacketSignature;// = 0xDEAD;
67 short PacketId;
68 unsigned int PacketSize;
69 } marius_header;
70
71 typedef struct
72 {
73 short Red;
74 short Green;
75 short Blue;
76 short Flags;
77 } m_colour;
78
79 typedef 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
91 typedef 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
107 typedef struct
108 {
109 short EncryptionType;
110 unsigned char salt[16];
111 } m_salt;
112
113 typedef struct
114 {
115 int one;
116 int two;
117 int three;
118 int zero;
119 } m_localization;
120
121 typedef struct
122 {
123 unsigned char passHash[16];
124 } m_password;
125
126 typedef struct
127 {
128 int userID;
129 short order;
130 short unused;
131 char Token[32];
132
133 } m_login_success;
134
135 typedef struct
136 {
137 int code;
138 char DenialMessage[];
139 } m_login_denied;
140
141 typedef 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
151 typedef struct
152 {
153 m_room Rooms[64];
154 } m_roomlist;
155
156 typedef struct
157 {
158 char RoomKey[32];
159 char Name[32];
160 } m_chatroom_join;
161
162 typedef struct
163 {
164 char Message[512];
165 } m_motd;
166
167 typedef struct
168 {
169 m_colour PrimaryColor;
170 m_colour SecondaryColor;
171 int SenderId;
172 int TargetId;
173 char Message[256];
174 } m_message;
175
176 typedef 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
202 typedef struct
203 {
204 short port;
205 short zero;
206 m_gamedescription g;
207 } m_announcegame;
208
209 typedef 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
225 typedef struct
226 {
227 m_gameinfo Games[];
228 } m_gamelist;
229 typedef 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;