EQ2_Common_Structs.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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. struct EQ2_EquipmentItem{
  54. int16 type;
  55. EQ2_Color color;
  56. EQ2_Color highlight;
  57. };
  58. struct EQ2_Equipment{
  59. int16 equip_id[25];
  60. EQ2_Color color[25];
  61. EQ2_Color highlight[25];
  62. };
  63. #pragma pack(1)
  64. struct CharFeatures{
  65. int16 hair_type;
  66. int16 hair_face_type;
  67. int16 wing_type;
  68. int16 chest_type;
  69. int16 legs_type;
  70. sint8 eye_type[3];
  71. sint8 ear_type[3];
  72. sint8 eye_brow_type[3];
  73. sint8 cheek_type[3];
  74. sint8 lip_type[3];
  75. sint8 chin_type[3];
  76. sint8 nose_type[3];
  77. sint8 body_size;
  78. sint8 body_age;
  79. sint8 soga_eye_type[3];
  80. sint8 soga_ear_type[3];
  81. sint8 soga_eye_brow_type[3];
  82. sint8 soga_cheek_type[3];
  83. int16 soga_chest_type;
  84. int16 soga_legs_type;
  85. sint8 soga_lip_type[3];
  86. sint8 soga_chin_type[3];
  87. sint8 soga_nose_type[3];
  88. int16 soga_hair_type;
  89. int16 soga_hair_face_type;
  90. int16 combat_voice;
  91. int16 emote_voice;
  92. int16 mount_model_type;
  93. EQ2_Color mount_saddle_color;
  94. EQ2_Color mount_color;
  95. EQ2_Color skin_color;
  96. EQ2_Color eye_color;
  97. EQ2_Color hair_type_color;
  98. EQ2_Color hair_type_highlight_color;
  99. EQ2_Color hair_face_color;
  100. EQ2_Color hair_face_highlight_color;
  101. EQ2_Color hair_highlight_color;
  102. EQ2_Color wing_color1;
  103. EQ2_Color wing_color2;
  104. EQ2_Color shirt_color;
  105. EQ2_Color pants_color;
  106. EQ2_Color hair_color1;
  107. EQ2_Color hair_color2;
  108. EQ2_Color soga_skin_color;
  109. EQ2_Color soga_eye_color;
  110. EQ2_Color soga_hair_color1;
  111. EQ2_Color soga_hair_color2;
  112. EQ2_Color soga_hair_type_color;
  113. EQ2_Color soga_hair_type_highlight_color;
  114. EQ2_Color soga_hair_face_color;
  115. EQ2_Color soga_hair_face_highlight_color;
  116. EQ2_Color soga_hair_highlight_color;
  117. };
  118. struct PositionData{
  119. int32 grid_id;
  120. sint8 Speed1;
  121. sint8 Speed2;
  122. sint16 Dir1;
  123. sint16 Dir2;
  124. sint16 Pitch1;
  125. sint16 Pitch2;
  126. sint16 Roll;
  127. float X;
  128. float Y;
  129. float Z;
  130. float X2;
  131. float Y2;
  132. float Z2;
  133. float X3;
  134. float Y3;
  135. float Z3;
  136. float SpawnOrigX;
  137. float SpawnOrigY;
  138. float SpawnOrigZ;
  139. float SpawnOrigHeading;
  140. float SpawnOrigPitch;
  141. float SpawnOrigRoll;
  142. float SpeedX;
  143. float SpeedY;
  144. float SpeedZ;
  145. float SideSpeed;
  146. int16 collision_radius;
  147. int16 state;
  148. };
  149. struct AppearanceData {
  150. PositionData pos;
  151. int16 model_type;
  152. int16 soga_model_type;
  153. int16 activity_status;
  154. int16 visual_state;
  155. int16 action_state;
  156. int16 mood_state;
  157. int16 emote_state;
  158. int8 attackable;
  159. int8 icon;
  160. int8 hide_hood;
  161. int8 show_level;
  162. int8 locked_no_loot;
  163. int8 quest_flag;
  164. int8 heroic_flag;
  165. int8 show_command_icon;
  166. int8 display_hand_icon;
  167. int8 player_flag;
  168. int8 targetable;
  169. int8 display_name;
  170. char sub_title[255]; //Guild
  171. int32 display_hp;//0 = 100 percent
  172. int32 power_left; //bar not shown if >=100
  173. int8 adventure_class;
  174. int8 tradeskill_class;
  175. int8 level;
  176. int8 tradeskill_level;
  177. int8 min_level;
  178. int8 max_level;
  179. int8 encounter_level;
  180. int16 visible; // 02 = normal, 15 = shadow
  181. char name[128]; //size around here somewhere
  182. char last_name[64];
  183. char prefix_title[128];
  184. char suffix_title[128];
  185. int8 race;
  186. int8 gender;
  187. int32 randomize;
  188. int8 lua_race_id;
  189. };
  190. struct Player_Update{
  191. /*0000*/ int32 activity;
  192. /*0004*/ float unknown2; // 1
  193. /*0008*/ float direction1;
  194. /*0012*/ float unknown3[8];
  195. /*0044*/ float speed;
  196. /*0048*/ float side_speed;
  197. /*0052*/ float unknown4;
  198. /*0056*/ float orig_x;
  199. /*0060*/ float orig_y;
  200. /*0064*/ float orig_z;
  201. /*0068*/ float orig_x2;
  202. /*0072*/ float orig_y2;
  203. /*0076*/ float orig_z2;
  204. /*0080*/ float unknown5[3];
  205. /*0092*/ int32 unknown6;
  206. /*0096*/ float unknown7[3];
  207. /*0108*/ int32 unknown8;
  208. /*0112*/ int32 grid_location;
  209. /*0116*/ float x;
  210. /*0120*/ float y;
  211. /*0124*/ float z;
  212. /*0128*/ float direction2;
  213. /*0132*/ float pitch;
  214. /*0136*/ float unknown10;
  215. /*0140*/ float speed_x;
  216. /*0144*/ float speed_y;
  217. /*0148*/ float speed_z;
  218. };
  219. struct Player_Update1096{
  220. /*0000*/ int32 activity;
  221. /*0004*/ float unknown2; // 1
  222. /*0008*/ float direction1;
  223. /*0012*/ float unknown3[8];
  224. /*0044*/ float unk_speed;
  225. /*0048*/ float speed;
  226. /*0052*/ float side_speed;
  227. /*0056*/ float unknown4;
  228. /*0060*/ float orig_x;
  229. /*0064*/ float orig_y;
  230. /*0068*/ float orig_z;
  231. /*0072*/ float orig_x2;
  232. /*0076*/ float orig_y2;
  233. /*0080*/ float orig_z2;
  234. /*0092*/ float unknown5[3];
  235. /*0096*/ int32 unknown6;
  236. /*0108*/ float unknown7[3];
  237. /*0112*/ int32 unknown8;
  238. /*0116*/ int32 grid_location;
  239. /*0120*/ float x;
  240. /*0124*/ float y;
  241. /*0128*/ float z;
  242. /*0132*/ float direction2;
  243. /*0136*/ float pitch;
  244. /*0140*/ float unknown10;
  245. /*0144*/ float speed_x;
  246. /*0148*/ float speed_y;
  247. /*0152*/ float speed_z;
  248. };
  249. struct Player_Update1144{
  250. /*0000*/ int32 activity;
  251. /*0004*/ float unknown2; // 1
  252. /*0008*/ float direction1;
  253. /*0012*/ float unknown3[12];
  254. /*0044*/ float unk_speed;
  255. /*0048*/ float speed;
  256. /*0052*/ float side_speed;
  257. /*0056*/ float unknown4;
  258. /*0060*/ float orig_x;
  259. /*0064*/ float orig_y;
  260. /*0068*/ float orig_z;
  261. /*0072*/ float orig_x2;
  262. /*0076*/ float orig_y2;
  263. /*0080*/ float orig_z2;
  264. /*0092*/ float unknown5[3];
  265. /*0096*/ int32 unknown6;
  266. /*0108*/ float unknown7[3];
  267. /*0112*/ int32 unknown8;
  268. /*0116*/ int32 grid_location;
  269. /*0120*/ float x;
  270. /*0124*/ float y;
  271. /*0128*/ float z;
  272. /*0132*/ float direction2;
  273. /*0136*/ float pitch;
  274. /*0140*/ float unknown10;
  275. /*0144*/ float speed_x;
  276. /*0148*/ float speed_y;
  277. /*0152*/ float speed_z;
  278. };
  279. #pragma pack()
  280. #endif