ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSVC/Mariusnet_Defs.h
Revision: 587
Committed: Mon Feb 7 05:34:47 2011 UTC (14 years, 8 months ago) by gumby
Content type: text/x-chdr
File size: 3884 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
170 ColorStuff : TColorInfo;
171 int SenderId;
172 int TargetId;
173 char Message[256];
174 }
175
176
177 typedef struct
178 {
179 marius_header header;
180 union
181 {
182 m_player_login login;
183 m_password password;
184 m_localization localization;
185 m_salt salt;
186 m_login_success login_success;
187 m_login_denied login_denied;
188 m_roomlist roomlist;
189 m_chatroom_join chatroom_join;
190 m_player_info player_info;
191 m_motd motd;
192 };
193 } marius_packet;