Advertisement
Guest User

Untitled

a guest
Jan 27th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 71.22 KB | None | 0 0
  1. #pragma once
  2.  
  3. #ifdef USE_AHNLAB_HACKSHIELD
  4. #include "Hackshield.h"
  5. #include METIN2HS_INCLUDE_ANTICPXSVR
  6. #else
  7. #pragma pack(push) //기존 alignment 저장
  8. #pragma pack(8)
  9. #include "Locale_inc.h"
  10. #define ANTICPX_TRANS_BUFFER_MAX 400
  11.  
  12. typedef struct _AHNHS_TRANS_BUFFER
  13. {
  14. unsigned char byBuffer[ANTICPX_TRANS_BUFFER_MAX/* 송수신 패킷의 최대 크기 */];
  15. unsigned short nLength;
  16. } AHNHS_TRANS_BUFFER, *PAHNHS_TRANS_BUFFER;
  17.  
  18. #pragma pack(pop) // 기존 alignment 복구.
  19. #endif /* !USE_AHNLAB_HACKSHIELD */
  20.  
  21. #include "Locale.h"
  22. #include "../gamelib/RaceData.h"
  23. #include "../gamelib/ItemData.h"
  24.  
  25. typedef BYTE TPacketHeader;
  26.  
  27. enum
  28. {
  29. /////////////////////////////////////////////////
  30. // To Server
  31. // HEADER_BLANK is the not use(for future use)
  32. HEADER_CG_LOGIN = 1,
  33. HEADER_CG_ATTACK = 2,
  34. HEADER_CG_CHAT = 3,
  35. HEADER_CG_PLAYER_CREATE = 4, // 새로운 플래이어를 생성
  36. HEADER_CG_PLAYER_DESTROY = 5, // 플래이어를 삭제.
  37. HEADER_CG_PLAYER_SELECT = 6,
  38. HEADER_CG_CHARACTER_MOVE = 7,
  39. HEADER_CG_SYNC_POSITION = 8,
  40. HEADER_CG_DIRECT_ENTER = 9,
  41. HEADER_CG_ENTERGAME = 10,
  42. HEADER_CG_ITEM_USE = 11,
  43. HEADER_CG_ITEM_DROP = 12,
  44. HEADER_CG_ITEM_MOVE = 13,
  45. HEADER_CG_ITEM_PICKUP = 15,
  46. HEADER_CG_QUICKSLOT_ADD = 16,
  47. HEADER_CG_QUICKSLOT_DEL = 17,
  48. HEADER_CG_QUICKSLOT_SWAP = 18,
  49. HEADER_CG_WHISPER = 19,
  50. #ifdef NEW_ADD_INVENTORY
  51. ENVANTER_BLACK = 23,
  52. #endif
  53. HEADER_CG_ITEM_DROP2 = 20,
  54. HEADER_CG_ITEM_DESTROY = 21,
  55. //HEADER_BLANK21 = 21,
  56. //HEADER_BLANK22 = 22,
  57. //HEADER_BLANK22 = 23,
  58. //HEADER_BLANK24 = 24,
  59. //HEADER_BLANK25 = 25,
  60. HEADER_CG_ON_CLICK = 26,
  61. HEADER_CG_EXCHANGE = 27,
  62. HEADER_CG_CHARACTER_POSITION = 28,
  63. HEADER_CG_SCRIPT_ANSWER = 29,
  64. HEADER_CG_QUEST_INPUT_STRING = 30,
  65. HEADER_CG_QUEST_CONFIRM = 31,
  66. //HEADER_BLANK32 = 32,
  67. //HEADER_BLANK33 = 33,
  68. //HEADER_BLANK34 = 34,
  69. //HEADER_BLANK35 = 35,
  70. //HEADER_BLANK36 = 36,
  71. //HEADER_BLANK37 = 37,
  72. //HEADER_BLANK38 = 38,
  73. //HEADER_BLANK39 = 39,
  74. //HEADER_BLANK40 = 40,
  75. HEADER_CG_PVP = 41,
  76. //HEADER_BLANK42 = 42,
  77. //HEADER_BLANK43 = 43,
  78. //HEADER_BLANK44 = 44,
  79. //HEADER_BLANK45 = 45,
  80. //HEADER_BLANK46 = 46,
  81. //HEADER_BLANK47 = 47,
  82. //HEADER_BLANK48 = 48,
  83. //HEADER_BLANK49 = 49,
  84. HEADER_CG_SHOP = 50,
  85. HEADER_CG_FLY_TARGETING = 51,
  86. HEADER_CG_USE_SKILL = 52,
  87. HEADER_CG_ADD_FLY_TARGETING = 53,
  88. HEADER_CG_SHOOT = 54,
  89. HEADER_CG_MYSHOP = 55,
  90. //HEADER_BLANK56 = 56,
  91. //HEADER_BLANK57 = 57,
  92. //HEADER_BLANK58 = 58,
  93. //HEADER_BLANK59 = 59,
  94. HEADER_CG_ITEM_USE_TO_ITEM = 60,
  95. HEADER_CG_TARGET = 61,
  96. //HEADER_BLANK62 = 62,
  97. //HEADER_BLANK63 = 63,
  98. //HEADER_BLANK64 = 64,
  99. HEADER_CG_WARP = 65,
  100. HEADER_CG_SCRIPT_BUTTON = 66,
  101. HEADER_CG_MESSENGER = 67,
  102. //HEADER_BLANK68 = 68,
  103. HEADER_CG_MALL_CHECKOUT = 69,
  104. HEADER_CG_SAFEBOX_CHECKIN = 70, // 아이템을 창고에 넣는다.
  105. HEADER_CG_SAFEBOX_CHECKOUT = 71, // 아이템을 창고로 부터 빼온다.
  106. HEADER_CG_PARTY_INVITE = 72,
  107. HEADER_CG_PARTY_INVITE_ANSWER = 73,
  108. HEADER_CG_PARTY_REMOVE = 74,
  109. HEADER_CG_PARTY_SET_STATE = 75,
  110. HEADER_CG_PARTY_USE_SKILL = 76,
  111. HEADER_CG_SAFEBOX_ITEM_MOVE = 77,
  112. HEADER_CG_PARTY_PARAMETER = 78,
  113. //HEADER_BLANK68 = 79,
  114. HEADER_CG_GUILD = 80,
  115. HEADER_CG_ANSWER_MAKE_GUILD = 81,
  116. HEADER_CG_FISHING = 82,
  117. HEADER_CG_GIVE_ITEM = 83,
  118. //HEADER_BLANK84 = 84,
  119. //HEADER_BLANK85 = 85,
  120. //HEADER_BLANK86 = 86,
  121. //HEADER_BLANK87 = 87,
  122. //HEADER_BLANK88 = 88,
  123. //HEADER_BLANK89 = 89,
  124. HEADER_CG_EMPIRE = 90,
  125. //HEADER_BLANK91 = 91,
  126. //HEADER_BLANK92 = 92,
  127. //HEADER_BLANK93 = 93,
  128. //HEADER_BLANK94 = 94,
  129. //HEADER_BLANK95 = 95,
  130. HEADER_CG_REFINE = 96,
  131. //HEADER_BLANK97 = 97,
  132. //HEADER_BLANK98 = 98,
  133. //HEADER_BLANK99 = 99,
  134.  
  135. HEADER_CG_MARK_LOGIN = 100,
  136. HEADER_CG_MARK_CRCLIST = 101,
  137. HEADER_CG_MARK_UPLOAD = 102,
  138. HEADER_CG_MARK_IDXLIST = 104,
  139.  
  140. HEADER_CG_CRC_REPORT = 103,
  141.  
  142. HEADER_CG_HACK = 105,
  143. HEADER_CG_CHANGE_NAME = 106,
  144. HEADER_CG_SMS = 107,
  145. HEADER_CG_CHINA_MATRIX_CARD = 108,
  146. HEADER_CG_LOGIN2 = 109,
  147. HEADER_CG_DUNGEON = 110,
  148. HEADER_CG_LOGIN3 = 112,
  149. HEADER_CG_GUILD_SYMBOL_UPLOAD = 111,
  150. HEADER_CG_GUILD_SYMBOL_CRC = 113,
  151. HEADER_CG_SCRIPT_SELECT_ITEM = 114,
  152. HEADER_CG_LOGIN4 = 115,
  153. HEADER_CG_LOGIN5_OPENID = 116, //OpenID : 실행시 받은 인증키를 서버에 보냄.
  154.  
  155. HEADER_CG_RUNUP_MATRIX_ANSWER = 201,
  156. HEADER_CG_NEWCIBN_PASSPOD_ANSWER = 202,
  157.  
  158. HEADER_CG_HS_ACK = 203,
  159. HEADER_CG_XTRAP_ACK = 204,
  160.  
  161. HEADER_CG_DRAGON_SOUL_REFINE = 205,
  162. HEADER_CG_STATE_CHECKER = 206,
  163.  
  164. #ifdef __AUCTION__
  165. HEADER_CG_AUCTION_CMD = 205,
  166. #endif
  167.  
  168. HEADER_CG_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_
  169. HEADER_CG_TIME_SYNC = 0xfc,
  170. HEADER_CG_CLIENT_VERSION = 0xfd,
  171. HEADER_CG_CLIENT_VERSION2 = 0xf1,
  172. HEADER_CG_PONG = 0xfe,
  173. HEADER_CG_HANDSHAKE = 0xff,
  174. /////////////////////////////////////////////////
  175. // From Server
  176.  
  177. HEADER_GC_CHARACTER_ADD = 1,
  178. HEADER_GC_CHARACTER_DEL = 2,
  179. HEADER_GC_CHARACTER_MOVE = 3,
  180. HEADER_GC_CHAT = 4,
  181. HEADER_GC_SYNC_POSITION = 5,
  182. HEADER_GC_LOGIN_SUCCESS3 = 6,
  183. HEADER_GC_LOGIN_FAILURE = 7,
  184. HEADER_GC_PLAYER_CREATE_SUCCESS = 8,
  185. HEADER_GC_PLAYER_CREATE_FAILURE = 9,
  186. HEADER_GC_PLAYER_DELETE_SUCCESS = 10,
  187. HEADER_GC_PLAYER_DELETE_WRONG_SOCIAL_ID = 11,
  188. // 12
  189. HEADER_GC_STUN = 13,
  190. HEADER_GC_DEAD = 14,
  191.  
  192. HEADER_GC_MAIN_CHARACTER = 15,
  193. HEADER_GC_PLAYER_POINTS = 16,
  194. HEADER_GC_PLAYER_POINT_CHANGE = 17,
  195. HEADER_GC_CHANGE_SPEED = 18,
  196. HEADER_GC_CHARACTER_UPDATE = 19,
  197. #if defined(GAIDEN)
  198. HEADER_GC_ITEM_DEL = 20, // 아이템 창에 추가
  199. HEADER_GC_ITEM_SET = 21, // 아이템 창에 추가
  200. #else
  201. HEADER_GC_ITEM_SET = 20, // 아이템 창에 추가
  202. HEADER_GC_ITEM_SET2 = 21, // 아이템 창에 추가
  203. #endif
  204. HEADER_GC_ITEM_USE = 22, // 아이템 사용 (주위 사람들에게 보여주기 위해)
  205. HEADER_GC_ITEM_DROP = 23, // 아이템 버리기
  206. HEADER_GC_ITEM_UPDATE = 25, // 아이템 수치 업데이트
  207. HEADER_GC_ITEM_GROUND_ADD = 26, // 바닥에 아이템 추가
  208. HEADER_GC_ITEM_GROUND_DEL = 27, // 바닥에서 아이템 삭제
  209. HEADER_GC_QUICKSLOT_ADD = 28,
  210. HEADER_GC_QUICKSLOT_DEL = 29,
  211. HEADER_GC_QUICKSLOT_SWAP = 30,
  212. HEADER_GC_ITEM_OWNERSHIP = 31,
  213. HEADER_GC_LOGIN_SUCCESS4 = 32,
  214. HEADER_GC_ITEM_UNBIND_TIME = 33,
  215. HEADER_GC_WHISPER = 34,
  216. HEADER_GC_ALERT = 35,
  217.  
  218. HEADER_GC_MOTION = 36,
  219.  
  220. HEADER_GC_SHOP = 38,
  221. HEADER_GC_SHOP_SIGN = 39,
  222.  
  223. // 39 ~ 41 Balnk
  224. HEADER_GC_DUEL_START = 40,
  225. HEADER_GC_PVP = 41,
  226. HEADER_GC_EXCHANGE = 42,
  227. HEADER_GC_CHARACTER_POSITION = 43,
  228.  
  229. HEADER_GC_PING = 44,
  230.  
  231. HEADER_GC_SCRIPT = 45,
  232. HEADER_GC_QUEST_CONFIRM = 46,
  233.  
  234. #ifdef NEW_PET_SYSTEM
  235. HEADER_CG_PetSetName = 147,
  236. #endif
  237.  
  238. HEADER_GC_MOUNT = 61,
  239. HEADER_GC_OWNERSHIP = 62,
  240. HEADER_GC_TARGET = 63,
  241.  
  242. #ifdef ENABLE_SEND_TARGET_INFO
  243. HEADER_GC_TARGET_INFO = 58,
  244. HEADER_CG_TARGET_INFO_LOAD = 59,
  245. #endif
  246.  
  247. HEADER_GC_WARP = 65,
  248. HEADER_GC_ADD_FLY_TARGETING = 69,
  249.  
  250. HEADER_GC_CREATE_FLY = 70,
  251. HEADER_GC_FLY_TARGETING = 71,
  252. HEADER_GC_SKILL_LEVEL = 72,
  253. HEADER_GC_SKILL_COOLTIME_END = 73,
  254. HEADER_GC_MESSENGER = 74,
  255. HEADER_GC_GUILD = 75,
  256. HEADER_GC_SKILL_LEVEL_NEW = 76,
  257.  
  258. HEADER_GC_PARTY_INVITE = 77,
  259. HEADER_GC_PARTY_ADD = 78,
  260. HEADER_GC_PARTY_UPDATE = 79,
  261. HEADER_GC_PARTY_REMOVE = 80,
  262.  
  263. HEADER_GC_QUEST_INFO = 81,
  264. HEADER_GC_REQUEST_MAKE_GUILD = 82,
  265. HEADER_GC_PARTY_PARAMETER = 83,
  266.  
  267. HEADER_GC_SAFEBOX_MONEY_CHANGE = 84,
  268. HEADER_GC_SAFEBOX_SET = 85,
  269. HEADER_GC_SAFEBOX_DEL = 86,
  270. HEADER_GC_SAFEBOX_WRONG_PASSWORD = 87,
  271. HEADER_GC_SAFEBOX_SIZE = 88,
  272.  
  273. HEADER_GC_FISHING = 89,
  274.  
  275. HEADER_GC_EMPIRE = 90,
  276.  
  277. HEADER_GC_PARTY_LINK = 91,
  278. HEADER_GC_PARTY_UNLINK = 92,
  279.  
  280. HEADER_GC_REFINE_INFORMATION = 95,
  281.  
  282. HEADER_GC_OBSERVER_ADD = 96,
  283. HEADER_GC_OBSERVER_REMOVE = 97,
  284. HEADER_GC_OBSERVER_MOVE = 98,
  285. HEADER_GC_VIEW_EQUIP = 99,
  286.  
  287. HEADER_GC_MARK_BLOCK = 100,
  288. HEADER_GC_MARK_DIFF_DATA = 101,
  289. HEADER_GC_MARK_IDXLIST = 102,
  290.  
  291. //HEADER_GC_SLOW_TIMER = 105,
  292. HEADER_GC_TIME = 106,
  293. HEADER_GC_CHANGE_NAME = 107,
  294.  
  295. HEADER_GC_DUNGEON = 110,
  296. HEADER_GC_WALK_MODE = 111,
  297. HEADER_GC_CHANGE_SKILL_GROUP = 112,
  298.  
  299. #if defined(GAIDEN)
  300. HEADER_GC_MAIN_CHARACTER = 113,
  301. HEADER_GC_MAIN_CHARACTER3_BGM = 137,
  302. HEADER_GC_MAIN_CHARACTER4_BGM_VOL = 138,
  303. #else
  304. // SUPPORT_BGM
  305. HEADER_GC_MAIN_CHARACTER2_EMPIRE = 113,
  306. // END_OF_SUPPORT_BGM
  307. #endif
  308.  
  309. HEADER_GC_SEPCIAL_EFFECT = 114,
  310. HEADER_GC_NPC_POSITION = 115,
  311.  
  312. HEADER_GC_CHINA_MATRIX_CARD = 116,
  313. HEADER_GC_CHARACTER_UPDATE2 = 117,
  314. HEADER_GC_LOGIN_KEY = 118,
  315. HEADER_GC_REFINE_INFORMATION_NEW = 119,
  316. HEADER_GC_CHARACTER_ADD2 = 120,
  317. HEADER_GC_CHANNEL = 121,
  318.  
  319. HEADER_GC_MALL_OPEN = 122,
  320. HEADER_GC_TARGET_UPDATE = 123,
  321. HEADER_GC_TARGET_DELETE = 124,
  322. HEADER_GC_TARGET_CREATE = 125,
  323. HEADER_GC_TARGET_CREATE_NEW = 139,
  324.  
  325. HEADER_GC_AFFECT_ADD = 126,
  326. HEADER_GC_AFFECT_REMOVE = 127,
  327.  
  328. HEADER_GC_MALL_SET = 128,
  329. HEADER_GC_MALL_DEL = 129,
  330. HEADER_GC_LAND_LIST = 130,
  331. HEADER_GC_LOVER_INFO = 131,
  332. HEADER_GC_LOVE_POINT_UPDATE = 132,
  333. HEADER_GC_GUILD_SYMBOL_DATA = 133,
  334. HEADER_GC_DIG_MOTION = 134,
  335.  
  336. HEADER_GC_DAMAGE_INFO = 135,
  337. HEADER_GC_CHAR_ADDITIONAL_INFO = 136,
  338.  
  339. // SUPPORT_BGM
  340. HEADER_GC_MAIN_CHARACTER3_BGM = 137,
  341. HEADER_GC_MAIN_CHARACTER4_BGM_VOL = 138,
  342. // END_OF_SUPPORT_BGM
  343.  
  344. HEADER_GC_AUTH_SUCCESS = 150,
  345. HEADER_GC_PANAMA_PACK = 151,
  346.  
  347. //HYBRID CRYPT
  348. HEADER_GC_HYBRIDCRYPT_KEYS = 152,
  349. HEADER_GC_HYBRIDCRYPT_SDB = 153, // SDB means Supplmentary Data Blocks
  350. //HYBRID CRYPT
  351.  
  352. HEADER_GC_AUTH_SUCCESS_OPENID = 154,
  353.  
  354. HEADER_GC_RUNUP_MATRIX_QUIZ = 201,
  355. HEADER_GC_NEWCIBN_PASSPOD_REQUEST = 202,
  356. HEADER_GC_NEWCIBN_PASSPOD_FAILURE = 203,
  357. #if defined(GAIDEN)
  358. HEADER_GC_ONTIME = 204,
  359. HEADER_GC_RESET_ONTIME = 205,
  360.  
  361. // AUTOBAN
  362. HEADER_GC_AUTOBAN_QUIZ = 206,
  363. // END_OF_AUTOBAN
  364.  
  365. HEADER_GC_HS_REQUEST = 207, // Origially it's 204 on devel branch
  366. #else
  367. HEADER_GC_HS_REQUEST = 204,
  368. HEADER_GC_XTRAP_CS1_REQUEST = 205,
  369. #endif
  370.  
  371. #ifdef __AUCTION__
  372. HEADER_GC_AUCTOIN_ITEM_LIST = 206,
  373. #endif
  374.  
  375. HEADER_GC_SPECIFIC_EFFECT = 208,
  376. HEADER_GC_DRAGON_SOUL_REFINE = 209,
  377. HEADER_GC_RESPOND_CHANNELSTATUS = 210,
  378.  
  379. // @fixme007
  380. HEADER_GC_UNK_213 = 213,
  381.  
  382. HEADER_GC_KEY_AGREEMENT_COMPLETED = 0xfa, // _IMPROVED_PACKET_ENCRYPTION_
  383. HEADER_GC_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_
  384. HEADER_GC_HANDSHAKE_OK = 0xfc, // 252
  385. #ifdef ENABLE_TITLE_SYSTEM
  386. HEADER_CG_TITLE_CHOOSE = 220,
  387. HEADER_GG_TITLE_ANSWER = 37,
  388. #endif
  389. HEADER_GC_PHASE = 0xfd, // 253
  390. HEADER_GC_BINDUDP = 0xfe, // 254
  391. HEADER_GC_HANDSHAKE = 0xff, // 255
  392.  
  393. /////////////////////////////////////////////////
  394. // Client To Client for UDP
  395. /*
  396. HEADER_CC_STATE_WAITING = 1,
  397. HEADER_CC_STATE_WALKING = 2,
  398. HEADER_CC_STATE_GOING = 3,
  399. HEADER_CC_EVENT_NORMAL_ATTACKING = 4,
  400. HEADER_CC_EVENT_COMBO_ATTACKING = 5,
  401. HEADER_CC_EVENT_HIT = 6,
  402. */
  403. };
  404.  
  405. enum
  406. {
  407. ID_MAX_NUM = 30,
  408. PASS_MAX_NUM = 16,
  409. CHAT_MAX_NUM = 128,
  410. PATH_NODE_MAX_NUM = 64,
  411. SHOP_SIGN_MAX_LEN = 32,
  412.  
  413. PLAYER_PER_ACCOUNT3 = 3,
  414. #ifndef ENABLE_PLAYER_PER_ACCOUNT5
  415. PLAYER_PER_ACCOUNT4 = 4,
  416. #else
  417. PLAYER_PER_ACCOUNT4 = 5,
  418. PLAYER_PER_ACCOUNT5 = 5,
  419. #endif
  420.  
  421. PLAYER_ITEM_SLOT_MAX_NUM = 20, // 플래이어의 슬롯당 들어가는 갯수.
  422.  
  423. QUICKSLOT_MAX_LINE = 4,
  424. QUICKSLOT_MAX_COUNT_PER_LINE = 8, // 클라이언트 임의 결정값
  425. QUICKSLOT_MAX_COUNT = QUICKSLOT_MAX_LINE * QUICKSLOT_MAX_COUNT_PER_LINE,
  426.  
  427. QUICKSLOT_MAX_NUM = 36, // 서버와 맞춰져 있는 값
  428.  
  429. SHOP_HOST_ITEM_MAX_NUM = 40,
  430.  
  431. METIN_SOCKET_COUNT = 6,
  432.  
  433. PARTY_AFFECT_SLOT_MAX_NUM = 7,
  434.  
  435. GUILD_GRADE_NAME_MAX_LEN = 8,
  436. GUILD_NAME_MAX_LEN = 12,
  437. GUILD_GRADE_COUNT = 15,
  438. GULID_COMMENT_MAX_LEN = 50,
  439.  
  440. MARK_CRC_NUM = 8*8,
  441. MARK_DATA_SIZE = 16*12,
  442. SYMBOL_DATA_SIZE = 128*256,
  443. QUEST_INPUT_STRING_MAX_NUM = 64,
  444.  
  445. PRIVATE_CODE_LENGTH = 8,
  446.  
  447. REFINE_MATERIAL_MAX_NUM = 5,
  448.  
  449. CHINA_MATRIX_ANSWER_MAX_LEN = 8,
  450.  
  451. RUNUP_MATRIX_QUIZ_MAX_LEN = 8,
  452. RUNUP_MATRIX_ANSWER_MAX_LEN = 4,
  453. NEWCIBN_PASSPOD_ANSWER_MAX_LEN = 8,
  454. NEWCIBN_PASSPOD_FAILURE_MAX_LEN = 128,
  455.  
  456. WEAR_MAX_NUM = CItemData::WEAR_MAX_NUM,
  457.  
  458. OPENID_AUTHKEY_LEN = 32,
  459.  
  460. SHOP_TAB_NAME_MAX = 32,
  461. SHOP_TAB_COUNT_MAX = 3,
  462. };
  463.  
  464. #pragma pack(push)
  465. #pragma pack(1)
  466.  
  467. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  468. // Mark
  469. typedef struct command_mark_login
  470. {
  471. BYTE header;
  472. DWORD handle;
  473. DWORD random_key;
  474. } TPacketCGMarkLogin;
  475.  
  476. typedef struct command_mark_upload
  477. {
  478. BYTE header;
  479. DWORD gid;
  480. BYTE image[16*12*4];
  481. } TPacketCGMarkUpload;
  482.  
  483. typedef struct command_mark_idxlist
  484. {
  485. BYTE header;
  486. } TPacketCGMarkIDXList;
  487.  
  488. typedef struct command_mark_crclist
  489. {
  490. BYTE header;
  491. BYTE imgIdx;
  492. DWORD crclist[80];
  493. } TPacketCGMarkCRCList;
  494.  
  495. typedef struct packet_mark_idxlist
  496. {
  497. BYTE header;
  498. DWORD bufSize;
  499. WORD count;
  500. //뒤에 size * (WORD + WORD)만큼 데이터 붙음
  501. } TPacketGCMarkIDXList;
  502.  
  503. typedef struct packet_mark_block
  504. {
  505. BYTE header;
  506. DWORD bufSize;
  507. BYTE imgIdx;
  508. DWORD count;
  509. // 뒤에 64 x 48 x 픽셀크기(4바이트) = 12288만큼 데이터 붙음
  510. } TPacketGCMarkBlock;
  511.  
  512. typedef struct command_symbol_upload
  513. {
  514. BYTE header;
  515. WORD size;
  516. DWORD handle;
  517. } TPacketCGSymbolUpload;
  518.  
  519. typedef struct command_symbol_crc
  520. {
  521. BYTE header;
  522. DWORD dwGuildID;
  523. DWORD dwCRC;
  524. DWORD dwSize;
  525. } TPacketCGSymbolCRC;
  526.  
  527. typedef struct packet_symbol_data
  528. {
  529. BYTE header;
  530. WORD size;
  531. DWORD guild_id;
  532. } TPacketGCGuildSymbolData;
  533.  
  534. //
  535. //
  536. //
  537. typedef struct packet_observer_add
  538. {
  539. BYTE header;
  540. DWORD vid;
  541. WORD x;
  542. WORD y;
  543. } TPacketGCObserverAdd;
  544.  
  545. typedef struct packet_observer_move
  546. {
  547. BYTE header;
  548. DWORD vid;
  549. WORD x;
  550. WORD y;
  551. } TPacketGCObserverMove;
  552.  
  553.  
  554. typedef struct packet_observer_remove
  555. {
  556. BYTE header;
  557. DWORD vid;
  558. } TPacketGCObserverRemove;
  559.  
  560.  
  561. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  562. // To Server
  563.  
  564. typedef struct command_checkin
  565. {
  566. BYTE header;
  567. char name[ID_MAX_NUM+1];
  568. char pwd[PASS_MAX_NUM+1];
  569. } TPacketCGCheckin;
  570.  
  571. typedef struct command_login
  572. {
  573. BYTE header;
  574. char name[ID_MAX_NUM + 1];
  575. char pwd[PASS_MAX_NUM + 1];
  576. } TPacketCGLogin;
  577.  
  578. // start - 권한 서버 접속을 위한 패킷들
  579. typedef struct command_login2
  580. {
  581. BYTE header;
  582. char name[ID_MAX_NUM + 1];
  583. DWORD login_key;
  584. DWORD adwClientKey[4];
  585. } TPacketCGLogin2;
  586.  
  587. typedef struct command_login3
  588. {
  589. BYTE header;
  590. char name[ID_MAX_NUM + 1];
  591. char pwd[PASS_MAX_NUM + 1];
  592. DWORD adwClientKey[4];
  593. } TPacketCGLogin3;
  594.  
  595. typedef struct command_login5
  596. {
  597. BYTE header;
  598. char authKey[OPENID_AUTHKEY_LEN + 1];
  599. DWORD adwClientKey[4];
  600. } TPacketCGLogin5;
  601. // end - 권한 서버 접속을 위한 패킷들
  602.  
  603. #ifdef NEW_PET_SYSTEM
  604. typedef struct packet_RequestPetName
  605. {
  606. BYTE byHeader;
  607. char petname[13];
  608. } TPacketCGRequestPetName;
  609. #endif
  610.  
  611. typedef struct command_direct_enter
  612. {
  613. BYTE bHeader;
  614. char login[ID_MAX_NUM + 1];
  615. char passwd[PASS_MAX_NUM + 1];
  616. BYTE index;
  617. } TPacketCGDirectEnter;
  618.  
  619. typedef struct command_player_select
  620. {
  621. BYTE header;
  622. BYTE player_index;
  623. } TPacketCGSelectCharacter;
  624.  
  625. typedef struct command_attack
  626. {
  627. BYTE header;
  628. BYTE bType; // 공격 유형
  629. DWORD dwVictimVID; // 적 VID
  630. BYTE bCRCMagicCubeProcPiece;
  631. BYTE bCRCMagicCubeFilePiece;
  632. } TPacketCGAttack;
  633.  
  634. typedef struct command_chat
  635. {
  636. BYTE header;
  637. WORD length;
  638. BYTE type;
  639. } TPacketCGChat;
  640.  
  641. typedef struct command_whisper
  642. {
  643. BYTE bHeader;
  644. WORD wSize;
  645. char szNameTo[CHARACTER_NAME_MAX_LEN + 1];
  646. } TPacketCGWhisper;
  647.  
  648. typedef struct command_sms
  649. {
  650. BYTE bHeader;
  651. WORD wSize;
  652. char szNameTo[CHARACTER_NAME_MAX_LEN + 1];
  653. } TPacketCGSMS;
  654.  
  655. enum EBattleMode
  656. {
  657. BATTLEMODE_ATTACK = 0,
  658. BATTLEMODE_DEFENSE = 1,
  659. };
  660.  
  661. typedef struct command_EnterFrontGame
  662. {
  663. BYTE header;
  664. } TPacketCGEnterFrontGame;
  665.  
  666. typedef struct command_item_use
  667. {
  668. BYTE header;
  669. TItemPos pos;
  670. } TPacketCGItemUse;
  671.  
  672. typedef struct command_item_use_to_item
  673. {
  674. BYTE header;
  675. TItemPos source_pos;
  676. TItemPos target_pos;
  677. } TPacketCGItemUseToItem;
  678.  
  679. typedef struct command_item_drop
  680. {
  681. BYTE header;
  682. TItemPos pos;
  683. DWORD elk;
  684. } TPacketCGItemDrop;
  685.  
  686. typedef struct command_item_drop2
  687. {
  688. BYTE header;
  689. TItemPos pos;
  690. DWORD gold;
  691. BYTE count;
  692. } TPacketCGItemDrop2;
  693.  
  694. typedef struct command_item_destroy
  695. {
  696. BYTE header;
  697. TItemPos pos;
  698. } TPacketCGItemDestroy;
  699.  
  700. typedef struct command_item_move
  701. {
  702. BYTE header;
  703. TItemPos pos;
  704. TItemPos change_pos;
  705. BYTE num;
  706. } TPacketCGItemMove;
  707.  
  708. #ifdef NEW_ADD_INVENTORY
  709. typedef struct envanter_paketi
  710. {
  711. BYTE header;
  712. } TPacketCGEnvanter;
  713. #endif
  714.  
  715. typedef struct command_item_pickup
  716. {
  717. BYTE header;
  718. DWORD vid;
  719. } TPacketCGItemPickUp;
  720.  
  721. typedef struct command_quickslot_add
  722. {
  723. BYTE header;
  724. BYTE pos;
  725. TQuickSlot slot;
  726. }TPacketCGQuickSlotAdd;
  727.  
  728. typedef struct command_quickslot_del
  729. {
  730. BYTE header;
  731. BYTE pos;
  732. }TPacketCGQuickSlotDel;
  733.  
  734. typedef struct command_quickslot_swap
  735. {
  736. BYTE header;
  737. BYTE pos;
  738. BYTE change_pos;
  739. }TPacketCGQuickSlotSwap;
  740.  
  741. typedef struct command_on_click
  742. {
  743. BYTE header;
  744. DWORD vid;
  745. } TPacketCGOnClick;
  746.  
  747.  
  748. enum
  749. {
  750. SHOP_SUBHEADER_CG_END,
  751. SHOP_SUBHEADER_CG_BUY,
  752. SHOP_SUBHEADER_CG_SELL,
  753. SHOP_SUBHEADER_CG_SELL2,
  754. };
  755.  
  756. typedef struct command_shop
  757. {
  758. BYTE header;
  759. BYTE subheader;
  760. } TPacketCGShop;
  761.  
  762. enum
  763. {
  764. EXCHANGE_SUBHEADER_CG_START, // arg1 == vid of target character
  765. EXCHANGE_SUBHEADER_CG_ITEM_ADD, // arg1 == position of item
  766. EXCHANGE_SUBHEADER_CG_ITEM_DEL, // arg1 == position of item
  767. EXCHANGE_SUBHEADER_CG_ELK_ADD, // arg1 == amount of elk
  768. EXCHANGE_SUBHEADER_CG_ACCEPT, // arg1 == not used
  769. EXCHANGE_SUBHEADER_CG_CANCEL, // arg1 == not used
  770. };
  771.  
  772. typedef struct command_exchange
  773. {
  774. BYTE header;
  775. BYTE subheader;
  776. #ifdef ENABLE_YANG_LIMIT
  777. long long arg1;
  778. #else
  779. DWORD arg1;
  780. #endif
  781. BYTE arg2;
  782. BYTE dice;
  783. TItemPos Pos;
  784. } TPacketCGExchange;
  785.  
  786. typedef struct command_position
  787. {
  788. BYTE header;
  789. BYTE position;
  790. } TPacketCGPosition;
  791.  
  792. typedef struct command_script_answer
  793. {
  794. BYTE header;
  795. BYTE answer;
  796. } TPacketCGScriptAnswer;
  797.  
  798. typedef struct command_script_button
  799. {
  800. BYTE header;
  801. unsigned int idx;
  802. } TPacketCGScriptButton;
  803.  
  804. typedef struct command_target
  805. {
  806. BYTE header;
  807. DWORD dwVID;
  808. } TPacketCGTarget;
  809.  
  810. typedef struct command_move
  811. {
  812. BYTE bHeader;
  813. BYTE bFunc;
  814. BYTE bArg;
  815. BYTE bRot;
  816. LONG lX;
  817. LONG lY;
  818. DWORD dwTime;
  819. } TPacketCGMove;
  820.  
  821. typedef struct command_sync_position_element
  822. {
  823. DWORD dwVID;
  824. long lX;
  825. long lY;
  826. } TPacketCGSyncPositionElement;
  827.  
  828. typedef struct command_sync_position
  829. {
  830. BYTE bHeader;
  831. WORD wSize;
  832. } TPacketCGSyncPosition;
  833.  
  834. typedef struct command_fly_targeting
  835. {
  836. BYTE bHeader;
  837. DWORD dwTargetVID;
  838. long lX;
  839. long lY;
  840. } TPacketCGFlyTargeting;
  841.  
  842. typedef struct packet_fly_targeting
  843. {
  844. BYTE bHeader;
  845. DWORD dwShooterVID;
  846. DWORD dwTargetVID;
  847. long lX;
  848. long lY;
  849. } TPacketGCFlyTargeting;
  850.  
  851. typedef struct packet_shoot
  852. {
  853. BYTE bHeader;
  854. BYTE bType;
  855. } TPacketCGShoot;
  856.  
  857. typedef struct command_warp
  858. {
  859. BYTE bHeader;
  860. } TPacketCGWarp;
  861.  
  862. enum
  863. {
  864. MESSENGER_SUBHEADER_GC_LIST,
  865. MESSENGER_SUBHEADER_GC_LOGIN,
  866. MESSENGER_SUBHEADER_GC_LOGOUT,
  867. MESSENGER_SUBHEADER_GC_INVITE,
  868. MESSENGER_SUBHEADER_GC_MOBILE,
  869. };
  870.  
  871. typedef struct packet_messenger
  872. {
  873. BYTE header;
  874. WORD size;
  875. BYTE subheader;
  876. } TPacketGCMessenger;
  877.  
  878. typedef struct packet_messenger_list_offline
  879. {
  880. BYTE connected; // always 0
  881. BYTE length;
  882. } TPacketGCMessengerListOffline;
  883.  
  884. enum
  885. {
  886. MESSENGER_CONNECTED_STATE_OFFLINE,
  887. MESSENGER_CONNECTED_STATE_ONLINE,
  888. MESSENGER_CONNECTED_STATE_MOBILE,
  889. };
  890.  
  891. typedef struct packet_messenger_list_online
  892. {
  893. BYTE connected;
  894. BYTE length;
  895. //BYTE length_char_name;
  896. } TPacketGCMessengerListOnline;
  897.  
  898. typedef struct packet_messenger_login
  899. {
  900. //BYTE length_login;
  901. //BYTE length_char_name;
  902. BYTE length;
  903. } TPacketGCMessengerLogin;
  904.  
  905. typedef struct packet_messenger_logout
  906. {
  907. BYTE length;
  908. } TPacketGCMessengerLogout;
  909.  
  910. enum
  911. {
  912. MESSENGER_SUBHEADER_CG_ADD_BY_VID,
  913. MESSENGER_SUBHEADER_CG_ADD_BY_NAME,
  914. MESSENGER_SUBHEADER_CG_REMOVE,
  915. };
  916.  
  917. typedef struct command_messenger
  918. {
  919. BYTE header;
  920. BYTE subheader;
  921. } TPacketCGMessenger;
  922.  
  923. typedef struct command_messenger_remove
  924. {
  925. BYTE length;
  926. } TPacketCGMessengerRemove;
  927.  
  928. enum
  929. {
  930. SAFEBOX_MONEY_STATE_SAVE,
  931. SAFEBOX_MONEY_STATE_WITHDRAW,
  932. };
  933.  
  934. typedef struct command_safebox_money
  935. {
  936. BYTE bHeader;
  937. BYTE bState;
  938. DWORD dwMoney;
  939. } TPacketCGSafeboxMoney;
  940.  
  941. typedef struct command_safebox_checkout
  942. {
  943. BYTE bHeader;
  944. BYTE bSafePos;
  945. TItemPos ItemPos;
  946. } TPacketCGSafeboxCheckout;
  947.  
  948. typedef struct command_safebox_checkin
  949. {
  950. BYTE bHeader;
  951. BYTE bSafePos;
  952. TItemPos ItemPos;
  953. } TPacketCGSafeboxCheckin;
  954.  
  955. typedef struct command_mall_checkout
  956. {
  957. BYTE bHeader;
  958. BYTE bMallPos;
  959. TItemPos ItemPos;
  960. } TPacketCGMallCheckout;
  961.  
  962. ///////////////////////////////////////////////////////////////////////////////////
  963. // Party
  964.  
  965. typedef struct command_use_skill
  966. {
  967. BYTE bHeader;
  968. DWORD dwVnum;
  969. DWORD dwTargetVID;
  970. } TPacketCGUseSkill;
  971.  
  972. typedef struct command_party_invite
  973. {
  974. BYTE header;
  975. DWORD vid;
  976. } TPacketCGPartyInvite;
  977.  
  978. typedef struct command_party_invite_answer
  979. {
  980. BYTE header;
  981. DWORD leader_pid;
  982. BYTE accept;
  983. } TPacketCGPartyInviteAnswer;
  984.  
  985. typedef struct command_party_remove
  986. {
  987. BYTE header;
  988. DWORD pid;
  989. } TPacketCGPartyRemove;
  990.  
  991. typedef struct command_party_set_state
  992. {
  993. BYTE byHeader;
  994. DWORD dwVID;
  995. BYTE byState;
  996. BYTE byFlag;
  997. } TPacketCGPartySetState;
  998.  
  999. typedef struct packet_party_link
  1000. {
  1001. BYTE header;
  1002. DWORD pid;
  1003. DWORD vid;
  1004. } TPacketGCPartyLink;
  1005.  
  1006. typedef struct packet_party_unlink
  1007. {
  1008. BYTE header;
  1009. DWORD pid;
  1010. DWORD vid;
  1011. } TPacketGCPartyUnlink;
  1012.  
  1013. typedef struct command_party_use_skill
  1014. {
  1015. BYTE byHeader;
  1016. BYTE bySkillIndex;
  1017. DWORD dwTargetVID;
  1018. } TPacketCGPartyUseSkill;
  1019.  
  1020. enum
  1021. {
  1022. GUILD_SUBHEADER_CG_ADD_MEMBER,
  1023. GUILD_SUBHEADER_CG_REMOVE_MEMBER,
  1024. GUILD_SUBHEADER_CG_CHANGE_GRADE_NAME,
  1025. GUILD_SUBHEADER_CG_CHANGE_GRADE_AUTHORITY,
  1026. GUILD_SUBHEADER_CG_OFFER,
  1027. GUILD_SUBHEADER_CG_POST_COMMENT,
  1028. GUILD_SUBHEADER_CG_DELETE_COMMENT,
  1029. GUILD_SUBHEADER_CG_REFRESH_COMMENT,
  1030. GUILD_SUBHEADER_CG_CHANGE_MEMBER_GRADE,
  1031. GUILD_SUBHEADER_CG_USE_SKILL,
  1032. GUILD_SUBHEADER_CG_CHANGE_MEMBER_GENERAL,
  1033. GUILD_SUBHEADER_CG_GUILD_INVITE_ANSWER,
  1034. GUILD_SUBHEADER_CG_CHARGE_GSP,
  1035. GUILD_SUBHEADER_CG_DEPOSIT_MONEY,
  1036. GUILD_SUBHEADER_CG_WITHDRAW_MONEY,
  1037. };
  1038.  
  1039. typedef struct command_guild
  1040. {
  1041. BYTE byHeader;
  1042. BYTE bySubHeader;
  1043. } TPacketCGGuild;
  1044.  
  1045. typedef struct command_guild_answer_make_guild
  1046. {
  1047. BYTE header;
  1048. char guild_name[GUILD_NAME_MAX_LEN+1];
  1049. } TPacketCGAnswerMakeGuild;
  1050.  
  1051. typedef struct command_give_item
  1052. {
  1053. BYTE byHeader;
  1054. DWORD dwTargetVID;
  1055. TItemPos ItemPos;
  1056. BYTE byItemCount;
  1057. } TPacketCGGiveItem;
  1058.  
  1059. typedef struct SPacketCGHack
  1060. {
  1061. BYTE bHeader;
  1062. char szBuf[255 + 1];
  1063. } TPacketCGHack;
  1064.  
  1065. typedef struct command_dungeon
  1066. {
  1067. BYTE bHeader;
  1068. WORD size;
  1069. } TPacketCGDungeon;
  1070.  
  1071. // Private Shop
  1072. typedef struct SShopItemTable
  1073. {
  1074. DWORD vnum;
  1075. BYTE count;
  1076.  
  1077. TItemPos pos; // PC 상점에만 이용
  1078. #ifdef ENABLE_FULL_YANG
  1079. long long price; // PC 상점에만 이용
  1080. #else
  1081. DWORD price;
  1082. #endif
  1083. BYTE display_pos; // PC 상점에만 이용, 보일 위치.
  1084. } TShopItemTable;
  1085.  
  1086. typedef struct SPacketCGMyShop
  1087. {
  1088. BYTE bHeader;
  1089. char szSign[SHOP_SIGN_MAX_LEN + 1];
  1090. BYTE bCount; // count of TShopItemTable, max 39
  1091. #ifdef ENABLE_OFFLINE_SHOP
  1092. BYTE days;
  1093. #endif
  1094. } TPacketCGMyShop;
  1095.  
  1096. typedef struct SPacketCGRefine
  1097. {
  1098. BYTE header;
  1099. BYTE pos;
  1100. BYTE type;
  1101. #ifdef ENABLE_FEATURES_REFINE_SYSTEM
  1102. BYTE lLow;
  1103. BYTE lMedium;
  1104. BYTE lExtra;
  1105. BYTE lTotal;
  1106. #endif
  1107. } TPacketCGRefine;
  1108.  
  1109. typedef struct SPacketCGChangeName
  1110. {
  1111. BYTE header;
  1112. BYTE index;
  1113. char name[CHARACTER_NAME_MAX_LEN+1];
  1114. } TPacketCGChangeName;
  1115.  
  1116. typedef struct command_client_version
  1117. {
  1118. BYTE header;
  1119. char filename[32+1];
  1120. char timestamp[32+1];
  1121. } TPacketCGClientVersion;
  1122.  
  1123. typedef struct command_client_version2
  1124. {
  1125. BYTE header;
  1126. char filename[32+1];
  1127. char timestamp[32+1];
  1128. } TPacketCGClientVersion2;
  1129.  
  1130. typedef struct command_crc_report
  1131. {
  1132. BYTE header;
  1133. BYTE byPackMode;
  1134. DWORD dwBinaryCRC32;
  1135. DWORD dwProcessCRC32;
  1136. DWORD dwRootPackCRC32;
  1137. } TPacketCGCRCReport;
  1138.  
  1139. typedef struct command_china_matrix_card
  1140. {
  1141. BYTE bHeader;
  1142. char szAnswer[CHINA_MATRIX_ANSWER_MAX_LEN + 1];
  1143. } TPacketCGChinaMatrixCard;
  1144.  
  1145. typedef struct command_runup_matrix_answer
  1146. {
  1147. BYTE bHeader;
  1148. char szAnswer[RUNUP_MATRIX_ANSWER_MAX_LEN + 1];
  1149. } TPacketCGRunupMatrixAnswer;
  1150.  
  1151. typedef struct command_newcibn_passpod_answer
  1152. {
  1153. BYTE bHeader;
  1154. char szAnswer[NEWCIBN_PASSPOD_ANSWER_MAX_LEN + 1];
  1155. } TPacketCGNEWCIBNPasspodAnswer;
  1156.  
  1157. enum EPartyExpDistributionType
  1158. {
  1159. PARTY_EXP_DISTRIBUTION_NON_PARITY,
  1160. PARTY_EXP_DISTRIBUTION_PARITY,
  1161. };
  1162.  
  1163. typedef struct command_party_parameter
  1164. {
  1165. BYTE bHeader;
  1166. BYTE bDistributeMode;
  1167. } TPacketCGPartyParameter;
  1168.  
  1169. typedef struct command_quest_input_string
  1170. {
  1171. BYTE bHeader;
  1172. char szString[QUEST_INPUT_STRING_MAX_NUM+1];
  1173. } TPacketCGQuestInputString;
  1174.  
  1175. typedef struct command_quest_confirm
  1176. {
  1177. BYTE header;
  1178. BYTE answer;
  1179. DWORD requestPID;
  1180. } TPacketCGQuestConfirm;
  1181.  
  1182. typedef struct command_script_select_item
  1183. {
  1184. BYTE header;
  1185. DWORD selection;
  1186. } TPacketCGScriptSelectItem;
  1187.  
  1188. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1189. // From Server
  1190. enum EPhase
  1191. {
  1192. PHASE_CLOSE, // 끊기는 상태 (또는 끊기 전 상태)
  1193. PHASE_HANDSHAKE, // 악수..;;
  1194. PHASE_LOGIN, // 로그인 중
  1195. PHASE_SELECT, // 캐릭터 선택 화면
  1196. PHASE_LOADING, // 선택 후 로딩 화면
  1197. PHASE_GAME, // 게임 화면
  1198. PHASE_DEAD, // 죽었을 때.. (게임 안에 있는 것일 수도..)
  1199.  
  1200. PHASE_DBCLIENT_CONNECTING, // 서버용
  1201. PHASE_DBCLIENT, // 서버용
  1202. PHASE_P2P, // 서버용
  1203. PHASE_AUTH, // 로그인 인증 용
  1204. };
  1205.  
  1206. typedef struct packet_phase
  1207. {
  1208. BYTE header;
  1209. BYTE phase;
  1210. } TPacketGCPhase;
  1211.  
  1212. typedef struct packet_blank // 공백패킷.
  1213. {
  1214. BYTE header;
  1215. } TPacketGCBlank;
  1216.  
  1217. typedef struct packet_blank_dynamic
  1218. {
  1219. BYTE header;
  1220. WORD size;
  1221. } TPacketGCBlankDynamic;
  1222.  
  1223. typedef struct packet_header_handshake
  1224. {
  1225. BYTE header;
  1226. DWORD dwHandshake;
  1227. DWORD dwTime;
  1228. LONG lDelta;
  1229. } TPacketGCHandshake;
  1230.  
  1231. typedef struct packet_header_bindudp
  1232. {
  1233. BYTE header;
  1234. DWORD addr;
  1235. WORD port;
  1236. } TPacketGCBindUDP;
  1237.  
  1238. typedef struct packet_header_dynamic_size
  1239. {
  1240. BYTE header;
  1241. WORD size;
  1242. } TDynamicSizePacketHeader;
  1243.  
  1244. typedef struct SSimplePlayerInformation
  1245. {
  1246. DWORD dwID;
  1247. char szName[CHARACTER_NAME_MAX_LEN + 1];
  1248. BYTE byJob;
  1249. BYTE byLevel;
  1250. DWORD dwPlayMinutes;
  1251. BYTE byST, byHT, byDX, byIQ;
  1252. // WORD wParts[CRaceData::PART_MAX_NUM];
  1253. WORD wMainPart;
  1254. BYTE bChangeName;
  1255. WORD wHairPart;
  1256. #ifdef ENABLE_SASH_SYSTEM
  1257. WORD wSashPart;
  1258. #endif
  1259. BYTE bDummy[4];
  1260. long x, y;
  1261. LONG lAddr;
  1262. WORD wPort;
  1263. BYTE bySkillGroup;
  1264. } TSimplePlayerInformation;
  1265.  
  1266. typedef struct packet_login_success3
  1267. {
  1268. BYTE header;
  1269. TSimplePlayerInformation akSimplePlayerInformation[PLAYER_PER_ACCOUNT3];
  1270. DWORD guild_id[PLAYER_PER_ACCOUNT3];
  1271. char guild_name[PLAYER_PER_ACCOUNT3][GUILD_NAME_MAX_LEN+1];
  1272. DWORD handle;
  1273. DWORD random_key;
  1274. } TPacketGCLoginSuccess3;
  1275.  
  1276. typedef struct packet_login_success4
  1277. {
  1278. BYTE header;
  1279. TSimplePlayerInformation akSimplePlayerInformation[PLAYER_PER_ACCOUNT4];
  1280. DWORD guild_id[PLAYER_PER_ACCOUNT4];
  1281. char guild_name[PLAYER_PER_ACCOUNT4][GUILD_NAME_MAX_LEN+1];
  1282. DWORD handle;
  1283. DWORD random_key;
  1284. } TPacketGCLoginSuccess4;
  1285. #ifdef ENABLE_PLAYER_PER_ACCOUNT5
  1286. typedef struct packet_login_success5
  1287. {
  1288. BYTE header;
  1289. TSimplePlayerInformation akSimplePlayerInformation[PLAYER_PER_ACCOUNT5];
  1290. DWORD guild_id[PLAYER_PER_ACCOUNT5];
  1291. char guild_name[PLAYER_PER_ACCOUNT5][GUILD_NAME_MAX_LEN+1];
  1292. DWORD handle;
  1293. DWORD random_key;
  1294. } TPacketGCLoginSuccess5;
  1295. #endif
  1296.  
  1297. enum { LOGIN_STATUS_MAX_LEN = 8 };
  1298. typedef struct packet_login_failure
  1299. {
  1300. BYTE header;
  1301. char szStatus[LOGIN_STATUS_MAX_LEN + 1];
  1302. } TPacketGCLoginFailure;
  1303.  
  1304. typedef struct command_player_create
  1305. {
  1306. BYTE header;
  1307. BYTE index;
  1308. char name[CHARACTER_NAME_MAX_LEN + 1];
  1309. WORD job;
  1310. BYTE shape;
  1311. BYTE CON;
  1312. BYTE INT;
  1313. BYTE STR;
  1314. BYTE DEX;
  1315. } TPacketCGCreateCharacter;
  1316.  
  1317. typedef struct command_player_create_success
  1318. {
  1319. BYTE header;
  1320. BYTE bAccountCharacterSlot;
  1321. TSimplePlayerInformation kSimplePlayerInfomation;
  1322. } TPacketGCPlayerCreateSuccess;
  1323.  
  1324. typedef struct command_create_failure
  1325. {
  1326. BYTE header;
  1327. BYTE bType;
  1328. } TPacketGCCreateFailure;
  1329.  
  1330. typedef struct command_player_delete
  1331. {
  1332. BYTE header;
  1333. BYTE index;
  1334. char szPrivateCode[PRIVATE_CODE_LENGTH];
  1335. } TPacketCGDestroyCharacter;
  1336.  
  1337. typedef struct packet_player_delete_success
  1338. {
  1339. BYTE header;
  1340. BYTE account_index;
  1341. } TPacketGCDestroyCharacterSuccess;
  1342.  
  1343. enum
  1344. {
  1345. ADD_CHARACTER_STATE_DEAD = (1 << 0),
  1346. ADD_CHARACTER_STATE_SPAWN = (1 << 1),
  1347. ADD_CHARACTER_STATE_GUNGON = (1 << 2),
  1348. ADD_CHARACTER_STATE_KILLER = (1 << 3),
  1349. ADD_CHARACTER_STATE_PARTY = (1 << 4),
  1350. };
  1351.  
  1352. enum EPKModes
  1353. {
  1354. PK_MODE_PEACE,
  1355. PK_MODE_REVENGE,
  1356. PK_MODE_FREE,
  1357. PK_MODE_PROTECT,
  1358. PK_MODE_GUILD,
  1359. PK_MODE_MAX_NUM,
  1360. };
  1361.  
  1362. // 2004.11.20.myevan.CRaceData::PART_MAX_NUM 사용안하게 수정 - 서버에서 사용하는것과 일치하지 않음
  1363. enum ECharacterEquipmentPart
  1364. {
  1365. CHR_EQUIPPART_ARMOR,
  1366. CHR_EQUIPPART_WEAPON,
  1367. CHR_EQUIPPART_HEAD,
  1368. CHR_EQUIPPART_HAIR,
  1369. #ifdef ENABLE_SASH_SYSTEM
  1370. CHR_EQUIPPART_SASH,
  1371. #endif
  1372. CHR_EQUIPPART_NUM,
  1373. };
  1374.  
  1375. typedef struct packet_char_additional_info
  1376. {
  1377. BYTE header;
  1378. DWORD dwVID;
  1379. char name[CHARACTER_NAME_MAX_LEN + 1];
  1380. WORD awPart[CHR_EQUIPPART_NUM];
  1381. BYTE bEmpire;
  1382. DWORD dwGuildID;
  1383. DWORD dwLevel;
  1384. short sAlignment; //선악치
  1385. BYTE bPKMode;
  1386. #ifdef ENABLE_TITLE_SYSTEM
  1387. int iTitleID;
  1388. #endif
  1389. DWORD dwMountVnum;
  1390. } TPacketGCCharacterAdditionalInfo;
  1391.  
  1392. typedef struct packet_add_char
  1393. {
  1394. BYTE header;
  1395.  
  1396. DWORD dwVID;
  1397.  
  1398. //char name[CHARACTER_NAME_MAX_LEN + 1];
  1399.  
  1400. float angle;
  1401. long x;
  1402. long y;
  1403. long z;
  1404.  
  1405. BYTE bType;
  1406. WORD wRaceNum;
  1407. //WORD awPart[CHR_EQUIPPART_NUM];
  1408. BYTE bMovingSpeed;
  1409. BYTE bAttackSpeed;
  1410.  
  1411. BYTE bStateFlag;
  1412. DWORD dwAffectFlag[2]; // ??
  1413. //BYTE bEmpire;
  1414. //DWORD dwGuild;
  1415. //short sAlignment;
  1416. //BYTE bPKMode;
  1417. //DWORD dwMountVnum;
  1418. } TPacketGCCharacterAdd;
  1419.  
  1420. typedef struct packet_add_char2
  1421. {
  1422. BYTE header;
  1423.  
  1424. DWORD dwVID;
  1425.  
  1426. char name[CHARACTER_NAME_MAX_LEN + 1];
  1427.  
  1428. float angle;
  1429. long x;
  1430. long y;
  1431. long z;
  1432.  
  1433. BYTE bType;
  1434. WORD wRaceNum;
  1435. WORD awPart[CHR_EQUIPPART_NUM];
  1436. BYTE bMovingSpeed;
  1437. BYTE bAttackSpeed;
  1438.  
  1439. BYTE bStateFlag;
  1440. DWORD dwAffectFlag[2]; // ??
  1441. BYTE bEmpire;
  1442.  
  1443. DWORD dwGuild;
  1444. short sAlignment;
  1445. BYTE bPKMode;
  1446. #ifdef ENABLE_TITLE_SYSTEM
  1447. int iTitleID;
  1448. #endif
  1449. DWORD dwMountVnum;
  1450. } TPacketGCCharacterAdd2;
  1451.  
  1452. typedef struct packet_update_char
  1453. {
  1454. BYTE header;
  1455. DWORD dwVID;
  1456.  
  1457. WORD awPart[CHR_EQUIPPART_NUM];
  1458. BYTE bMovingSpeed;
  1459. BYTE bAttackSpeed;
  1460.  
  1461. BYTE bStateFlag;
  1462. DWORD dwAffectFlag[2];
  1463.  
  1464. DWORD dwGuildID;
  1465. short sAlignment;
  1466. DWORD dwLevel;
  1467. BYTE bPKMode;
  1468. #ifdef ENABLE_TITLE_SYSTEM
  1469. int iTitleID;
  1470. #endif
  1471. DWORD dwMountVnum;
  1472. } TPacketGCCharacterUpdate;
  1473.  
  1474. typedef struct packet_update_char2
  1475. {
  1476. BYTE header;
  1477. DWORD dwVID;
  1478.  
  1479. WORD awPart[CHR_EQUIPPART_NUM];
  1480. BYTE bMovingSpeed;
  1481. BYTE bAttackSpeed;
  1482.  
  1483. BYTE bStateFlag;
  1484. DWORD dwAffectFlag[2];
  1485.  
  1486. DWORD dwGuildID;
  1487. short sAlignment;
  1488. BYTE bPKMode;
  1489. #ifdef ENABLE_TITLE_SYSTEM
  1490. int iTitleID;
  1491. #endif
  1492. DWORD dwMountVnum;
  1493. } TPacketGCCharacterUpdate2;
  1494.  
  1495. typedef struct packet_del_char
  1496. {
  1497. BYTE header;
  1498. DWORD dwVID;
  1499. } TPacketGCCharacterDelete;
  1500.  
  1501. typedef struct packet_GlobalTime
  1502. {
  1503. BYTE header;
  1504. float GlobalTime;
  1505. } TPacketGCGlobalTime;
  1506.  
  1507. enum EChatType
  1508. {
  1509. CHAT_TYPE_TALKING, /* 그냥 채팅 */
  1510. CHAT_TYPE_INFO, /* 정보 (아이템을 집었다, 경험치를 얻었다. 등) */
  1511. CHAT_TYPE_NOTICE, /* 공지사항 */
  1512. CHAT_TYPE_PARTY, /* 파티말 */
  1513. CHAT_TYPE_GUILD, /* 길드말 */
  1514. CHAT_TYPE_COMMAND, /* 명령 */
  1515. CHAT_TYPE_SHOUT, /* 외치기 */
  1516. CHAT_TYPE_WHISPER, // 서버와는 연동되지 않는 Only Client Enum
  1517. CHAT_TYPE_BIG_NOTICE,
  1518. CHAT_TYPE_MONARCH_NOTICE,
  1519. // CHAT_TYPE_UNK_10,
  1520. #ifdef ENABLE_DICE_SYSTEM
  1521. CHAT_TYPE_DICE_INFO, //11
  1522. #endif
  1523. #ifdef ENABLE_CHAT_TYPE_SHOUT_TRADE
  1524. CHAT_TYPE_SHOUT_TRADE,
  1525. #endif
  1526. CHAT_TYPE_MAX_NUM,
  1527. };
  1528.  
  1529. typedef struct packet_chatting
  1530. {
  1531. BYTE header;
  1532. WORD size;
  1533. BYTE type;
  1534. DWORD dwVID;
  1535. BYTE bEmpire;
  1536. } TPacketGCChat;
  1537.  
  1538. typedef struct packet_whisper // 가변 패킷
  1539. {
  1540. BYTE bHeader;
  1541. WORD wSize;
  1542. BYTE bType;
  1543. char szNameFrom[CHARACTER_NAME_MAX_LEN + 1];
  1544. } TPacketGCWhisper;
  1545.  
  1546. typedef struct packet_stun
  1547. {
  1548. BYTE header;
  1549. DWORD vid;
  1550. } TPacketGCStun;
  1551.  
  1552. typedef struct packet_dead
  1553. {
  1554. BYTE header;
  1555. DWORD vid;
  1556. } TPacketGCDead;
  1557.  
  1558. typedef struct packet_main_character
  1559. {
  1560. BYTE header;
  1561. DWORD dwVID;
  1562. WORD wRaceNum;
  1563. char szName[CHARACTER_NAME_MAX_LEN + 1];
  1564. long lX, lY, lZ;
  1565. BYTE bySkillGroup;
  1566. } TPacketGCMainCharacter;
  1567.  
  1568. // SUPPORT_BGM
  1569. typedef struct packet_main_character2_empire
  1570. {
  1571. BYTE header;
  1572. DWORD dwVID;
  1573. WORD wRaceNum;
  1574. char szName[CHARACTER_NAME_MAX_LEN + 1];
  1575. long lX, lY, lZ;
  1576. BYTE byEmpire;
  1577. BYTE bySkillGroup;
  1578. } TPacketGCMainCharacter2_EMPIRE;
  1579.  
  1580. typedef struct packet_main_character3_bgm
  1581. {
  1582. enum
  1583. {
  1584. MUSIC_NAME_MAX_LEN = 24,
  1585. };
  1586. BYTE header;
  1587. DWORD dwVID;
  1588. WORD wRaceNum;
  1589. char szUserName[CHARACTER_NAME_MAX_LEN + 1];
  1590. char szBGMName[MUSIC_NAME_MAX_LEN + 1];
  1591. long lX, lY, lZ;
  1592. BYTE byEmpire;
  1593. BYTE bySkillGroup;
  1594. } TPacketGCMainCharacter3_BGM;
  1595.  
  1596. typedef struct packet_main_character4_bgm_vol
  1597. {
  1598. enum
  1599. {
  1600. MUSIC_NAME_MAX_LEN = 24,
  1601. };
  1602. BYTE header;
  1603. DWORD dwVID;
  1604. WORD wRaceNum;
  1605. char szUserName[CHARACTER_NAME_MAX_LEN + 1];
  1606. char szBGMName[MUSIC_NAME_MAX_LEN + 1];
  1607. float fBGMVol;
  1608. long lX, lY, lZ;
  1609. BYTE byEmpire;
  1610. BYTE bySkillGroup;
  1611. } TPacketGCMainCharacter4_BGM_VOL;
  1612. // END_OF_SUPPORT_BGM
  1613.  
  1614. enum EPointTypes
  1615. {
  1616. POINT_NONE, // 0
  1617. POINT_LEVEL, // 1
  1618. POINT_VOICE, // 2
  1619. POINT_EXP, // 3
  1620. POINT_NEXT_EXP, // 4
  1621. POINT_HP, // 5
  1622. POINT_MAX_HP, // 6
  1623. POINT_SP, // 7
  1624. POINT_MAX_SP, // 8
  1625. POINT_STAMINA, // 9 스테미너
  1626. POINT_MAX_STAMINA, // 10 최대 스테미너
  1627.  
  1628. POINT_GOLD, // 11
  1629. POINT_ST, // 12 근력
  1630. POINT_HT, // 13 체력
  1631. POINT_DX, // 14 민첩성
  1632. POINT_IQ, // 15 정신력
  1633. POINT_ATT_POWER, // 16 공격력
  1634. POINT_ATT_SPEED, // 17 공격속도
  1635. POINT_EVADE_RATE, // 18 회피율
  1636. POINT_MOV_SPEED, // 19 이동속도
  1637. POINT_DEF_GRADE, // 20 방어등급
  1638. POINT_CASTING_SPEED, // 21 주문속도 (쿨다운타임*100) / (100 + 이값) = 최종 쿨다운 타임
  1639. POINT_MAGIC_ATT_GRADE, // 22 마법공격력
  1640. POINT_MAGIC_DEF_GRADE, // 23 마법방어력
  1641. POINT_EMPIRE_POINT, // 24 제국점수
  1642. POINT_LEVEL_STEP, // 25 한 레벨에서의 단계.. (1 2 3 될 때 보상, 4 되면 레벨 업)
  1643. POINT_STAT, // 26 능력치 올릴 수 있는 개수
  1644. POINT_SUB_SKILL, // 27 보조 스킬 포인트
  1645. POINT_SKILL, // 28 액티브 스킬 포인트
  1646. // POINT_SKILL_PASV, // 27 패시브 기술 올릴 수 있는 개수
  1647. // POINT_SKILL_ACTIVE, // 28 액티브 스킬 포인트
  1648. POINT_MIN_ATK, // 29 최소 파괴력
  1649. POINT_MAX_ATK, // 30 최대 파괴력
  1650. POINT_PLAYTIME, // 31 플레이시간
  1651. POINT_HP_REGEN, // 32 HP 회복률
  1652. POINT_SP_REGEN, // 33 SP 회복률
  1653.  
  1654. POINT_BOW_DISTANCE, // 34 활 사정거리 증가치 (meter)
  1655.  
  1656. POINT_HP_RECOVERY, // 35 체력 회복 증가량
  1657. POINT_SP_RECOVERY, // 36 정신력 회복 증가량
  1658.  
  1659. POINT_POISON_PCT, // 37 독 확률
  1660. POINT_STUN_PCT, // 38 기절 확률
  1661. POINT_SLOW_PCT, // 39 슬로우 확률
  1662. POINT_CRITICAL_PCT, // 40 크리티컬 확률
  1663. POINT_PENETRATE_PCT, // 41 관통타격 확률
  1664. POINT_CURSE_PCT, // 42 저주 확률
  1665.  
  1666. POINT_ATTBONUS_HUMAN, // 43 인간에게 강함
  1667. POINT_ATTBONUS_ANIMAL, // 44 동물에게 데미지 % 증가
  1668. POINT_ATTBONUS_ORC, // 45 웅귀에게 데미지 % 증가
  1669. POINT_ATTBONUS_MILGYO, // 46 밀교에게 데미지 % 증가
  1670. POINT_ATTBONUS_UNDEAD, // 47 시체에게 데미지 % 증가
  1671. POINT_ATTBONUS_DEVIL, // 48 마귀(악마)에게 데미지 % 증가
  1672. POINT_ATTBONUS_INSECT, // 49 벌레족
  1673. POINT_ATTBONUS_FIRE, // 50 화염족
  1674. POINT_ATTBONUS_ICE, // 51 빙설족
  1675. POINT_ATTBONUS_DESERT, // 52 사막족
  1676. POINT_ATTBONUS_UNUSED0, // 53 UNUSED0
  1677. POINT_ATTBONUS_UNUSED1, // 54 UNUSED1
  1678. POINT_ATTBONUS_UNUSED2, // 55 UNUSED2
  1679. POINT_ATTBONUS_UNUSED3, // 56 UNUSED3
  1680. POINT_ATTBONUS_UNUSED4, // 57 UNUSED4
  1681. POINT_ATTBONUS_UNUSED5, // 58 UNUSED5
  1682. POINT_ATTBONUS_UNUSED6, // 59 UNUSED6
  1683. POINT_ATTBONUS_UNUSED7, // 60 UNUSED7
  1684. POINT_ATTBONUS_UNUSED8, // 61 UNUSED8
  1685. POINT_ATTBONUS_UNUSED9, // 62 UNUSED9
  1686.  
  1687. POINT_STEAL_HP, // 63 생명력 흡수
  1688. POINT_STEAL_SP, // 64 정신력 흡수
  1689.  
  1690. POINT_MANA_BURN_PCT, // 65 마나 번
  1691.  
  1692. /// 피해시 보너스 ///
  1693.  
  1694. POINT_DAMAGE_SP_RECOVER, // 66 공격당할 시 정신력 회복 확률
  1695.  
  1696. POINT_BLOCK, // 67 블럭율
  1697. POINT_DODGE, // 68 회피율
  1698.  
  1699. POINT_RESIST_SWORD, // 69
  1700. POINT_RESIST_TWOHAND, // 70
  1701. POINT_RESIST_DAGGER, // 71
  1702. POINT_RESIST_BELL, // 72
  1703. POINT_RESIST_FAN, // 73
  1704. POINT_RESIST_BOW, // 74 화살 저항 : 대미지 감소
  1705. POINT_RESIST_FIRE, // 75 화염 저항 : 화염공격에 대한 대미지 감소
  1706. POINT_RESIST_ELEC, // 76 전기 저항 : 전기공격에 대한 대미지 감소
  1707. POINT_RESIST_MAGIC, // 77 술법 저항 : 모든술법에 대한 대미지 감소
  1708. POINT_RESIST_WIND, // 78 바람 저항 : 바람공격에 대한 대미지 감소
  1709.  
  1710. POINT_REFLECT_MELEE, // 79 공격 반사
  1711.  
  1712. /// 특수 피해시 ///
  1713. POINT_REFLECT_CURSE, // 80 저주 반사
  1714. POINT_POISON_REDUCE, // 81 독데미지 감소
  1715.  
  1716. /// 적 소멸시 ///
  1717. POINT_KILL_SP_RECOVER, // 82 적 소멸시 MP 회복
  1718. POINT_EXP_DOUBLE_BONUS, // 83
  1719. POINT_GOLD_DOUBLE_BONUS, // 84
  1720. POINT_ITEM_DROP_BONUS, // 85
  1721.  
  1722. /// 회복 관련 ///
  1723. POINT_POTION_BONUS, // 86
  1724. POINT_KILL_HP_RECOVER, // 87
  1725.  
  1726. POINT_IMMUNE_STUN, // 88
  1727. POINT_IMMUNE_SLOW, // 89
  1728. POINT_IMMUNE_FALL, // 90
  1729. //////////////////
  1730.  
  1731. POINT_PARTY_ATT_GRADE, // 91
  1732. POINT_PARTY_DEF_GRADE, // 92
  1733.  
  1734. POINT_ATT_BONUS, // 93
  1735. POINT_DEF_BONUS, // 94
  1736.  
  1737. POINT_ATT_GRADE_BONUS, // 95
  1738. POINT_DEF_GRADE_BONUS, // 96
  1739. POINT_MAGIC_ATT_GRADE_BONUS, // 97
  1740. POINT_MAGIC_DEF_GRADE_BONUS, // 98
  1741.  
  1742. POINT_RESIST_NORMAL_DAMAGE, // 99
  1743.  
  1744. POINT_STAT_RESET_COUNT = 112,
  1745. POINT_HORSE_SKILL = 113,
  1746.  
  1747. POINT_MALL_ATTBONUS, // 114 공격력 +x%
  1748. POINT_MALL_DEFBONUS, // 115 방어력 +x%
  1749. POINT_MALL_EXPBONUS, // 116 경험치 +x%
  1750. POINT_MALL_ITEMBONUS, // 117 아이템 드롭율 x/10배
  1751. POINT_MALL_GOLDBONUS, // 118 돈 드롭율 x/10배
  1752. POINT_MAX_HP_PCT, // 119 최대생명력 +x%
  1753. POINT_MAX_SP_PCT, // 120 최대정신력 +x%
  1754.  
  1755. POINT_SKILL_DAMAGE_BONUS, // 121 스킬 데미지 *(100+x)%
  1756. POINT_NORMAL_HIT_DAMAGE_BONUS, // 122 평타 데미지 *(100+x)%
  1757.  
  1758. POINT_SKILL_DEFEND_BONUS, // 123 스킬 방어 데미지
  1759. POINT_NORMAL_HIT_DEFEND_BONUS, // 124 평타 방어 데미지
  1760. POINT_PC_BANG_EXP_BONUS, // 125
  1761. POINT_PC_BANG_DROP_BONUS, // 126 PC방 전용 드롭률 보너스
  1762.  
  1763. POINT_ENERGY = 128, // 128 기력
  1764.  
  1765. // 기력 ui 용.
  1766. // 이렇게 하고 싶지 않았지만,
  1767. // uiTaskBar에서는 affect에 접근할 수 없고,
  1768. // 더구나 클라리언트에서는 blend_affect는 관리하지 않아,
  1769. // 임시로 이렇게 둔다.
  1770. POINT_ENERGY_END_TIME = 129, // 129 기력 종료 시간
  1771.  
  1772. #ifdef ENABLE_TITLE_SYSTEM
  1773. POINT_TITLE = 150,
  1774. POINT_TITLE_1 = 151,
  1775. POINT_TITLE_2 = 152,
  1776. POINT_TITLE_3 = 153,
  1777. POINT_TITLE_4 = 154,
  1778. POINT_TITLE_5 = 155,
  1779. POINT_TITLE_6 = 156,
  1780. POINT_TITLE_7 = 157,
  1781. POINT_TITLE_8 = 158,
  1782. POINT_TITLE_9 = 159,
  1783. POINT_TITLE_10 = 160,
  1784. POINT_TITLE_11 = 161,
  1785. POINT_TITLE_12 = 162,
  1786. POINT_TITLE_13 = 163,
  1787. POINT_TITLE_14 = 164,
  1788. POINT_TITLE_15 = 165,
  1789. POINT_TITLE_16 = 166,
  1790. POINT_TITLE_17 = 167,
  1791. POINT_TITLE_18 = 168,
  1792. POINT_TITLE_19 = 169,
  1793. POINT_TITLE_20 = 170,
  1794. POINT_TITLE_21 = 171,
  1795. #endif
  1796.  
  1797.  
  1798. // 클라이언트 포인트
  1799. POINT_MIN_WEP = 200,
  1800. POINT_MAX_WEP,
  1801. POINT_MIN_MAGIC_WEP,
  1802. POINT_MAX_MAGIC_WEP,
  1803. POINT_HIT_RATE,
  1804.  
  1805. #ifdef NEW_ADD_INVENTORY
  1806. POINT_BLACK = 145,
  1807. #endif
  1808.  
  1809. //POINT_MAX_NUM = 255,=>stdafx.h 로/
  1810. };
  1811.  
  1812. typedef struct packet_points
  1813. {
  1814. BYTE header;
  1815. #ifdef ENABLE_YANG_LIMIT
  1816. long long points[POINT_MAX_NUM];
  1817. #else
  1818. long points[POINT_MAX_NUM];
  1819. #endif
  1820. } TPacketGCPoints;
  1821.  
  1822. typedef struct packet_point_change
  1823. {
  1824. int header;
  1825.  
  1826. DWORD dwVID;
  1827. BYTE Type;
  1828.  
  1829. #ifdef ENABLE_YANG_LIMIT
  1830. long long amount;
  1831. long long value;
  1832. #else
  1833. long amount; // 바뀐 값
  1834. long value; // 현재 값
  1835. #endif
  1836. } TPacketGCPointChange;
  1837.  
  1838. typedef struct packet_motion
  1839. {
  1840. BYTE header;
  1841. DWORD vid;
  1842. DWORD victim_vid;
  1843. WORD motion;
  1844. } TPacketGCMotion;
  1845.  
  1846. #if defined(GAIDEN)
  1847. struct TPacketGCItemDelDeprecate
  1848. {
  1849. TPacketGCItemDelDeprecate() :
  1850. header(HEADER_GC_ITEM_DEL),
  1851. pos(0),
  1852. vnum(0),
  1853. count(0)
  1854. {
  1855. memset(&alSockets, 0, sizeof(alSockets));
  1856. memset(&aAttr, 0, sizeof(aAttr));
  1857. }
  1858.  
  1859. BYTE header;
  1860. BYTE pos;
  1861. DWORD vnum;
  1862. BYTE count;
  1863. long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
  1864. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
  1865. };
  1866.  
  1867. typedef struct packet_set_item
  1868. {
  1869. BYTE header;
  1870. BYTE pos;
  1871. DWORD vnum;
  1872. BYTE count;
  1873. #ifdef ENABLE_CHANGELOOK_SYSTEM
  1874. DWORD transmutation;
  1875. #endif
  1876. DWORD flags; // 플래그 추가
  1877. long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
  1878. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
  1879. } TPacketGCItemSet;
  1880.  
  1881. typedef struct packet_item_del
  1882. {
  1883. BYTE header;
  1884. BYTE pos;
  1885. } TPacketGCItemDel;
  1886. #else
  1887. typedef struct packet_set_item
  1888. {
  1889. BYTE header;
  1890. TItemPos Cell;
  1891. DWORD vnum;
  1892. BYTE count;
  1893. #ifdef ENABLE_CHANGELOOK_SYSTEM
  1894. DWORD transmutation;
  1895. #endif
  1896. long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
  1897. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
  1898. } TPacketGCItemSet;
  1899.  
  1900. typedef struct packet_set_item2
  1901. {
  1902. BYTE header;
  1903. TItemPos Cell;
  1904. DWORD vnum;
  1905. BYTE count;
  1906. #ifdef ENABLE_CHANGELOOK_SYSTEM
  1907. DWORD transmutation;
  1908. #endif
  1909. DWORD flags; // 플래그 추가
  1910. DWORD anti_flags; // 플래그 추가
  1911. bool highlight;
  1912. long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
  1913. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
  1914. } TPacketGCItemSet2;
  1915. #endif
  1916.  
  1917. typedef struct packet_item_del
  1918. {
  1919. BYTE header;
  1920. BYTE pos;
  1921. } TPacketGCItemDel;
  1922.  
  1923. typedef struct packet_use_item
  1924. {
  1925. BYTE header;
  1926. TItemPos Cell;
  1927. DWORD ch_vid;
  1928. DWORD victim_vid;
  1929.  
  1930. DWORD vnum;
  1931. } TPacketGCItemUse;
  1932.  
  1933. typedef struct packet_update_item
  1934. {
  1935. BYTE header;
  1936. TItemPos Cell;
  1937. BYTE count;
  1938. #ifdef ENABLE_CHANGELOOK_SYSTEM
  1939. DWORD transmutation;
  1940. #endif
  1941. long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
  1942. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
  1943. } TPacketGCItemUpdate;
  1944.  
  1945. typedef struct packet_ground_add_item
  1946. {
  1947. BYTE bHeader;
  1948. long lX;
  1949. long lY;
  1950. long lZ;
  1951.  
  1952. DWORD dwVID;
  1953. DWORD dwVnum;
  1954. } TPacketGCItemGroundAdd;
  1955.  
  1956. typedef struct packet_ground_del_item
  1957. {
  1958. BYTE header;
  1959. DWORD vid;
  1960. } TPacketGCItemGroundDel;
  1961.  
  1962. typedef struct packet_item_ownership
  1963. {
  1964. BYTE bHeader;
  1965. DWORD dwVID;
  1966. char szName[CHARACTER_NAME_MAX_LEN + 1];
  1967. } TPacketGCItemOwnership;
  1968.  
  1969. typedef struct packet_quickslot_add
  1970. {
  1971. BYTE header;
  1972. BYTE pos;
  1973. TQuickSlot slot;
  1974. } TPacketGCQuickSlotAdd;
  1975.  
  1976. typedef struct packet_quickslot_del
  1977. {
  1978. BYTE header;
  1979. BYTE pos;
  1980. } TPacketGCQuickSlotDel;
  1981.  
  1982. typedef struct packet_quickslot_swap
  1983. {
  1984. BYTE header;
  1985. BYTE pos;
  1986. BYTE change_pos;
  1987. } TPacketGCQuickSlotSwap;
  1988.  
  1989. typedef struct packet_shop_start
  1990. {
  1991. struct packet_shop_item items[SHOP_HOST_ITEM_MAX_NUM];
  1992. } TPacketGCShopStart;
  1993.  
  1994. typedef struct packet_shop_start_ex // 다음에 TSubPacketShopTab* shop_tabs 이 따라옴.
  1995. {
  1996. typedef struct sub_packet_shop_tab
  1997. {
  1998. char name[SHOP_TAB_NAME_MAX];
  1999. BYTE coin_type;
  2000. packet_shop_item items[SHOP_HOST_ITEM_MAX_NUM];
  2001. } TSubPacketShopTab;
  2002. DWORD owner_vid;
  2003. BYTE shop_tab_count;
  2004. } TPacketGCShopStartEx;
  2005.  
  2006.  
  2007. typedef struct packet_shop_update_item
  2008. {
  2009. BYTE pos;
  2010. struct packet_shop_item item;
  2011. } TPacketGCShopUpdateItem;
  2012.  
  2013. typedef struct packet_shop_update_price
  2014. {
  2015. #ifdef ENABLE_YANG_LIMIT
  2016. long long iElkAmount;
  2017. #else
  2018. int iElkAmount;
  2019. #endif
  2020. } TPacketGCShopUpdatePrice;
  2021.  
  2022. enum EPacketShopSubHeaders
  2023. {
  2024. SHOP_SUBHEADER_GC_START,
  2025. SHOP_SUBHEADER_GC_END,
  2026. SHOP_SUBHEADER_GC_UPDATE_ITEM,
  2027. SHOP_SUBHEADER_GC_UPDATE_PRICE,
  2028. SHOP_SUBHEADER_GC_OK,
  2029. SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY,
  2030. SHOP_SUBHEADER_GC_SOLDOUT,
  2031. SHOP_SUBHEADER_GC_INVENTORY_FULL,
  2032. SHOP_SUBHEADER_GC_INVALID_POS,
  2033. SHOP_SUBHEADER_GC_SOLD_OUT,
  2034. SHOP_SUBHEADER_GC_START_EX,
  2035. SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY_EX,
  2036. };
  2037.  
  2038. typedef struct packet_shop
  2039. {
  2040. BYTE header;
  2041. WORD size;
  2042. BYTE subheader;
  2043. } TPacketGCShop;
  2044.  
  2045. typedef struct packet_exchange
  2046. {
  2047. BYTE header;
  2048. BYTE subheader;
  2049. BYTE is_me;
  2050. #ifdef ENABLE_YANG_LIMIT
  2051. long long arg1;
  2052. #else
  2053. DWORD arg1;
  2054. #endif
  2055. TItemPos arg2;
  2056. DWORD arg3;
  2057. BYTE dice;
  2058. long alValues[ITEM_SOCKET_SLOT_MAX_NUM];
  2059. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
  2060. #ifdef ENABLE_CHANGELOOK_SYSTEM
  2061. DWORD dwTransmutation;
  2062. #endif
  2063. } TPacketGCExchange;
  2064.  
  2065. enum
  2066. {
  2067. EXCHANGE_SUBHEADER_GC_START, // arg1 == vid
  2068. EXCHANGE_SUBHEADER_GC_ITEM_ADD, // arg1 == vnum arg2 == pos arg3 == count
  2069. EXCHANGE_SUBHEADER_GC_ITEM_DEL, // arg1 == pos
  2070. EXCHANGE_SUBHEADER_GC_ELK_ADD, // arg1 == elk
  2071. EXCHANGE_SUBHEADER_GC_ACCEPT, // arg1 == accept
  2072. EXCHANGE_SUBHEADER_GC_END, // arg1 == not used
  2073. EXCHANGE_SUBHEADER_GC_ALREADY, // arg1 == not used
  2074. EXCHANGE_SUBHEADER_GC_LESS_ELK, // arg1 == not used
  2075. };
  2076.  
  2077. typedef struct packet_position
  2078. {
  2079. BYTE header;
  2080. DWORD vid;
  2081. BYTE position;
  2082. } TPacketGCPosition;
  2083.  
  2084. typedef struct packet_ping
  2085. {
  2086. BYTE header;
  2087. } TPacketGCPing;
  2088.  
  2089. typedef struct packet_pong
  2090. {
  2091. BYTE bHeader;
  2092. } TPacketCGPong;
  2093.  
  2094. typedef struct packet_script
  2095. {
  2096. BYTE header;
  2097. WORD size;
  2098. BYTE skin;
  2099. WORD src_size;
  2100. } TPacketGCScript;
  2101.  
  2102. typedef struct packet_target
  2103. {
  2104. BYTE header;
  2105. DWORD dwVID;
  2106. BYTE bHPPercent;
  2107. } TPacketGCTarget;
  2108.  
  2109. #ifdef ENABLE_SEND_TARGET_INFO
  2110. typedef struct packet_target_info
  2111. {
  2112. BYTE header;
  2113. DWORD dwVID;
  2114. DWORD race;
  2115. DWORD dwVnum;
  2116. BYTE count;
  2117. } TPacketGCTargetInfo;
  2118.  
  2119. typedef struct packet_target_info_load
  2120. {
  2121. BYTE header;
  2122. DWORD dwVID;
  2123. } TPacketCGTargetInfoLoad;
  2124. #endif
  2125.  
  2126. typedef struct packet_damage_info
  2127. {
  2128. BYTE header;
  2129. DWORD dwVID;
  2130. BYTE flag;
  2131. int damage;
  2132. } TPacketGCDamageInfo;
  2133.  
  2134. typedef struct packet_mount
  2135. {
  2136. BYTE header;
  2137. DWORD vid;
  2138. DWORD mount_vid;
  2139. BYTE pos;
  2140. DWORD _x, _y;
  2141. } TPacketGCMount;
  2142.  
  2143. typedef struct packet_change_speed
  2144. {
  2145. BYTE header;
  2146. DWORD vid;
  2147. WORD moving_speed;
  2148. } TPacketGCChangeSpeed;
  2149.  
  2150. typedef struct packet_move
  2151. {
  2152. BYTE bHeader;
  2153. BYTE bFunc;
  2154. BYTE bArg;
  2155. BYTE bRot;
  2156. DWORD dwVID;
  2157. LONG lX;
  2158. LONG lY;
  2159. DWORD dwTime;
  2160. DWORD dwDuration;
  2161. } TPacketGCMove;
  2162.  
  2163. enum
  2164. {
  2165. QUEST_SEND_IS_BEGIN = 1 << 0,
  2166. QUEST_SEND_TITLE = 1 << 1, // 28자 까지
  2167. QUEST_SEND_CLOCK_NAME = 1 << 2, // 16자 까지
  2168. QUEST_SEND_CLOCK_VALUE = 1 << 3,
  2169. QUEST_SEND_COUNTER_NAME = 1 << 4, // 16자 까지
  2170. QUEST_SEND_COUNTER_VALUE = 1 << 5,
  2171. QUEST_SEND_ICON_FILE = 1 << 6, // 24자 까지
  2172. };
  2173.  
  2174. typedef struct packet_quest_info
  2175. {
  2176. BYTE header;
  2177. WORD size;
  2178. WORD index;
  2179. BYTE flag;
  2180. } TPacketGCQuestInfo;
  2181.  
  2182. typedef struct packet_quest_confirm
  2183. {
  2184. BYTE header;
  2185. char msg[64+1];
  2186. long timeout;
  2187. DWORD requestPID;
  2188. } TPacketGCQuestConfirm;
  2189.  
  2190. typedef struct packet_attack
  2191. {
  2192. BYTE header;
  2193. DWORD dwVID;
  2194. DWORD dwVictimVID; // 적 VID
  2195. BYTE bType; // 공격 유형
  2196. } TPacketGCAttack;
  2197.  
  2198. typedef struct packet_c2c
  2199. {
  2200. BYTE header;
  2201. WORD wSize;
  2202. } TPacketGCC2C;
  2203.  
  2204. typedef struct packetd_sync_position_element
  2205. {
  2206. DWORD dwVID;
  2207. long lX;
  2208. long lY;
  2209. } TPacketGCSyncPositionElement;
  2210.  
  2211. typedef struct packetd_sync_position
  2212. {
  2213. BYTE bHeader;
  2214. WORD wSize;
  2215. } TPacketGCSyncPosition;
  2216.  
  2217. typedef struct packet_ownership
  2218. {
  2219. BYTE bHeader;
  2220. DWORD dwOwnerVID;
  2221. DWORD dwVictimVID;
  2222. } TPacketGCOwnership;
  2223.  
  2224. #define SKILL_MAX_NUM 255
  2225.  
  2226. typedef struct packet_skill_level
  2227. {
  2228. BYTE bHeader;
  2229. BYTE abSkillLevels[SKILL_MAX_NUM];
  2230. } TPacketGCSkillLevel;
  2231.  
  2232. typedef struct SPlayerSkill
  2233. {
  2234. BYTE bMasterType;
  2235. BYTE bLevel;
  2236. time_t tNextRead;
  2237. } TPlayerSkill;
  2238.  
  2239. typedef struct packet_skill_level_new
  2240. {
  2241. BYTE bHeader;
  2242. TPlayerSkill skills[SKILL_MAX_NUM];
  2243. } TPacketGCSkillLevelNew;
  2244.  
  2245. // fly
  2246. typedef struct packet_fly
  2247. {
  2248. BYTE bHeader;
  2249. BYTE bType;
  2250. DWORD dwStartVID;
  2251. DWORD dwEndVID;
  2252. } TPacketGCCreateFly;
  2253.  
  2254. enum EPVPModes
  2255. {
  2256. PVP_MODE_NONE,
  2257. PVP_MODE_AGREE,
  2258. PVP_MODE_FIGHT,
  2259. PVP_MODE_REVENGE,
  2260. PVP_MODE_GHOST,
  2261. };
  2262.  
  2263. typedef struct packet_duel_start
  2264. {
  2265. BYTE header ;
  2266. WORD wSize ; // DWORD가 몇개? 개수 = (wSize - sizeof(TPacketGCPVPList)) / 4
  2267. } TPacketGCDuelStart ;
  2268.  
  2269. typedef struct packet_pvp
  2270. {
  2271. BYTE header;
  2272. DWORD dwVIDSrc;
  2273. DWORD dwVIDDst;
  2274. BYTE bMode;
  2275. } TPacketGCPVP;
  2276.  
  2277. typedef struct packet_skill_cooltime_end
  2278. {
  2279. BYTE header;
  2280. BYTE bSkill;
  2281. } TPacketGCSkillCoolTimeEnd;
  2282.  
  2283. typedef struct packet_warp
  2284. {
  2285. BYTE bHeader;
  2286. LONG lX;
  2287. LONG lY;
  2288. LONG lAddr;
  2289. WORD wPort;
  2290. } TPacketGCWarp;
  2291.  
  2292. typedef struct packet_party_invite
  2293. {
  2294. BYTE header;
  2295. DWORD leader_pid;
  2296. } TPacketGCPartyInvite;
  2297.  
  2298. typedef struct packet_party_add
  2299. {
  2300. BYTE header;
  2301. DWORD pid;
  2302. char name[CHARACTER_NAME_MAX_LEN+1];
  2303. } TPacketGCPartyAdd;
  2304.  
  2305. typedef struct packet_party_update
  2306. {
  2307. BYTE header;
  2308. DWORD pid;
  2309. BYTE state;
  2310. BYTE percent_hp;
  2311. short affects[PARTY_AFFECT_SLOT_MAX_NUM];
  2312. } TPacketGCPartyUpdate;
  2313.  
  2314. typedef struct packet_party_remove
  2315. {
  2316. BYTE header;
  2317. DWORD pid;
  2318. } TPacketGCPartyRemove;
  2319.  
  2320. typedef TPacketCGSafeboxCheckout TPacketGCSafeboxCheckout;
  2321. typedef TPacketCGSafeboxCheckin TPacketGCSafeboxCheckin;
  2322.  
  2323. typedef struct packet_safebox_wrong_password
  2324. {
  2325. BYTE bHeader;
  2326. } TPacketGCSafeboxWrongPassword;
  2327.  
  2328. typedef struct packet_safebox_size
  2329. {
  2330. BYTE bHeader;
  2331. BYTE bSize;
  2332. } TPacketGCSafeboxSize;
  2333.  
  2334. typedef struct packet_safebox_money_change
  2335. {
  2336. BYTE bHeader;
  2337. DWORD dwMoney;
  2338. } TPacketGCSafeboxMoneyChange;
  2339.  
  2340. typedef struct command_empire
  2341. {
  2342. BYTE bHeader;
  2343. BYTE bEmpire;
  2344. } TPacketCGEmpire;
  2345.  
  2346. typedef struct packet_empire
  2347. {
  2348. BYTE bHeader;
  2349. BYTE bEmpire;
  2350. } TPacketGCEmpire;
  2351.  
  2352. enum
  2353. {
  2354. FISHING_SUBHEADER_GC_START,
  2355. FISHING_SUBHEADER_GC_STOP,
  2356. FISHING_SUBHEADER_GC_REACT,
  2357. FISHING_SUBHEADER_GC_SUCCESS,
  2358. FISHING_SUBHEADER_GC_FAIL,
  2359. FISHING_SUBHEADER_GC_FISH,
  2360. };
  2361.  
  2362. typedef struct packet_fishing
  2363. {
  2364. BYTE header;
  2365. BYTE subheader;
  2366. DWORD info;
  2367. BYTE dir;
  2368. } TPacketGCFishing;
  2369.  
  2370. typedef struct paryt_parameter
  2371. {
  2372. BYTE bHeader;
  2373. BYTE bDistributeMode;
  2374. } TPacketGCPartyParameter;
  2375.  
  2376. //////////////////////////////////////////////////////////////////////////
  2377. // Guild
  2378.  
  2379. enum
  2380. {
  2381. GUILD_SUBHEADER_GC_LOGIN,
  2382. GUILD_SUBHEADER_GC_LOGOUT,
  2383. GUILD_SUBHEADER_GC_LIST,
  2384. GUILD_SUBHEADER_GC_GRADE,
  2385. GUILD_SUBHEADER_GC_ADD,
  2386. GUILD_SUBHEADER_GC_REMOVE,
  2387. GUILD_SUBHEADER_GC_GRADE_NAME,
  2388. GUILD_SUBHEADER_GC_GRADE_AUTH,
  2389. GUILD_SUBHEADER_GC_INFO,
  2390. GUILD_SUBHEADER_GC_COMMENTS,
  2391. GUILD_SUBHEADER_GC_CHANGE_EXP,
  2392. GUILD_SUBHEADER_GC_CHANGE_MEMBER_GRADE,
  2393. GUILD_SUBHEADER_GC_SKILL_INFO,
  2394. GUILD_SUBHEADER_GC_CHANGE_MEMBER_GENERAL,
  2395. GUILD_SUBHEADER_GC_GUILD_INVITE,
  2396. GUILD_SUBHEADER_GC_WAR,
  2397. GUILD_SUBHEADER_GC_GUILD_NAME,
  2398. GUILD_SUBHEADER_GC_GUILD_WAR_LIST,
  2399. GUILD_SUBHEADER_GC_GUILD_WAR_END_LIST,
  2400. GUILD_SUBHEADER_GC_WAR_POINT,
  2401. GUILD_SUBHEADER_GC_MONEY_CHANGE,
  2402. };
  2403.  
  2404. typedef struct packet_guild
  2405. {
  2406. BYTE header;
  2407. WORD size;
  2408. BYTE subheader;
  2409. } TPacketGCGuild;
  2410.  
  2411. // SubHeader - Grade
  2412. enum
  2413. {
  2414. GUILD_AUTH_ADD_MEMBER = (1 << 0),
  2415. GUILD_AUTH_REMOVE_MEMBER = (1 << 1),
  2416. GUILD_AUTH_NOTICE = (1 << 2),
  2417. GUILD_AUTH_SKILL = (1 << 3),
  2418. };
  2419.  
  2420. typedef struct packet_guild_sub_grade
  2421. {
  2422. char grade_name[GUILD_GRADE_NAME_MAX_LEN+1]; // 8+1 길드장, 길드원 등의 이름
  2423. BYTE auth_flag;
  2424. } TPacketGCGuildSubGrade;
  2425.  
  2426. typedef struct packet_guild_sub_member
  2427. {
  2428. DWORD pid;
  2429. BYTE byGrade;
  2430. BYTE byIsGeneral;
  2431. BYTE byJob;
  2432. BYTE byLevel;
  2433. DWORD dwOffer;
  2434. BYTE byNameFlag;
  2435. // if NameFlag is TRUE, name is sent from server.
  2436. // char szName[CHARACTER_ME_MAX_LEN+1];
  2437. } TPacketGCGuildSubMember;
  2438.  
  2439. typedef struct packet_guild_sub_info
  2440. {
  2441. WORD member_count;
  2442. WORD max_member_count;
  2443. DWORD guild_id;
  2444. DWORD master_pid;
  2445. DWORD exp;
  2446. BYTE level;
  2447. char name[GUILD_NAME_MAX_LEN+1];
  2448. DWORD gold;
  2449. BYTE hasLand;
  2450. } TPacketGCGuildInfo;
  2451.  
  2452. enum EGuildWarState
  2453. {
  2454. GUILD_WAR_NONE,
  2455. GUILD_WAR_SEND_DECLARE,
  2456. GUILD_WAR_REFUSE,
  2457. GUILD_WAR_RECV_DECLARE,
  2458. GUILD_WAR_WAIT_START,
  2459. GUILD_WAR_CANCEL,
  2460. GUILD_WAR_ON_WAR,
  2461. GUILD_WAR_END,
  2462.  
  2463. GUILD_WAR_DURATION = 2*60*60, // 2시간
  2464. };
  2465.  
  2466. typedef struct packet_guild_war
  2467. {
  2468. DWORD dwGuildSelf;
  2469. DWORD dwGuildOpp;
  2470. BYTE bType;
  2471. BYTE bWarState;
  2472. } TPacketGCGuildWar;
  2473.  
  2474. typedef struct SPacketGuildWarPoint
  2475. {
  2476. DWORD dwGainGuildID;
  2477. DWORD dwOpponentGuildID;
  2478. long lPoint;
  2479. } TPacketGuildWarPoint;
  2480.  
  2481. // SubHeader - Dungeon
  2482. enum
  2483. {
  2484. DUNGEON_SUBHEADER_GC_TIME_ATTACK_START = 0,
  2485. DUNGEON_SUBHEADER_GC_DESTINATION_POSITION = 1,
  2486. };
  2487.  
  2488. typedef struct packet_dungeon
  2489. {
  2490. BYTE bHeader;
  2491. WORD size;
  2492. BYTE subheader;
  2493. } TPacketGCDungeon;
  2494.  
  2495. // Private Shop
  2496. typedef struct SPacketGCShopSign
  2497. {
  2498. BYTE bHeader;
  2499. DWORD dwVID;
  2500. char szSign[SHOP_SIGN_MAX_LEN + 1];
  2501. } TPacketGCShopSign;
  2502.  
  2503. typedef struct SPacketGCTime
  2504. {
  2505. BYTE bHeader;
  2506. time_t time;
  2507. } TPacketGCTime;
  2508.  
  2509. enum
  2510. {
  2511. WALKMODE_RUN,
  2512. WALKMODE_WALK,
  2513. };
  2514.  
  2515. typedef struct SPacketGCWalkMode
  2516. {
  2517. BYTE header;
  2518. DWORD vid;
  2519. BYTE mode;
  2520. } TPacketGCWalkMode;
  2521.  
  2522. typedef struct SPacketGCChangeSkillGroup
  2523. {
  2524. BYTE header;
  2525. BYTE skill_group;
  2526. } TPacketGCChangeSkillGroup;
  2527.  
  2528. struct TMaterial
  2529. {
  2530. DWORD vnum;
  2531. DWORD count;
  2532. };
  2533.  
  2534. typedef struct SRefineTable
  2535. {
  2536. DWORD src_vnum;
  2537. DWORD result_vnum;
  2538. BYTE material_count;
  2539. int cost; // 소요 비용
  2540. int prob; // 확률
  2541. TMaterial materials[REFINE_MATERIAL_MAX_NUM];
  2542. } TRefineTable;
  2543.  
  2544. typedef struct SPacketGCRefineInformation
  2545. {
  2546. BYTE header;
  2547. BYTE pos;
  2548. TRefineTable refine_table;
  2549. } TPacketGCRefineInformation;
  2550.  
  2551. typedef struct SPacketGCRefineInformationNew
  2552. {
  2553. BYTE header;
  2554. BYTE type;
  2555. BYTE pos;
  2556. TRefineTable refine_table;
  2557. } TPacketGCRefineInformationNew;
  2558.  
  2559. enum SPECIAL_EFFECT
  2560. {
  2561. SE_NONE,
  2562. SE_HPUP_RED,
  2563. SE_SPUP_BLUE,
  2564. SE_SPEEDUP_GREEN,
  2565. SE_DXUP_PURPLE,
  2566. SE_CRITICAL,
  2567. SE_PENETRATE,
  2568. SE_BLOCK,
  2569. SE_DODGE,
  2570. SE_CHINA_FIREWORK,
  2571. SE_SPIN_TOP,
  2572. SE_SUCCESS,
  2573. SE_FAIL,
  2574. SE_FR_SUCCESS,
  2575. SE_LEVELUP_ON_14_FOR_GERMANY, //레벨업 14일때 ( 독일전용 )
  2576. SE_LEVELUP_UNDER_15_FOR_GERMANY,//레벨업 15일때 ( 독일전용 )
  2577. SE_PERCENT_DAMAGE1,
  2578. SE_PERCENT_DAMAGE2,
  2579. SE_PERCENT_DAMAGE3,
  2580. SE_AUTO_HPUP,
  2581. SE_AUTO_SPUP,
  2582. SE_EQUIP_RAMADAN_RING, // 초승달의 반지를 착용하는 순간에 발동하는 이펙트
  2583. SE_EQUIP_HALLOWEEN_CANDY, // 할로윈 사탕을 착용(-_-;)한 순간에 발동하는 이펙트
  2584. SE_EQUIP_HAPPINESS_RING, // 크리스마스 행복의 반지를 착용하는 순간에 발동하는 이펙트
  2585. SE_EQUIP_LOVE_PENDANT, // 발렌타인 사랑의 팬던트(71145) 착용할 때 이펙트 (발동이펙트임, 지속이펙트 아님)
  2586. #ifdef ENABLE_SASH_SYSTEM
  2587. SE_EFFECT_SASH_SUCCEDED,
  2588. SE_EFFECT_SASH_EQUIP,
  2589. #endif
  2590. #ifdef VERSION_162_ENABLED
  2591. SE_EFFECT_HEALER,
  2592. #endif
  2593.  
  2594. };
  2595.  
  2596. typedef struct SPacketGCSpecialEffect
  2597. {
  2598. BYTE header;
  2599. BYTE type;
  2600. DWORD vid;
  2601. } TPacketGCSpecialEffect;
  2602.  
  2603. typedef struct SPacketGCNPCPosition
  2604. {
  2605. BYTE header;
  2606. WORD size;
  2607. WORD count;
  2608. } TPacketGCNPCPosition;
  2609.  
  2610. struct TNPCPosition
  2611. {
  2612. BYTE bType;
  2613. char name[CHARACTER_NAME_MAX_LEN+1];
  2614. long x;
  2615. long y;
  2616. };
  2617.  
  2618. typedef struct SPacketGCChangeName
  2619. {
  2620. BYTE header;
  2621. DWORD pid;
  2622. char name[CHARACTER_NAME_MAX_LEN+1];
  2623. } TPacketGCChangeName;
  2624.  
  2625. enum EBlockAction
  2626. {
  2627. BLOCK_EXCHANGE = (1 << 0),
  2628. BLOCK_PARTY_INVITE = (1 << 1),
  2629. BLOCK_GUILD_INVITE = (1 << 2),
  2630. BLOCK_WHISPER = (1 << 3),
  2631. BLOCK_MESSENGER_INVITE = (1 << 4),
  2632. BLOCK_PARTY_REQUEST = (1 << 5),
  2633. };
  2634.  
  2635. typedef struct packet_china_matrixd_card
  2636. {
  2637. BYTE bHeader;
  2638. DWORD dwRows;
  2639. DWORD dwCols;
  2640. } TPacketGCChinaMatrixCard;
  2641.  
  2642. typedef struct packet_runup_matrixd_quiz
  2643. {
  2644. BYTE bHeader;
  2645. char szQuiz[RUNUP_MATRIX_QUIZ_MAX_LEN + 1];
  2646. } TPacketGCRunupMatrixQuiz;
  2647.  
  2648. typedef struct packet_newcibn_passpod_request
  2649. {
  2650. BYTE bHeader;
  2651. } TPacketGCNEWCIBNPasspodRequest;
  2652.  
  2653. typedef struct packet_newcibn_passpod_failure
  2654. {
  2655. BYTE bHeader;
  2656. char szMessage[NEWCIBN_PASSPOD_FAILURE_MAX_LEN + 1];
  2657. } TPacketGCNEWCIBNPasspodFailure;
  2658.  
  2659. typedef struct packet_login_key
  2660. {
  2661. BYTE bHeader;
  2662. DWORD dwLoginKey;
  2663. } TPacketGCLoginKey;
  2664.  
  2665. typedef struct packet_auth_success
  2666. {
  2667. BYTE bHeader;
  2668. DWORD dwLoginKey;
  2669. BYTE bResult;
  2670. } TPacketGCAuthSuccess;
  2671.  
  2672. typedef struct packet_auth_success_openid
  2673. {
  2674. BYTE bHeader;
  2675. DWORD dwLoginKey;
  2676. BYTE bResult;
  2677. char login[ID_MAX_NUM + 1];
  2678. } TPacketGCAuthSuccessOpenID;
  2679.  
  2680. typedef struct packet_channel
  2681. {
  2682. BYTE header;
  2683. BYTE channel;
  2684. } TPacketGCChannel;
  2685.  
  2686. typedef struct SEquipmentItemSet
  2687. {
  2688. DWORD vnum;
  2689. BYTE count;
  2690. long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
  2691. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
  2692. } TEquipmentItemSet;
  2693.  
  2694. typedef struct pakcet_view_equip
  2695. {
  2696. BYTE header;
  2697. DWORD dwVID;
  2698. TEquipmentItemSet equips[WEAR_MAX_NUM];
  2699. } TPacketGCViewEquip;
  2700.  
  2701. typedef struct
  2702. {
  2703. DWORD dwID;
  2704. long x, y;
  2705. long width, height;
  2706. DWORD dwGuildID;
  2707. } TLandPacketElement;
  2708.  
  2709. typedef struct packet_land_list
  2710. {
  2711. BYTE header;
  2712. WORD size;
  2713. } TPacketGCLandList;
  2714.  
  2715. typedef struct
  2716. {
  2717. BYTE bHeader;
  2718. long lID;
  2719. char szTargetName[32+1];
  2720. } TPacketGCTargetCreate;
  2721.  
  2722. enum
  2723. {
  2724. CREATE_TARGET_TYPE_NONE,
  2725. CREATE_TARGET_TYPE_LOCATION,
  2726. CREATE_TARGET_TYPE_CHARACTER,
  2727. #if defined(ENABLE_SHOP_SEARCH)
  2728. CREATE_TARGET_TYPE_SHOP,
  2729. #endif
  2730. };
  2731.  
  2732. typedef struct
  2733. {
  2734. BYTE bHeader;
  2735. long lID;
  2736. char szTargetName[32+1];
  2737. DWORD dwVID;
  2738. BYTE byType;
  2739. } TPacketGCTargetCreateNew;
  2740.  
  2741. typedef struct
  2742. {
  2743. BYTE bHeader;
  2744. long lID;
  2745. long lX, lY;
  2746. } TPacketGCTargetUpdate;
  2747.  
  2748. typedef struct
  2749. {
  2750. BYTE bHeader;
  2751. long lID;
  2752. } TPacketGCTargetDelete;
  2753.  
  2754. typedef struct
  2755. {
  2756. DWORD dwType;
  2757. BYTE bPointIdxApplyOn;
  2758. long lApplyValue;
  2759. DWORD dwFlag;
  2760. long lDuration;
  2761. long lSPCost;
  2762. } TPacketAffectElement;
  2763.  
  2764. typedef struct
  2765. {
  2766. BYTE bHeader;
  2767. TPacketAffectElement elem;
  2768. } TPacketGCAffectAdd;
  2769.  
  2770. typedef struct
  2771. {
  2772. BYTE bHeader;
  2773. DWORD dwType;
  2774. BYTE bApplyOn;
  2775. } TPacketGCAffectRemove;
  2776.  
  2777. typedef struct packet_mall_open
  2778. {
  2779. BYTE bHeader;
  2780. BYTE bSize;
  2781. } TPacketGCMallOpen;
  2782.  
  2783. typedef struct packet_lover_info
  2784. {
  2785. BYTE bHeader;
  2786. char szName[CHARACTER_NAME_MAX_LEN + 1];
  2787. BYTE byLovePoint;
  2788. } TPacketGCLoverInfo;
  2789.  
  2790. typedef struct packet_love_point_update
  2791. {
  2792. BYTE bHeader;
  2793. BYTE byLovePoint;
  2794. } TPacketGCLovePointUpdate;
  2795.  
  2796. typedef struct packet_dig_motion
  2797. {
  2798. BYTE header;
  2799. DWORD vid;
  2800. DWORD target_vid;
  2801. BYTE count;
  2802. } TPacketGCDigMotion;
  2803.  
  2804. typedef struct SPacketGCOnTime
  2805. {
  2806. BYTE header;
  2807. int ontime; // sec
  2808. } TPacketGCOnTime;
  2809.  
  2810. typedef struct SPacketGCResetOnTime
  2811. {
  2812. BYTE header;
  2813. } TPacketGCResetOnTime;
  2814.  
  2815. typedef struct SPacketGCPanamaPack
  2816. {
  2817. BYTE bHeader;
  2818. char szPackName[256];
  2819. BYTE abIV[32];
  2820. } TPacketGCPanamaPack;
  2821.  
  2822. typedef struct SPacketGCHybridCryptKeys
  2823. {
  2824. private:
  2825. SPacketGCHybridCryptKeys() : m_pStream(NULL) {}
  2826.  
  2827. public:
  2828. SPacketGCHybridCryptKeys(int iStreamSize) : iKeyStreamLen(iStreamSize)
  2829. {
  2830. m_pStream = new BYTE[iStreamSize];
  2831. }
  2832. ~SPacketGCHybridCryptKeys()
  2833. {
  2834. if( m_pStream )
  2835. {
  2836. delete[] m_pStream;
  2837. m_pStream = NULL;
  2838. }
  2839. }
  2840. static int GetFixedHeaderSize()
  2841. {
  2842. return sizeof(BYTE)+sizeof(WORD)+sizeof(int);
  2843. }
  2844.  
  2845. BYTE bHeader;
  2846. WORD wDynamicPacketSize;
  2847. int iKeyStreamLen;
  2848. BYTE* m_pStream;
  2849.  
  2850. } TPacketGCHybridCryptKeys;
  2851.  
  2852.  
  2853. typedef struct SPacketGCHybridSDB
  2854. {
  2855. private:
  2856. SPacketGCHybridSDB() : m_pStream(NULL) {}
  2857.  
  2858. public:
  2859. SPacketGCHybridSDB(int iStreamSize) : iSDBStreamLen(iStreamSize)
  2860. {
  2861. m_pStream = new BYTE[iStreamSize];
  2862. }
  2863. ~SPacketGCHybridSDB()
  2864. {
  2865. delete[] m_pStream;
  2866. m_pStream = NULL;
  2867. }
  2868. static int GetFixedHeaderSize()
  2869. {
  2870. return sizeof(BYTE)+sizeof(WORD)+sizeof(int);
  2871. }
  2872.  
  2873. BYTE bHeader;
  2874. WORD wDynamicPacketSize;
  2875. int iSDBStreamLen;
  2876. BYTE* m_pStream;
  2877.  
  2878. } TPacketGCHybridSDB;
  2879. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2880. // Client To Client
  2881.  
  2882. typedef struct packet_state
  2883. {
  2884. BYTE bHeader;
  2885. BYTE bFunc;
  2886. BYTE bArg;
  2887. BYTE bRot;
  2888. DWORD dwVID;
  2889. DWORD dwTime;
  2890. TPixelPosition kPPos;
  2891. } TPacketCCState;
  2892.  
  2893. typedef struct packet_hs_check_req
  2894. {
  2895. BYTE bHeader;
  2896. AHNHS_TRANS_BUFFER Req;
  2897. } TPacketHSCheck;
  2898.  
  2899. //NOTE : recv/send에 공통으로 생김, bPacketData의 내용만 바뀐다.
  2900. typedef struct packet_xtrap_verify
  2901. {
  2902. BYTE bHeader;
  2903. BYTE bPacketData[128];
  2904.  
  2905. } TPacketXTrapCSVerify;
  2906. // AUTOBAN
  2907. typedef struct packet_autoban_quiz
  2908. {
  2909. BYTE bHeader;
  2910. BYTE bDuration;
  2911. BYTE bCaptcha[64*32];
  2912. char szQuiz[256];
  2913. } TPacketGCAutoBanQuiz;
  2914. // END_OF_AUTOBAN
  2915.  
  2916. #ifdef _IMPROVED_PACKET_ENCRYPTION_
  2917. struct TPacketKeyAgreement
  2918. {
  2919. static const int MAX_DATA_LEN = 256;
  2920. BYTE bHeader;
  2921. WORD wAgreedLength;
  2922. WORD wDataLength;
  2923. BYTE data[MAX_DATA_LEN];
  2924. };
  2925.  
  2926. struct TPacketKeyAgreementCompleted
  2927. {
  2928. BYTE bHeader;
  2929. BYTE data[3]; // dummy (not used)
  2930. };
  2931. #endif // _IMPROVED_PACKET_ENCRYPTION_
  2932.  
  2933. #ifdef __AUCTION__
  2934. // Argument의 용도는 cmd에 따라 다르다.
  2935. typedef struct SPacketCGAuctionCmd
  2936. {
  2937. BYTE bHeader;
  2938. BYTE cmd;
  2939. int arg1;
  2940. int arg2;
  2941. int arg3;
  2942. int arg4;
  2943. } TPacketCGAuctionCmd;
  2944.  
  2945. typedef struct SPacketGCAuctionItemListPack
  2946. {
  2947. BYTE bHeader;
  2948. BYTE bNumbers;
  2949. } TPacketGCAuctionItemListPack;
  2950.  
  2951. #endif
  2952.  
  2953. typedef struct SPacketGCSpecificEffect
  2954. {
  2955. BYTE header;
  2956. DWORD vid;
  2957. char effect_file[128];
  2958. } TPacketGCSpecificEffect;
  2959.  
  2960. // 용혼석
  2961. enum EDragonSoulRefineWindowRefineType
  2962. {
  2963. DragonSoulRefineWindow_UPGRADE,
  2964. DragonSoulRefineWindow_IMPROVEMENT,
  2965. DragonSoulRefineWindow_REFINE,
  2966. };
  2967.  
  2968. enum EPacketCGDragonSoulSubHeaderType
  2969. {
  2970. DS_SUB_HEADER_OPEN,
  2971. DS_SUB_HEADER_CLOSE,
  2972. DS_SUB_HEADER_DO_UPGRADE,
  2973. DS_SUB_HEADER_DO_IMPROVEMENT,
  2974. DS_SUB_HEADER_DO_REFINE,
  2975. DS_SUB_HEADER_REFINE_FAIL,
  2976. DS_SUB_HEADER_REFINE_FAIL_MAX_REFINE,
  2977. DS_SUB_HEADER_REFINE_FAIL_INVALID_MATERIAL,
  2978. DS_SUB_HEADER_REFINE_FAIL_NOT_ENOUGH_MONEY,
  2979. DS_SUB_HEADER_REFINE_FAIL_NOT_ENOUGH_MATERIAL,
  2980. DS_SUB_HEADER_REFINE_FAIL_TOO_MUCH_MATERIAL,
  2981. DS_SUB_HEADER_REFINE_SUCCEED,
  2982. };
  2983.  
  2984. typedef struct SPacketCGDragonSoulRefine
  2985. {
  2986. SPacketCGDragonSoulRefine() : header (HEADER_CG_DRAGON_SOUL_REFINE)
  2987. {}
  2988. BYTE header;
  2989. BYTE bSubType;
  2990. TItemPos ItemGrid[DS_REFINE_WINDOW_MAX_NUM];
  2991. } TPacketCGDragonSoulRefine;
  2992.  
  2993. typedef struct SPacketGCDragonSoulRefine
  2994. {
  2995. SPacketGCDragonSoulRefine() : header(HEADER_GC_DRAGON_SOUL_REFINE)
  2996. {}
  2997. BYTE header;
  2998. BYTE bSubType;
  2999. TItemPos Pos;
  3000. } TPacketGCDragonSoulRefine;
  3001.  
  3002. #ifdef ENABLE_TITLE_SYSTEM
  3003. typedef struct SPacketGGTitleInfo
  3004. {
  3005. BYTE bHeader;
  3006. int iTitle;
  3007. BYTE bAnswer;
  3008. } TPacketGGTitleInfo;
  3009. #endif
  3010.  
  3011. typedef struct SChannelStatus
  3012. {
  3013. short nPort;
  3014. BYTE bStatus;
  3015. } TChannelStatus;
  3016.  
  3017. #ifdef ENABLE_CHANGELOOK_SYSTEM
  3018. enum EChangeLookInfo
  3019. {
  3020. CL_WINDOW_MAX_MATERIALS = 2,
  3021. CL_CLEAN_ATTR_VALUE0 = 8,
  3022. };
  3023.  
  3024. enum
  3025. {
  3026. HEADER_CG_CL = 213,
  3027. HEADER_GC_CL = 218,
  3028. CL_SUBHEADER_OPEN = 0,
  3029. CL_SUBHEADER_CLOSE,
  3030. CL_SUBHEADER_ADD,
  3031. CL_SUBHEADER_REMOVE,
  3032. CL_SUBHEADER_REFINE,
  3033. };
  3034.  
  3035. typedef struct SPacketChangeLook
  3036. {
  3037. BYTE header;
  3038. BYTE subheader;
  3039. DWORD dwCost;
  3040. BYTE bPos;
  3041. TItemPos tPos;
  3042. } TPacketChangeLook;
  3043.  
  3044. typedef struct SChangeLookMaterial
  3045. {
  3046. BYTE bHere;
  3047. WORD wCell;
  3048. } TChangeLookMaterial;
  3049. #endif
  3050.  
  3051. #ifdef ENABLE_SASH_SYSTEM
  3052. enum ESashInfo
  3053. {
  3054. SASH_ABSORPTION_SOCKET = 0,
  3055. SASH_ABSORBED_SOCKET = 1,
  3056. SASH_CLEAN_ATTR_VALUE0 = 7,
  3057. SASH_WINDOW_MAX_MATERIALS = 2,
  3058. };
  3059.  
  3060. enum
  3061. {
  3062. HEADER_CG_SASH = 211,
  3063. HEADER_GC_SASH = 215,
  3064. SASH_SUBHEADER_GC_OPEN = 0,
  3065. SASH_SUBHEADER_GC_CLOSE,
  3066. SASH_SUBHEADER_GC_ADDED,
  3067. SASH_SUBHEADER_GC_REMOVED,
  3068. SASH_SUBHEADER_CG_REFINED,
  3069. SASH_SUBHEADER_CG_CLOSE = 0,
  3070. SASH_SUBHEADER_CG_ADD,
  3071. SASH_SUBHEADER_CG_REMOVE,
  3072. SASH_SUBHEADER_CG_REFINE,
  3073. };
  3074.  
  3075. typedef struct SPacketSash
  3076. {
  3077. BYTE header;
  3078. BYTE subheader;
  3079. bool bWindow;
  3080. DWORD dwPrice;
  3081. BYTE bPos;
  3082. TItemPos tPos;
  3083. DWORD dwItemVnum;
  3084. DWORD dwMinAbs;
  3085. DWORD dwMaxAbs;
  3086. } TPacketSash;
  3087.  
  3088. typedef struct SSashMaterial
  3089. {
  3090. BYTE bHere;
  3091. WORD wCell;
  3092. } TSashMaterial;
  3093.  
  3094. typedef struct SSashResult
  3095. {
  3096. DWORD dwItemVnum;
  3097. DWORD dwMinAbs;
  3098. DWORD dwMaxAbs;
  3099. } TSashResult;
  3100. #endif
  3101.  
  3102. // @fixme007 length 2
  3103. typedef struct packet_unk_213
  3104. {
  3105. BYTE bHeader;
  3106. BYTE bUnk2;
  3107. } TPacketGCUnk213;
  3108.  
  3109. #pragma pack(pop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement