EQ2_Common_Structs.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. /*
  2. EQ2Emulator: Everquest II Server Emulator
  3. Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
  4. This file is part of EQ2Emulator.
  5. EQ2Emulator is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. EQ2Emulator is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef _EQ2COMMON_STRUCTS_
  17. #define _EQ2COMMON_STRUCTS_
  18. #define SPAWN_PACKET_SIZE 895
  19. #define EQUIPMENT_L_WEAPON_INDEX 0 //chars left hand weapon
  20. #define EQUIPMENT_R_WEAPON_INDEX 1 //chars right hand weapon
  21. #define EQUIPMENT_HELMET 2
  22. #pragma pack(1)
  23. struct KeyGen_Struct{
  24. int32 size;
  25. };
  26. struct KeyGen_End_Struct{
  27. int32 exponent_len;
  28. int8 exponent;
  29. };
  30. struct LoginByNumRequest_Struct{
  31. int32 account_id;
  32. int32 access_code;
  33. int16 version;
  34. int32 unknown2[5];
  35. };
  36. struct LS_LoginResponse{
  37. int8 reply_code; // 0 granted, 1 denied
  38. int16 unknown01;
  39. int8 unknown02;
  40. sint32 unknown03; // -1 denied, 0 granted
  41. sint32 unknown04;
  42. sint32 unknown05;
  43. sint32 unknown06;
  44. int8 unknown07;
  45. int8 unknown08;
  46. int8 unknown09;
  47. int8 unknown10;
  48. sint32 unknown11;
  49. int32 accountid;
  50. int16 unknown12;
  51. };
  52. #pragma pack()
  53. enum EQ2_EquipmentSlot {
  54. slot_primary=0,
  55. slot_secondary=1,
  56. slot_head=2,
  57. slot_chest=3,
  58. slot_shoulders=4,
  59. slot_forearms=5,
  60. slot_hands=6,
  61. slot_legs=7,
  62. slot_feet=8,
  63. slot_left_ring=9,
  64. slot_right_ring=10,
  65. slot_ears=11,
  66. slot_neck=12,
  67. slot_left_wrist=13,
  68. slot_right_wrist=14,
  69. slot_ranged=15,
  70. slot_ammo=16,
  71. slot_waist=17,
  72. slot_activate1=18,
  73. slot_activate2=19,
  74. slot_textures=20,
  75. slot_hair=21,
  76. slot_beard=22,
  77. slot_naked_chest=23,
  78. slot_naked_legs=24
  79. };
  80. struct EQ2_EquipmentItem{
  81. int16 type;
  82. EQ2_Color color;
  83. EQ2_Color highlight;
  84. };
  85. struct EQ2_Equipment{
  86. int16 equip_id[25];
  87. EQ2_Color color[25];
  88. EQ2_Color highlight[25];
  89. };
  90. #pragma pack(1)
  91. struct CharFeatures{
  92. int16 hair_type;
  93. int16 hair_face_type;
  94. int16 wing_type;
  95. int16 chest_type;
  96. int16 legs_type;
  97. sint8 eye_type[3];
  98. sint8 ear_type[3];
  99. sint8 eye_brow_type[3];
  100. sint8 cheek_type[3];
  101. sint8 lip_type[3];
  102. sint8 chin_type[3];
  103. sint8 nose_type[3];
  104. sint8 body_size;
  105. sint8 body_age;
  106. sint8 soga_eye_type[3];
  107. sint8 soga_ear_type[3];
  108. sint8 soga_eye_brow_type[3];
  109. sint8 soga_cheek_type[3];
  110. int16 soga_chest_type;
  111. int16 soga_legs_type;
  112. sint8 soga_lip_type[3];
  113. sint8 soga_chin_type[3];
  114. sint8 soga_nose_type[3];
  115. sint8 soga_body_size;
  116. sint8 soga_body_age;
  117. int16 soga_hair_type;
  118. int16 soga_hair_face_type;
  119. int16 combat_voice;
  120. int16 emote_voice;
  121. int16 mount_model_type;
  122. EQ2_Color mount_saddle_color;
  123. EQ2_Color mount_color;
  124. EQ2_Color skin_color;
  125. EQ2_Color eye_color;
  126. EQ2_Color hair_type_color;
  127. EQ2_Color hair_type_highlight_color;
  128. EQ2_Color hair_face_color;
  129. EQ2_Color hair_face_highlight_color;
  130. EQ2_Color hair_highlight_color;
  131. EQ2_Color wing_color1;
  132. EQ2_Color wing_color2;
  133. EQ2_Color shirt_color;
  134. EQ2_Color pants_color;
  135. EQ2_Color hair_color1;
  136. EQ2_Color hair_color2;
  137. EQ2_Color soga_skin_color;
  138. EQ2_Color soga_eye_color;
  139. EQ2_Color soga_hair_color1;
  140. EQ2_Color soga_hair_color2;
  141. EQ2_Color soga_hair_type_color;
  142. EQ2_Color soga_hair_type_highlight_color;
  143. EQ2_Color soga_hair_face_color;
  144. EQ2_Color soga_hair_face_highlight_color;
  145. EQ2_Color soga_hair_highlight_color;
  146. EQ2_Color model_color;
  147. EQ2_Color soga_model_color;
  148. };
  149. struct PositionData{
  150. int32 grid_id;
  151. int32 bad_grid_id;
  152. sint8 Speed1;
  153. sint8 Speed2;
  154. sint16 Dir1;
  155. sint16 Dir2;
  156. sint16 Pitch1;
  157. sint16 Pitch2;
  158. sint16 Roll;
  159. float X;
  160. float Y;
  161. float Z;
  162. float X2;
  163. float Y2;
  164. float Z2;
  165. float X3;
  166. float Y3;
  167. float Z3;
  168. float SpawnOrigX;
  169. float SpawnOrigY;
  170. float SpawnOrigZ;
  171. float SpawnOrigHeading;
  172. float SpawnOrigPitch;
  173. float SpawnOrigRoll;
  174. float SpeedX;
  175. float SpeedY;
  176. float SpeedZ;
  177. float SideSpeed;
  178. float VertSpeed;
  179. float ClientHeading1;
  180. float ClientHeading2;
  181. float ClientPitch;
  182. int16 collision_radius;
  183. int16 state;
  184. };
  185. struct AppearanceData {
  186. PositionData pos;
  187. int16 model_type;
  188. int16 soga_model_type;
  189. int16 activity_status;
  190. int16 visual_state;
  191. int16 action_state;
  192. int16 mood_state;
  193. int16 emote_state;
  194. int8 attackable;
  195. int8 icon;
  196. int8 hide_hood;
  197. int8 show_level;
  198. int8 locked_no_loot;
  199. int8 quest_flag;
  200. int8 heroic_flag;
  201. int8 show_command_icon;
  202. int8 display_hand_icon;
  203. int8 player_flag;
  204. int8 targetable;
  205. int8 display_name;
  206. char sub_title[255]; //Guild
  207. int32 display_hp;//0 = 100 percent
  208. int32 power_left; //bar not shown if >=100
  209. int8 adventure_class;
  210. int8 tradeskill_class;
  211. int8 level;
  212. int8 tradeskill_level;
  213. int8 min_level;
  214. int8 max_level;
  215. int8 difficulty;
  216. int16 visible; // 02 = normal, 15 = shadow
  217. char name[128]; //size around here somewhere
  218. char last_name[64];
  219. char prefix_title[128];
  220. char suffix_title[128];
  221. int8 race;
  222. int8 gender;
  223. int32 randomize;
  224. int8 lua_race_id;
  225. };
  226. struct Player_Update{
  227. /*0000*/ int32 activity;
  228. /*0004*/ float unknown2; // 1
  229. /*0008*/ float direction1;
  230. /*0012*/ float unknown3[8];
  231. /*0044*/ float speed;
  232. /*0048*/ float side_speed;
  233. /*0052*/ float vert_speed;
  234. /*0056*/ float orig_x;
  235. /*0060*/ float orig_y;
  236. /*0064*/ float orig_z;
  237. /*0068*/ float orig_x2;
  238. /*0072*/ float orig_y2;
  239. /*0076*/ float orig_z2;
  240. /*0080*/ float unknown5[3];
  241. /*0092*/ int32 unknown6;
  242. /*0096*/ float unknown7[3];
  243. /*0108*/ int32 unknown8;
  244. /*0112*/ int32 grid_location;
  245. /*0116*/ float x;
  246. /*0120*/ float y;
  247. /*0124*/ float z;
  248. /*0128*/ float direction2;
  249. /*0132*/ float pitch;
  250. /*0136*/ float unknown10;
  251. /*0140*/ float speed_x;
  252. /*0144*/ float speed_y;
  253. /*0148*/ float speed_z;
  254. };
  255. struct Player_Update283 {
  256. /*0000*/ int32 activity;
  257. /*0004*/ int32 movement_mode; // 1
  258. /*0008*/ float direction1;
  259. /*0012*/ float desiredpitch;
  260. /*0016*/ float desired_heading_speed;
  261. /*0020*/ float desired_pitch_speed;
  262. /*0024*/ float collision_radius;
  263. /*0028*/ float collision_scale;
  264. /*0032*/ float temp_scale;
  265. /*0036*/ float speed_modifier;
  266. /*0040*/ float swim_speed_modifier;
  267. /*0044*/ float speed;
  268. /*0048*/ float side_speed;
  269. /*0052*/ float vert_speed;
  270. /*0056*/ float orig_x;
  271. /*0060*/ float orig_y;
  272. /*0064*/ float orig_z;
  273. /*0068*/ float orig_x2;
  274. /*0072*/ float orig_y2;
  275. /*0076*/ float orig_z2;
  276. /*0080*/ int32 face_actor_id;
  277. /*0084*/ int32 face_actor_range;
  278. /*0088*/ int32 grid_location;
  279. /*0092*/ float x;
  280. /*0096*/ float y;
  281. /*0100*/ float z;
  282. /*0104*/ float direction2;
  283. /*0108*/ float pitch;
  284. /*0112*/ float roll;
  285. /*0116*/ float speed_x;
  286. /*0120*/ float speed_y;
  287. /*0124*/ float speed_z;
  288. };//0128
  289. struct Player_Update1096{
  290. /*0000*/ int32 activity;
  291. /*0004*/ float unknown2; // 1
  292. /*0008*/ float direction1;
  293. /*0012*/ float unknown3[8];
  294. /*0044*/ float unk_speed;
  295. /*0048*/ float speed;
  296. /*0052*/ float side_speed;
  297. /*0056*/ float vert_speed;
  298. /*0060*/ float orig_x;
  299. /*0064*/ float orig_y;
  300. /*0068*/ float orig_z;
  301. /*0072*/ float orig_x2;
  302. /*0076*/ float orig_y2;
  303. /*0080*/ float orig_z2;
  304. /*0092*/ float unknown5[3];
  305. /*0096*/ int32 unknown6;
  306. /*0108*/ float unknown7[3];
  307. /*0112*/ int32 unknown8;
  308. /*0116*/ int32 grid_location;
  309. /*0120*/ float x;
  310. /*0124*/ float y;
  311. /*0128*/ float z;
  312. /*0132*/ float direction2;
  313. /*0136*/ float pitch;
  314. /*0140*/ float unknown10;
  315. /*0144*/ float speed_x;
  316. /*0148*/ float speed_y;
  317. /*0152*/ float speed_z;
  318. };
  319. struct Player_Update1144{
  320. /*0000*/ int32 activity;
  321. /*0004*/ float unknown2; // 1
  322. /*0008*/ float direction1;
  323. /*0012*/ float unknown3[12];
  324. /*0044*/ float unk_speed;
  325. /*0048*/ float speed;
  326. /*0052*/ float side_speed;
  327. /*0056*/ float vert_speed;
  328. /*0060*/ float orig_x;
  329. /*0064*/ float orig_y;
  330. /*0068*/ float orig_z;
  331. /*0072*/ float orig_x2;
  332. /*0076*/ float orig_y2;
  333. /*0080*/ float orig_z2;
  334. /*0092*/ float unknown5[3];
  335. /*0096*/ int32 unknown6;
  336. /*0108*/ float unknown7[3];
  337. /*0112*/ int32 unknown8;
  338. /*0116*/ int32 grid_location;
  339. /*0120*/ float x;
  340. /*0124*/ float y;
  341. /*0128*/ float z;
  342. /*0132*/ float direction2;
  343. /*0136*/ float pitch;
  344. /*0140*/ float unknown10;
  345. /*0144*/ float speed_x;
  346. /*0148*/ float speed_y;
  347. /*0152*/ float speed_z;
  348. };
  349. #pragma pack()
  350. #endif