Advertisement
Guest User

Untitled

a guest
Jan 27th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.33 KB | None | 0 0
  1. #ifndef __INC_PACKET_H__
  2. #define __INC_PACKET_H__
  3. #include "stdafx.h"
  4.  
  5. enum
  6. {
  7. HEADER_CG_HANDSHAKE = 0xff,
  8. HEADER_CG_PONG = 0xfe,
  9. HEADER_CG_TIME_SYNC = 0xfc,
  10. HEADER_CG_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_
  11.  
  12. HEADER_CG_LOGIN = 1,
  13. HEADER_CG_ATTACK = 2,
  14. HEADER_CG_CHAT = 3,
  15. HEADER_CG_CHARACTER_CREATE = 4,
  16. HEADER_CG_CHARACTER_DELETE = 5,
  17. HEADER_CG_CHARACTER_SELECT = 6,
  18. HEADER_CG_MOVE = 7,
  19. HEADER_CG_SYNC_POSITION = 8,
  20. HEADER_CG_ENTERGAME = 10,
  21.  
  22. HEADER_CG_ITEM_USE = 11,
  23. HEADER_CG_ITEM_DROP = 12,
  24. HEADER_CG_ITEM_MOVE = 13,
  25. HEADER_CG_ITEM_PICKUP = 15,
  26.  
  27. HEADER_CG_QUICKSLOT_ADD = 16,
  28. HEADER_CG_QUICKSLOT_DEL = 17,
  29. HEADER_CG_QUICKSLOT_SWAP = 18,
  30. HEADER_CG_WHISPER = 19,
  31. #ifdef NEW_ADD_INVENTORY
  32. ENVANTER_BLACK = 23,
  33. #endif
  34. HEADER_CG_ITEM_DROP2 = 20,
  35. HEADER_CG_ITEM_DESTROY = 21,
  36.  
  37. HEADER_CG_ON_CLICK = 26,
  38. HEADER_CG_EXCHANGE = 27,
  39. HEADER_CG_CHARACTER_POSITION = 28,
  40. HEADER_CG_SCRIPT_ANSWER = 29,
  41. HEADER_CG_QUEST_INPUT_STRING = 30,
  42. HEADER_CG_QUEST_CONFIRM = 31,
  43.  
  44. HEADER_CG_SHOP = 50,
  45. HEADER_CG_FLY_TARGETING = 51,
  46. HEADER_CG_USE_SKILL = 52,
  47. HEADER_CG_ADD_FLY_TARGETING = 53,
  48. HEADER_CG_SHOOT = 54,
  49. HEADER_CG_MYSHOP = 55,
  50.  
  51. HEADER_CG_ITEM_USE_TO_ITEM = 60,
  52. HEADER_CG_TARGET = 61,
  53.  
  54. HEADER_CG_TEXT = 64, // @ 로 시작되면 텍스트를 파싱한다.
  55. HEADER_CG_WARP = 65,
  56. HEADER_CG_SCRIPT_BUTTON = 66,
  57. HEADER_CG_MESSENGER = 67,
  58.  
  59. HEADER_CG_MALL_CHECKOUT = 69,
  60. HEADER_CG_SAFEBOX_CHECKIN = 70, // 아이템을 창고에 넣†š는다.
  61. HEADER_CG_SAFEBOX_CHECKOUT = 71, // 아이템을 창고로 부터 빼온다.
  62.  
  63. HEADER_CG_PARTY_INVITE = 72,
  64. HEADER_CG_PARTY_INVITE_ANSWER = 73,
  65. HEADER_CG_PARTY_REMOVE = 74,
  66. HEADER_CG_PARTY_SET_STATE = 75,
  67. HEADER_CG_PARTY_USE_SKILL = 76,
  68. HEADER_CG_SAFEBOX_ITEM_MOVE = 77,
  69. HEADER_CG_PARTY_PARAMETER = 78,
  70.  
  71. HEADER_CG_GUILD = 80,
  72. HEADER_CG_ANSWER_MAKE_GUILD = 81,
  73.  
  74. HEADER_CG_FISHING = 82,
  75.  
  76. HEADER_CG_ITEM_GIVE = 83,
  77.  
  78. HEADER_CG_EMPIRE = 90,
  79.  
  80. HEADER_CG_REFINE = 96,
  81.  
  82. HEADER_CG_MARK_LOGIN = 100,
  83. HEADER_CG_MARK_CRCLIST = 101,
  84. HEADER_CG_MARK_UPLOAD = 102,
  85. HEADER_CG_MARK_IDXLIST = 104,
  86.  
  87. HEADER_CG_HACK = 105,
  88. HEADER_CG_CHANGE_NAME = 106,
  89. HEADER_CG_LOGIN2 = 109,
  90. HEADER_CG_DUNGEON = 110,
  91. HEADER_CG_LOGIN3 = 112,
  92.  
  93. HEADER_CG_GUILD_SYMBOL_UPLOAD = 111,
  94. HEADER_CG_SYMBOL_CRC = 113,
  95.  
  96. // SCRIPT_SELECT_ITEM
  97. HEADER_CG_SCRIPT_SELECT_ITEM = 114,
  98. // END_OF_SCRIPT_SELECT_ITEM
  99.  
  100. HEADER_CG_LOGIN5_OPENID = 116, //OpenID : 클라이언트로부터 OpenID 인증키를 받는다.
  101.  
  102. // HEADER_CG_ROULETTE = 200,
  103. // HEADER_CG_RUNUP_MATRIX_ANSWER = 201,
  104.  
  105. //
  106. HEADER_CG_PASSPOD_ANSWER = 202,
  107.  
  108. //NOTE : 이런 개XXX 정말 이거 Packet설계한 사람은 누구냐. 이렇게 코딩하고 밥이 넘어가나.
  109. //enum을 별도로 구별을 하던가. 아님 namepsace로 구별을 하던가..
  110. //정말 packet generator까지는 바라지도 않는다. 이런 씨XX
  111. //이러다가 숫자 겹치면 누가 책임지는데???
  112. HEADER_CG_HS_ACK = 203,
  113. HEADER_CG_XTRAP_ACK = 204,
  114.  
  115. HEADER_CG_DRAGON_SOUL_REFINE = 205,
  116. HEADER_CG_STATE_CHECKER = 206,
  117.  
  118. HEADER_CG_CLIENT_VERSION = 0xfd,
  119. HEADER_CG_CLIENT_VERSION2 = 0xf1,
  120.  
  121. /********************************************************/
  122. HEADER_GC_KEY_AGREEMENT_COMPLETED = 0xfa, // _IMPROVED_PACKET_ENCRYPTION_
  123. HEADER_GC_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_
  124. HEADER_GC_TIME_SYNC = 0xfc,
  125. HEADER_GC_PHASE = 0xfd,
  126. HEADER_GC_BINDUDP = 0xfe,
  127. HEADER_GC_HANDSHAKE = 0xff,
  128.  
  129. HEADER_GC_CHARACTER_ADD = 1,
  130. HEADER_GC_CHARACTER_DEL = 2,
  131. HEADER_GC_MOVE = 3,
  132. HEADER_GC_CHAT = 4,
  133. HEADER_GC_SYNC_POSITION = 5,
  134.  
  135. HEADER_GC_LOGIN_SUCCESS = 6,
  136. HEADER_GC_LOGIN_SUCCESS_NEWSLOT = 32,
  137. HEADER_GC_LOGIN_FAILURE = 7,
  138.  
  139. HEADER_GC_CHARACTER_CREATE_SUCCESS = 8,
  140. HEADER_GC_CHARACTER_CREATE_FAILURE = 9,
  141. HEADER_GC_CHARACTER_DELETE_SUCCESS = 10,
  142. HEADER_GC_CHARACTER_DELETE_WRONG_SOCIAL_ID = 11,
  143.  
  144. HEADER_GC_ATTACK = 12,
  145. HEADER_GC_STUN = 13,
  146. HEADER_GC_DEAD = 14,
  147.  
  148. HEADER_GC_MAIN_CHARACTER_OLD = 15,
  149. HEADER_GC_CHARACTER_POINTS = 16,
  150. HEADER_GC_CHARACTER_POINT_CHANGE = 17,
  151. HEADER_GC_CHANGE_SPEED = 18,
  152. HEADER_GC_CHARACTER_UPDATE = 19,
  153. HEADER_GC_CHARACTER_UPDATE_NEW = 24,
  154.  
  155. HEADER_GC_ITEM_DEL = 20,
  156. HEADER_GC_ITEM_SET = 21,
  157. HEADER_GC_ITEM_USE = 22,
  158. HEADER_GC_ITEM_DROP = 23,
  159. HEADER_GC_ITEM_UPDATE = 25,
  160.  
  161. HEADER_GC_ITEM_GROUND_ADD = 26,
  162. HEADER_GC_ITEM_GROUND_DEL = 27,
  163.  
  164. HEADER_GC_QUICKSLOT_ADD = 28,
  165. HEADER_GC_QUICKSLOT_DEL = 29,
  166. HEADER_GC_QUICKSLOT_SWAP = 30,
  167.  
  168. HEADER_GC_ITEM_OWNERSHIP = 31,
  169.  
  170. HEADER_GC_WHISPER = 34,
  171.  
  172. HEADER_GC_MOTION = 36,
  173. HEADER_GC_PARTS = 37,
  174.  
  175. HEADER_GC_SHOP = 38,
  176. HEADER_GC_SHOP_SIGN = 39,
  177.  
  178. HEADER_GC_DUEL_START = 40,
  179. HEADER_GC_PVP = 41,
  180. HEADER_GC_EXCHANGE = 42,
  181. HEADER_GC_CHARACTER_POSITION = 43,
  182.  
  183. HEADER_GC_PING = 44,
  184. HEADER_GC_SCRIPT = 45,
  185. HEADER_GC_QUEST_CONFIRM = 46,
  186.  
  187. #ifdef NEW_PET_SYSTEM
  188. HEADER_CG_PetSetName = 147,
  189. #endif
  190.  
  191. HEADER_GC_MOUNT = 61,
  192. HEADER_GC_OWNERSHIP = 62,
  193. HEADER_GC_TARGET = 63,
  194. #ifdef __SEND_TARGET_INFO__
  195. HEADER_GC_TARGET_INFO = 58,
  196. HEADER_CG_TARGET_INFO_LOAD = 59,
  197. #endif
  198. HEADER_GC_WARP = 65,
  199.  
  200. HEADER_GC_ADD_FLY_TARGETING = 69,
  201. HEADER_GC_CREATE_FLY = 70,
  202. HEADER_GC_FLY_TARGETING = 71,
  203. HEADER_GC_SKILL_LEVEL_OLD = 72,
  204. HEADER_GC_SKILL_LEVEL = 76,
  205.  
  206. HEADER_GC_MESSENGER = 74,
  207. HEADER_GC_GUILD = 75,
  208.  
  209. HEADER_GC_PARTY_INVITE = 77,
  210. HEADER_GC_PARTY_ADD = 78,
  211. HEADER_GC_PARTY_UPDATE = 79,
  212. HEADER_GC_PARTY_REMOVE = 80,
  213. HEADER_GC_QUEST_INFO = 81,
  214. HEADER_GC_REQUEST_MAKE_GUILD = 82,
  215. HEADER_GC_PARTY_PARAMETER = 83,
  216.  
  217. HEADER_GC_SAFEBOX_SET = 85,
  218. HEADER_GC_SAFEBOX_DEL = 86,
  219. HEADER_GC_SAFEBOX_WRONG_PASSWORD = 87,
  220. HEADER_GC_SAFEBOX_SIZE = 88,
  221.  
  222. HEADER_GC_FISHING = 89,
  223.  
  224. HEADER_GC_EMPIRE = 90,
  225.  
  226. HEADER_GC_PARTY_LINK = 91,
  227. HEADER_GC_PARTY_UNLINK = 92,
  228.  
  229. HEADER_GC_REFINE_INFORMATION_OLD = 95,
  230.  
  231. HEADER_GC_VIEW_EQUIP = 99,
  232.  
  233. HEADER_GC_MARK_BLOCK = 100,
  234. HEADER_GC_MARK_IDXLIST = 102,
  235.  
  236. HEADER_GC_TIME = 106,
  237. HEADER_GC_CHANGE_NAME = 107,
  238.  
  239. HEADER_GC_DUNGEON = 110,
  240.  
  241. HEADER_GC_WALK_MODE = 111,
  242. HEADER_GC_SKILL_GROUP = 112,
  243. HEADER_GC_MAIN_CHARACTER = 113,
  244.  
  245. // HEADER_GC_USE_POTION = 114,
  246. HEADER_GC_SEPCIAL_EFFECT = 114,
  247.  
  248. HEADER_GC_NPC_POSITION = 115,
  249.  
  250. HEADER_GC_MATRIX_CARD = 116,
  251. HEADER_GC_LOGIN_KEY = 118,
  252. HEADER_GC_REFINE_INFORMATION = 119,
  253. HEADER_GC_CHANNEL = 121,
  254.  
  255. // 122 HEADER_GC_MALL_OPEN
  256. HEADER_GC_TARGET_UPDATE = 123,
  257. HEADER_GC_TARGET_DELETE = 124,
  258. HEADER_GC_TARGET_CREATE = 125,
  259.  
  260. HEADER_GC_AFFECT_ADD = 126,
  261. HEADER_GC_AFFECT_REMOVE = 127,
  262.  
  263. HEADER_GC_MALL_OPEN = 122,
  264. HEADER_GC_MALL_SET = 128,
  265. HEADER_GC_MALL_DEL = 129,
  266.  
  267. HEADER_GC_LAND_LIST = 130,
  268. HEADER_GC_LOVER_INFO = 131,
  269. HEADER_GC_LOVE_POINT_UPDATE = 132,
  270.  
  271. HEADER_GC_SYMBOL_DATA = 133,
  272.  
  273. // MINING
  274. HEADER_GC_DIG_MOTION = 134,
  275. // END_OF_MINING
  276.  
  277. HEADER_GC_DAMAGE_INFO = 135,
  278. HEADER_GC_CHAR_ADDITIONAL_INFO = 136,
  279.  
  280. // SUPPORT_BGM
  281. HEADER_GC_MAIN_CHARACTER3_BGM = 137,
  282. HEADER_GC_MAIN_CHARACTER4_BGM_VOL = 138,
  283. // END_OF_SUPPORT_BGM
  284.  
  285. HEADER_GC_AUTH_SUCCESS = 150,
  286.  
  287. HEADER_GC_PANAMA_PACK = 151,
  288.  
  289. //HYBRID CRYPT
  290. HEADER_GC_HYBRIDCRYPT_KEYS = 152,
  291. HEADER_GC_HYBRIDCRYPT_SDB = 153, // SDB means Supplmentary Data Blocks
  292. //HYBRID CRYPT
  293.  
  294. HEADER_GC_AUTH_SUCCESS_OPENID = 154,
  295.  
  296. // ROULETTE
  297. HEADER_GC_ROULETTE = 200,
  298. // END_ROULETTE
  299. //
  300. HEADER_GC_REQUEST_PASSPOD = 202,
  301. HEADER_GC_REQUEST_PASSPOD_FAILED = 203,
  302.  
  303. HEADER_GC_HS_REQUEST = 204,
  304. HEADER_GC_XTRAP_CS1_REQUEST = 205,
  305.  
  306. HEADER_GC_SPECIFIC_EFFECT = 208,
  307.  
  308. HEADER_GC_DRAGON_SOUL_REFINE = 209,
  309. HEADER_GC_RESPOND_CHANNELSTATUS = 210,
  310.  
  311.  
  312. /////////////////////////////////////////////////////////////////////////////
  313.  
  314. HEADER_GG_LOGIN = 1,
  315. HEADER_GG_LOGOUT = 2,
  316. HEADER_GG_RELAY = 3,
  317. HEADER_GG_NOTICE = 4,
  318. HEADER_GG_SHUTDOWN = 5,
  319. HEADER_GG_GUILD = 6,
  320. HEADER_GG_DISCONNECT = 7, // 누군가의 접속을 강제로 끊을 때
  321. HEADER_GG_SHOUT = 8,
  322. HEADER_GG_SETUP = 9,
  323. HEADER_GG_MESSENGER_ADD = 10,
  324. HEADER_GG_MESSENGER_REMOVE = 11,
  325. HEADER_GG_FIND_POSITION = 12,
  326. HEADER_GG_WARP_CHARACTER = 13,
  327. HEADER_GG_MESSENGER_MOBILE = 14,
  328. HEADER_GG_GUILD_WAR_ZONE_MAP_INDEX = 15,
  329. HEADER_GG_TRANSFER = 16,
  330. HEADER_GG_XMAS_WARP_SANTA = 17,
  331. HEADER_GG_XMAS_WARP_SANTA_REPLY = 18,
  332. HEADER_GG_RELOAD_CRC_LIST = 19,
  333. HEADER_GG_LOGIN_PING = 20,
  334. HEADER_GG_CHECK_CLIENT_VERSION = 21,
  335. HEADER_GG_BLOCK_CHAT = 22,
  336.  
  337. HEADER_GG_BLOCK_EXCEPTION = 24,
  338. HEADER_GG_SIEGE = 25,
  339. HEADER_GG_MONARCH_NOTICE = 26,
  340. HEADER_GG_MONARCH_TRANSFER = 27,
  341. HEADER_GG_PCBANG_UPDATE = 28,
  342. #ifdef __TITLE_SYSTEM__
  343. HEADER_CG_TITLE_CHOOSE = 220,
  344. HEADER_GG_TITLE_ANSWER = 37,
  345. #endif
  346.  
  347. HEADER_GG_CHECK_AWAKENESS = 29,
  348. #ifdef ENABLE_FULL_NOTICE
  349. HEADER_GG_BIG_NOTICE = 30,
  350. #endif
  351. };
  352.  
  353. #pragma pack(1)
  354. typedef struct SPacketGGSetup
  355. {
  356. BYTE bHeader;
  357. WORD wPort;
  358. BYTE bChannel;
  359. } TPacketGGSetup;
  360.  
  361. typedef struct SPacketGGLogin
  362. {
  363. BYTE bHeader;
  364. char szName[CHARACTER_NAME_MAX_LEN + 1];
  365. DWORD dwPID;
  366. BYTE bEmpire;
  367. long lMapIndex;
  368. BYTE bChannel;
  369. } TPacketGGLogin;
  370.  
  371. typedef struct SPacketGGLogout
  372. {
  373. BYTE bHeader;
  374. char szName[CHARACTER_NAME_MAX_LEN + 1];
  375. } TPacketGGLogout;
  376.  
  377. typedef struct SPacketGGRelay
  378. {
  379. BYTE bHeader;
  380. char szName[CHARACTER_NAME_MAX_LEN + 1];
  381. long lSize;
  382. } TPacketGGRelay;
  383.  
  384. typedef struct SPacketGGNotice
  385. {
  386. BYTE bHeader;
  387. long lSize;
  388. } TPacketGGNotice;
  389.  
  390. typedef struct SPacketGGMonarchNotice
  391. {
  392. BYTE bHeader;
  393. BYTE bEmpire;
  394. long lSize;
  395. } TPacketGGMonarchNotice;
  396.  
  397. //FORKED_ROAD
  398. typedef struct SPacketGGForkedMapInfo
  399. {
  400. BYTE bHeader;
  401. BYTE bPass;
  402. BYTE bSungzi;
  403. } TPacketGGForkedMapInfo;
  404. //END_FORKED_ROAD
  405. typedef struct SPacketGGShutdown
  406. {
  407. BYTE bHeader;
  408. } TPacketGGShutdown;
  409.  
  410. typedef struct SPacketGGGuild
  411. {
  412. BYTE bHeader;
  413. BYTE bSubHeader;
  414. DWORD dwGuild;
  415. } TPacketGGGuild;
  416.  
  417. enum
  418. {
  419. GUILD_SUBHEADER_GG_CHAT,
  420. GUILD_SUBHEADER_GG_SET_MEMBER_COUNT_BONUS,
  421. };
  422.  
  423. typedef struct SPacketGGGuildChat
  424. {
  425. BYTE bHeader;
  426. BYTE bSubHeader;
  427. DWORD dwGuild;
  428. char szText[CHAT_MAX_LEN + 1];
  429. } TPacketGGGuildChat;
  430.  
  431. typedef struct SPacketGGParty
  432. {
  433. BYTE header;
  434. BYTE subheader;
  435. DWORD pid;
  436. DWORD leaderpid;
  437. } TPacketGGParty;
  438.  
  439. enum
  440. {
  441. PARTY_SUBHEADER_GG_CREATE,
  442. PARTY_SUBHEADER_GG_DESTROY,
  443. PARTY_SUBHEADER_GG_JOIN,
  444. PARTY_SUBHEADER_GG_QUIT,
  445. };
  446.  
  447. typedef struct SPacketGGDisconnect
  448. {
  449. BYTE bHeader;
  450. char szLogin[LOGIN_MAX_LEN + 1];
  451. } TPacketGGDisconnect;
  452.  
  453. typedef struct SPacketGGShout
  454. {
  455. BYTE bHeader;
  456. BYTE bEmpire;
  457. char szText[CHAT_MAX_LEN + 1];
  458. } TPacketGGShout;
  459.  
  460. typedef struct SPacketGGXmasWarpSanta
  461. {
  462. BYTE bHeader;
  463. BYTE bChannel;
  464. long lMapIndex;
  465. } TPacketGGXmasWarpSanta;
  466.  
  467. typedef struct SPacketGGXmasWarpSantaReply
  468. {
  469. BYTE bHeader;
  470. BYTE bChannel;
  471. } TPacketGGXmasWarpSantaReply;
  472.  
  473. typedef struct SMessengerData
  474. {
  475. char szMobile[MOBILE_MAX_LEN + 1];
  476. } TMessengerData;
  477.  
  478. typedef struct SPacketGGMessenger
  479. {
  480. BYTE bHeader;
  481. char szAccount[CHARACTER_NAME_MAX_LEN + 1];
  482. char szCompanion[CHARACTER_NAME_MAX_LEN + 1];
  483. } TPacketGGMessenger;
  484.  
  485. typedef struct SPacketGGMessengerMobile
  486. {
  487. BYTE bHeader;
  488. char szName[CHARACTER_NAME_MAX_LEN + 1];
  489. char szMobile[MOBILE_MAX_LEN + 1];
  490. } TPacketGGMessengerMobile;
  491.  
  492. typedef struct SPacketGGFindPosition
  493. {
  494. BYTE header;
  495. DWORD dwFromPID; // 저 위치로 워프하려는 사람
  496. DWORD dwTargetPID; // 찾는 사람
  497. } TPacketGGFindPosition;
  498.  
  499. typedef struct SPacketGGWarpCharacter
  500. {
  501. BYTE header;
  502. DWORD pid;
  503. long x;
  504. long y;
  505. } TPacketGGWarpCharacter;
  506.  
  507. // HEADER_GG_GUILD_WAR_ZONE_MAP_INDEX = 15,
  508.  
  509. typedef struct SPacketGGGuildWarMapIndex
  510. {
  511. BYTE bHeader;
  512. DWORD dwGuildID1;
  513. DWORD dwGuildID2;
  514. long lMapIndex;
  515. } TPacketGGGuildWarMapIndex;
  516.  
  517. typedef struct SPacketGGTransfer
  518. {
  519. BYTE bHeader;
  520. char szName[CHARACTER_NAME_MAX_LEN + 1];
  521. long lX, lY;
  522. } TPacketGGTransfer;
  523.  
  524. typedef struct SPacketGGLoginPing
  525. {
  526. BYTE bHeader;
  527. char szLogin[LOGIN_MAX_LEN + 1];
  528. } TPacketGGLoginPing;
  529.  
  530. typedef struct SPacketGGBlockChat
  531. {
  532. BYTE bHeader;
  533. char szName[CHARACTER_NAME_MAX_LEN + 1];
  534. long lBlockDuration;
  535. } TPacketGGBlockChat;
  536.  
  537. /* 클라이언트 측에서 보내는 패킷 */
  538.  
  539. typedef struct command_text
  540. {
  541. BYTE bHeader;
  542. } TPacketCGText;
  543.  
  544. /* 로그인 (1) */
  545. typedef struct command_handshake
  546. {
  547. BYTE bHeader;
  548. DWORD dwHandshake;
  549. DWORD dwTime;
  550. long lDelta;
  551. } TPacketCGHandshake;
  552.  
  553. typedef struct command_login
  554. {
  555. BYTE header;
  556. char login[LOGIN_MAX_LEN + 1];
  557. char passwd[PASSWD_MAX_LEN + 1];
  558. } TPacketCGLogin;
  559.  
  560. typedef struct command_login2
  561. {
  562. BYTE header;
  563. char login[LOGIN_MAX_LEN + 1];
  564. DWORD dwLoginKey;
  565. DWORD adwClientKey[4];
  566. } TPacketCGLogin2;
  567.  
  568. typedef struct command_login3
  569. {
  570. BYTE header;
  571. char login[LOGIN_MAX_LEN + 1];
  572. char passwd[PASSWD_MAX_LEN + 1];
  573. DWORD adwClientKey[4];
  574. } TPacketCGLogin3;
  575.  
  576. typedef struct command_login5
  577. {
  578. BYTE header;
  579. char authKey[OPENID_AUTHKEY_LEN + 1];
  580. DWORD adwClientKey[4];
  581. } TPacketCGLogin5;
  582.  
  583. typedef struct command_matrix_card
  584. {
  585. BYTE bHeader;
  586. char szAnswer[MATRIX_ANSWER_MAX_LEN + 1];
  587. } TPacketCGMatrixCard;
  588.  
  589. #ifdef NEW_PET_SYSTEM
  590. typedef struct packet_RequestPetName
  591. {
  592. BYTE byHeader;
  593. char petname[13];
  594.  
  595. }TPacketCGRequestPetName;
  596. #endif
  597.  
  598. typedef struct packet_matrix_card
  599. {
  600. BYTE bHeader;
  601. DWORD dwRows;
  602. DWORD dwCols;
  603. } TPacketGCMatrixCard;
  604.  
  605. typedef struct packet_login_key
  606. {
  607. BYTE bHeader;
  608. DWORD dwLoginKey;
  609. } TPacketGCLoginKey;
  610.  
  611. typedef struct command_player_select
  612. {
  613. BYTE header;
  614. BYTE index;
  615. } TPacketCGPlayerSelect;
  616.  
  617. typedef struct command_player_delete
  618. {
  619. BYTE header;
  620. BYTE index;
  621. char private_code[8];
  622. } TPacketCGPlayerDelete;
  623.  
  624. typedef struct command_player_create
  625. {
  626. BYTE header;
  627. BYTE index;
  628. char name[CHARACTER_NAME_MAX_LEN + 1];
  629. WORD job;
  630. BYTE shape;
  631. BYTE Con;
  632. BYTE Int;
  633. BYTE Str;
  634. BYTE Dex;
  635. } TPacketCGPlayerCreate;
  636.  
  637. typedef struct command_player_create_success
  638. {
  639. BYTE header;
  640. BYTE bAccountCharacterIndex;
  641. TSimplePlayer player;
  642. } TPacketGCPlayerCreateSuccess;
  643.  
  644. // 공격
  645. typedef struct command_attack
  646. {
  647. BYTE bHeader;
  648. BYTE bType;
  649. DWORD dwVID;
  650. BYTE bCRCMagicCubeProcPiece;
  651. BYTE bCRCMagicCubeFilePiece;
  652. } TPacketCGAttack;
  653.  
  654. enum EMoveFuncType
  655. {
  656. FUNC_WAIT,
  657. FUNC_MOVE,
  658. FUNC_ATTACK,
  659. FUNC_COMBO,
  660. FUNC_MOB_SKILL,
  661. _FUNC_SKILL,
  662. FUNC_MAX_NUM,
  663. FUNC_SKILL = 0x80,
  664. };
  665.  
  666. // 이동
  667. typedef struct command_move
  668. {
  669. BYTE bHeader;
  670. BYTE bFunc;
  671. BYTE bArg;
  672. BYTE bRot;
  673. long lX;
  674. long lY;
  675. DWORD dwTime;
  676. } TPacketCGMove;
  677.  
  678. typedef struct command_sync_position_element
  679. {
  680. DWORD dwVID;
  681. long lX;
  682. long lY;
  683. } TPacketCGSyncPositionElement;
  684.  
  685. // 위치 동기화
  686. typedef struct command_sync_position // 가변 패킷
  687. {
  688. BYTE bHeader;
  689. WORD wSize;
  690. } TPacketCGSyncPosition;
  691.  
  692. /* 채팅 (3) */
  693. typedef struct command_chat // 가변 패킷
  694. {
  695. BYTE header;
  696. WORD size;
  697. BYTE type;
  698. } TPacketCGChat;
  699.  
  700. /* 귓속말 */
  701. typedef struct command_whisper
  702. {
  703. BYTE bHeader;
  704. WORD wSize;
  705. char szNameTo[CHARACTER_NAME_MAX_LEN + 1];
  706. } TPacketCGWhisper;
  707.  
  708. typedef struct command_entergame
  709. {
  710. BYTE header;
  711. } TPacketCGEnterGame;
  712.  
  713. typedef struct command_item_use
  714. {
  715. BYTE header;
  716. TItemPos Cell;
  717. } TPacketCGItemUse;
  718.  
  719. typedef struct command_item_use_to_item
  720. {
  721. BYTE header;
  722. TItemPos Cell;
  723. TItemPos TargetCell;
  724. } TPacketCGItemUseToItem;
  725.  
  726. typedef struct command_item_drop
  727. {
  728. BYTE header;
  729. TItemPos Cell;
  730. DWORD gold;
  731. } TPacketCGItemDrop;
  732.  
  733. typedef struct command_item_drop2
  734. {
  735. BYTE header;
  736. TItemPos Cell;
  737. DWORD gold;
  738. BYTE count;
  739. } TPacketCGItemDrop2;
  740.  
  741. typedef struct command_item_destroy
  742. {
  743. BYTE header;
  744. TItemPos Cell;
  745. } TPacketCGItemDestroy;
  746.  
  747. typedef struct command_item_move
  748. {
  749. BYTE header;
  750. TItemPos Cell;
  751. TItemPos CellTo;
  752. BYTE count;
  753. } TPacketCGItemMove;
  754.  
  755. #ifdef NEW_ADD_INVENTORY
  756. typedef struct envanter_paketi
  757. {
  758. BYTE header;
  759. } TPacketCGEnvanter;
  760. #endif
  761.  
  762. typedef struct command_item_pickup
  763. {
  764. BYTE header;
  765. DWORD vid;
  766. } TPacketCGItemPickup;
  767.  
  768. typedef struct command_quickslot_add
  769. {
  770. BYTE header;
  771. BYTE pos;
  772. TQuickslot slot;
  773. } TPacketCGQuickslotAdd;
  774.  
  775. typedef struct command_quickslot_del
  776. {
  777. BYTE header;
  778. BYTE pos;
  779. } TPacketCGQuickslotDel;
  780.  
  781. typedef struct command_quickslot_swap
  782. {
  783. BYTE header;
  784. BYTE pos;
  785. BYTE change_pos;
  786. } TPacketCGQuickslotSwap;
  787.  
  788. enum
  789. {
  790. SHOP_SUBHEADER_CG_END,
  791. SHOP_SUBHEADER_CG_BUY,
  792. SHOP_SUBHEADER_CG_SELL,
  793. SHOP_SUBHEADER_CG_SELL2
  794. };
  795.  
  796. typedef struct command_shop_buy
  797. {
  798. BYTE count;
  799. } TPacketCGShopBuy;
  800.  
  801. typedef struct command_shop_sell
  802. {
  803. BYTE pos;
  804. BYTE count;
  805. } TPacketCGShopSell;
  806.  
  807. typedef struct command_shop
  808. {
  809. BYTE header;
  810. BYTE subheader;
  811. } TPacketCGShop;
  812.  
  813. typedef struct command_on_click
  814. {
  815. BYTE header;
  816. DWORD vid;
  817. } TPacketCGOnClick;
  818.  
  819. enum
  820. {
  821. EXCHANGE_SUBHEADER_CG_START, /* arg1 == vid of target character */
  822. EXCHANGE_SUBHEADER_CG_ITEM_ADD, /* arg1 == position of item */
  823. EXCHANGE_SUBHEADER_CG_ITEM_DEL, /* arg1 == position of item */
  824. EXCHANGE_SUBHEADER_CG_ELK_ADD, /* arg1 == amount of gold */
  825. EXCHANGE_SUBHEADER_CG_ACCEPT, /* arg1 == not used */
  826. EXCHANGE_SUBHEADER_CG_CANCEL, /* arg1 == not used */
  827. };
  828.  
  829. typedef struct command_exchange
  830. {
  831. BYTE header;
  832. BYTE sub_header;
  833. #ifdef ENABLE_YANG_LIMIT
  834. long long arg1;
  835. #else
  836. DWORD arg1;
  837. #endif
  838. BYTE arg2;
  839. BYTE dice;
  840. TItemPos Pos;
  841. } TPacketCGExchange;
  842.  
  843. typedef struct command_position
  844. {
  845. BYTE header;
  846. BYTE position;
  847. } TPacketCGPosition;
  848.  
  849. typedef struct command_script_answer
  850. {
  851. BYTE header;
  852. BYTE answer;
  853. //char file[32 + 1];
  854. //BYTE answer[16 + 1];
  855. } TPacketCGScriptAnswer;
  856.  
  857.  
  858. typedef struct command_script_button
  859. {
  860. BYTE header;
  861. unsigned int idx;
  862. } TPacketCGScriptButton;
  863.  
  864. typedef struct command_quest_input_string
  865. {
  866. BYTE header;
  867. char msg[64+1];
  868. } TPacketCGQuestInputString;
  869.  
  870. typedef struct command_quest_confirm
  871. {
  872. BYTE header;
  873. BYTE answer;
  874. DWORD requestPID;
  875. } TPacketCGQuestConfirm;
  876.  
  877. /*
  878. * 서버 측에서 보내는 패킷
  879. */
  880. typedef struct packet_quest_confirm
  881. {
  882. BYTE header;
  883. char msg[64+1];
  884. long timeout;
  885. DWORD requestPID;
  886. } TPacketGCQuestConfirm;
  887.  
  888. typedef struct packet_handshake
  889. {
  890. BYTE bHeader;
  891. DWORD dwHandshake;
  892. DWORD dwTime;
  893. long lDelta;
  894. } TPacketGCHandshake;
  895.  
  896. enum EPhase
  897. {
  898. PHASE_CLOSE,
  899. PHASE_HANDSHAKE,
  900. PHASE_LOGIN,
  901. PHASE_SELECT,
  902. PHASE_LOADING,
  903. PHASE_GAME,
  904. PHASE_DEAD,
  905.  
  906. PHASE_CLIENT_CONNECTING,
  907. PHASE_DBCLIENT,
  908. PHASE_P2P,
  909. PHASE_AUTH,
  910. PHASE_TEEN,
  911. PHASE_PASSPOD,
  912. };
  913.  
  914. typedef struct packet_phase
  915. {
  916. BYTE header;
  917. BYTE phase;
  918. } TPacketGCPhase;
  919.  
  920. typedef struct packet_bindudp
  921. {
  922. BYTE header;
  923. DWORD addr;
  924. WORD port;
  925. } TPacketGCBindUDP;
  926.  
  927. enum
  928. {
  929. LOGIN_FAILURE_ALREADY = 1,
  930. LOGIN_FAILURE_ID_NOT_EXIST = 2,
  931. LOGIN_FAILURE_WRONG_PASS = 3,
  932. LOGIN_FAILURE_FALSE = 4,
  933. LOGIN_FAILURE_NOT_TESTOR = 5,
  934. LOGIN_FAILURE_NOT_TEST_TIME = 6,
  935. LOGIN_FAILURE_FULL = 7
  936. };
  937.  
  938. typedef struct packet_login_success
  939. {
  940. BYTE bHeader;
  941. TSimplePlayer players[PLAYER_PER_ACCOUNT];
  942. DWORD guild_id[PLAYER_PER_ACCOUNT];
  943. char guild_name[PLAYER_PER_ACCOUNT][GUILD_NAME_MAX_LEN+1];
  944.  
  945. DWORD handle;
  946. DWORD random_key;
  947. } TPacketGCLoginSuccess;
  948.  
  949. typedef struct packet_auth_success
  950. {
  951. BYTE bHeader;
  952. DWORD dwLoginKey;
  953. BYTE bResult;
  954. } TPacketGCAuthSuccess;
  955.  
  956. typedef struct packet_auth_success_openid
  957. {
  958. BYTE bHeader;
  959. DWORD dwLoginKey;
  960. BYTE bResult;
  961. char login[LOGIN_MAX_LEN + 1];
  962. } TPacketGCAuthSuccessOpenID;
  963.  
  964. typedef struct packet_login_failure
  965. {
  966. BYTE header;
  967. char szStatus[ACCOUNT_STATUS_MAX_LEN + 1];
  968. } TPacketGCLoginFailure;
  969.  
  970. typedef struct packet_create_failure
  971. {
  972. BYTE header;
  973. BYTE bType;
  974. } TPacketGCCreateFailure;
  975.  
  976. enum
  977. {
  978. ADD_CHARACTER_STATE_DEAD = (1 << 0),
  979. ADD_CHARACTER_STATE_SPAWN = (1 << 1),
  980. ADD_CHARACTER_STATE_GUNGON = (1 << 2),
  981. ADD_CHARACTER_STATE_KILLER = (1 << 3),
  982. ADD_CHARACTER_STATE_PARTY = (1 << 4),
  983. };
  984.  
  985. enum ECharacterEquipmentPart
  986. {
  987. CHR_EQUIPPART_ARMOR,
  988. CHR_EQUIPPART_WEAPON,
  989. CHR_EQUIPPART_HEAD,
  990. CHR_EQUIPPART_HAIR,
  991. #ifdef __SASH_SYSTEM__
  992. CHR_EQUIPPART_SASH,
  993. #endif
  994. CHR_EQUIPPART_NUM,
  995. };
  996.  
  997. typedef struct packet_add_char
  998. {
  999. BYTE header;
  1000. DWORD dwVID;
  1001.  
  1002. float angle;
  1003. long x;
  1004. long y;
  1005. long z;
  1006.  
  1007. BYTE bType;
  1008. WORD wRaceNum;
  1009. BYTE bMovingSpeed;
  1010. BYTE bAttackSpeed;
  1011.  
  1012. BYTE bStateFlag;
  1013. DWORD dwAffectFlag[2]; // 효과
  1014. } TPacketGCCharacterAdd;
  1015.  
  1016. typedef struct packet_char_additional_info
  1017. {
  1018. BYTE header;
  1019. DWORD dwVID;
  1020. char name[CHARACTER_NAME_MAX_LEN + 1];
  1021. WORD awPart[CHR_EQUIPPART_NUM];
  1022. BYTE bEmpire;
  1023. DWORD dwGuildID;
  1024. DWORD dwLevel;
  1025. short sAlignment;
  1026. BYTE bPKMode;
  1027. #ifdef __TITLE_SYSTEM__
  1028. int iTitleID;
  1029. #endif
  1030. DWORD dwMountVnum;
  1031. } TPacketGCCharacterAdditionalInfo;
  1032.  
  1033. /*
  1034. typedef struct packet_update_char_old
  1035. {
  1036. BYTE header;
  1037. DWORD dwVID;
  1038.  
  1039. WORD awPart[CHR_EQUIPPART_NUM];
  1040. BYTE bMovingSpeed;
  1041. BYTE bAttackSpeed;
  1042.  
  1043. BYTE bStateFlag;
  1044. DWORD dwAffectFlag[2];
  1045.  
  1046. DWORD dwGuildID;
  1047. short sAlignment;
  1048. BYTE bPKMode;
  1049. DWORD dwMountVnum;
  1050. } TPacketGCCharacterUpdateOld;
  1051. */
  1052.  
  1053. typedef struct packet_update_char
  1054. {
  1055. BYTE header;
  1056. DWORD dwVID;
  1057.  
  1058. WORD awPart[CHR_EQUIPPART_NUM];
  1059. BYTE bMovingSpeed;
  1060. BYTE bAttackSpeed;
  1061.  
  1062. BYTE bStateFlag;
  1063. DWORD dwAffectFlag[2];
  1064.  
  1065. DWORD dwGuildID;
  1066. short sAlignment;
  1067. DWORD dwLevel;
  1068. BYTE bPKMode;
  1069. #ifdef __TITLE_SYSTEM__
  1070. int iTitleID;
  1071. #endif
  1072. DWORD dwMountVnum;
  1073. //WORD wRaceNum;
  1074. } TPacketGCCharacterUpdate;
  1075.  
  1076. typedef struct packet_del_char
  1077. {
  1078. BYTE header;
  1079. DWORD id;
  1080. } TPacketGCCharacterDelete;
  1081.  
  1082. typedef struct packet_chat // 가변 패킷
  1083. {
  1084. BYTE header;
  1085. WORD size;
  1086. BYTE type;
  1087. DWORD id;
  1088. BYTE bEmpire;
  1089. } TPacketGCChat;
  1090.  
  1091. typedef struct packet_whisper // 가변 패킷
  1092. {
  1093. BYTE bHeader;
  1094. WORD wSize;
  1095. BYTE bType;
  1096. char szNameFrom[CHARACTER_NAME_MAX_LEN + 1];
  1097. } TPacketGCWhisper;
  1098.  
  1099. typedef struct packet_main_character
  1100. {
  1101. BYTE header;
  1102. DWORD dwVID;
  1103. WORD wRaceNum;
  1104. char szName[CHARACTER_NAME_MAX_LEN + 1];
  1105. long lx, ly, lz;
  1106. BYTE empire;
  1107. BYTE skill_group;
  1108. } TPacketGCMainCharacter;
  1109.  
  1110. // SUPPORT_BGM
  1111. typedef struct packet_main_character3_bgm
  1112. {
  1113. enum
  1114. {
  1115. MUSIC_NAME_LEN = 24,
  1116. };
  1117.  
  1118. BYTE header;
  1119. DWORD dwVID;
  1120. WORD wRaceNum;
  1121. char szChrName[CHARACTER_NAME_MAX_LEN + 1];
  1122. char szBGMName[MUSIC_NAME_LEN + 1];
  1123. long lx, ly, lz;
  1124. BYTE empire;
  1125. BYTE skill_group;
  1126. } TPacketGCMainCharacter3_BGM;
  1127.  
  1128. typedef struct packet_main_character4_bgm_vol
  1129. {
  1130. enum
  1131. {
  1132. MUSIC_NAME_LEN = 24,
  1133. };
  1134.  
  1135. BYTE header;
  1136. DWORD dwVID;
  1137. WORD wRaceNum;
  1138. char szChrName[CHARACTER_NAME_MAX_LEN + 1];
  1139. char szBGMName[MUSIC_NAME_LEN + 1];
  1140. float fBGMVol;
  1141. long lx, ly, lz;
  1142. BYTE empire;
  1143. BYTE skill_group;
  1144. } TPacketGCMainCharacter4_BGM_VOL;
  1145. // END_OF_SUPPORT_BGM
  1146.  
  1147. typedef struct packet_points
  1148. {
  1149. BYTE header;
  1150. #ifdef ENABLE_YANG_LIMIT
  1151. long long points[POINT_MAX_NUM];
  1152. #else
  1153. INT points[POINT_MAX_NUM];
  1154. #endif
  1155. } TPacketGCPoints;
  1156.  
  1157. typedef struct packet_skill_level
  1158. {
  1159. BYTE bHeader;
  1160. TPlayerSkill skills[SKILL_MAX_NUM];
  1161. } TPacketGCSkillLevel;
  1162.  
  1163. typedef struct packet_point_change
  1164. {
  1165. int header;
  1166. DWORD dwVID;
  1167. BYTE type;
  1168. #ifdef ENABLE_YANG_LIMIT
  1169. long long amount;
  1170. long long value;
  1171. #else
  1172. long amount;
  1173. long value;
  1174. #endif
  1175. } TPacketGCPointChange;
  1176.  
  1177. typedef struct packet_stun
  1178. {
  1179. BYTE header;
  1180. DWORD vid;
  1181. } TPacketGCStun;
  1182.  
  1183. typedef struct packet_dead
  1184. {
  1185. BYTE header;
  1186. DWORD vid;
  1187. } TPacketGCDead;
  1188.  
  1189. struct TPacketGCItemDelDeprecated
  1190. {
  1191. BYTE header;
  1192. TItemPos Cell;
  1193. DWORD vnum;
  1194. BYTE count;
  1195. #ifdef __CHANGELOOK_SYSTEM__
  1196. DWORD transmutation;
  1197. #endif
  1198. long alSockets[ITEM_SOCKET_MAX_NUM];
  1199. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
  1200. };
  1201.  
  1202. typedef struct packet_item_set
  1203. {
  1204. BYTE header;
  1205. TItemPos Cell;
  1206. DWORD vnum;
  1207. BYTE count;
  1208. #ifdef __CHANGELOOK_SYSTEM__
  1209. DWORD transmutation;
  1210. #endif
  1211. DWORD flags;
  1212. DWORD anti_flags;
  1213. bool highlight;
  1214. long alSockets[ITEM_SOCKET_MAX_NUM];
  1215. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
  1216. } TPacketGCItemSet;
  1217.  
  1218. typedef struct packet_item_del
  1219. {
  1220. BYTE header;
  1221. BYTE pos;
  1222. } TPacketGCItemDel;
  1223.  
  1224. struct packet_item_use
  1225. {
  1226. BYTE header;
  1227. TItemPos Cell;
  1228. DWORD ch_vid;
  1229. DWORD victim_vid;
  1230. DWORD vnum;
  1231. };
  1232.  
  1233. struct packet_item_move
  1234. {
  1235. BYTE header;
  1236. TItemPos Cell;
  1237. TItemPos CellTo;
  1238. };
  1239.  
  1240. typedef struct packet_item_update
  1241. {
  1242. BYTE header;
  1243. TItemPos Cell;
  1244. BYTE count;
  1245. #ifdef __CHANGELOOK_SYSTEM__
  1246. DWORD transmutation;
  1247. #endif
  1248. long alSockets[ITEM_SOCKET_MAX_NUM];
  1249. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
  1250. } TPacketGCItemUpdate;
  1251.  
  1252. typedef struct packet_item_ground_add
  1253. {
  1254. BYTE bHeader;
  1255. long x, y, z;
  1256. DWORD dwVID;
  1257. DWORD dwVnum;
  1258. } TPacketGCItemGroundAdd;
  1259.  
  1260. typedef struct packet_item_ownership
  1261. {
  1262. BYTE bHeader;
  1263. DWORD dwVID;
  1264. char szName[CHARACTER_NAME_MAX_LEN + 1];
  1265. } TPacketGCItemOwnership;
  1266.  
  1267. typedef struct packet_item_ground_del
  1268. {
  1269. BYTE bHeader;
  1270. DWORD dwVID;
  1271. } TPacketGCItemGroundDel;
  1272.  
  1273. struct packet_quickslot_add
  1274. {
  1275. BYTE header;
  1276. BYTE pos;
  1277. TQuickslot slot;
  1278. };
  1279.  
  1280. struct packet_quickslot_del
  1281. {
  1282. BYTE header;
  1283. BYTE pos;
  1284. };
  1285.  
  1286. struct packet_quickslot_swap
  1287. {
  1288. BYTE header;
  1289. BYTE pos;
  1290. BYTE pos_to;
  1291. };
  1292.  
  1293. struct packet_motion
  1294. {
  1295. BYTE header;
  1296. DWORD vid;
  1297. DWORD victim_vid;
  1298. WORD motion;
  1299. };
  1300.  
  1301. enum EPacketShopSubHeaders
  1302. {
  1303. SHOP_SUBHEADER_GC_START,
  1304. SHOP_SUBHEADER_GC_END,
  1305. SHOP_SUBHEADER_GC_UPDATE_ITEM,
  1306. SHOP_SUBHEADER_GC_UPDATE_PRICE,
  1307. SHOP_SUBHEADER_GC_OK,
  1308. SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY,
  1309. SHOP_SUBHEADER_GC_SOLDOUT,
  1310. SHOP_SUBHEADER_GC_INVENTORY_FULL,
  1311. SHOP_SUBHEADER_GC_INVALID_POS,
  1312. SHOP_SUBHEADER_GC_SOLD_OUT,
  1313. SHOP_SUBHEADER_GC_START_EX,
  1314. SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY_EX,
  1315. };
  1316.  
  1317. struct packet_shop_item
  1318. {
  1319. DWORD vnum;
  1320. #ifdef FULL_YANG
  1321. long long price;
  1322. #else
  1323. DWORD price;
  1324. #endif
  1325. BYTE count;
  1326. BYTE display_pos;
  1327. long alSockets[ITEM_SOCKET_MAX_NUM];
  1328. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
  1329. #ifdef __CHANGELOOK_SYSTEM__
  1330. DWORD transmutation;
  1331. #endif
  1332. };
  1333.  
  1334. typedef struct packet_shop_start
  1335. {
  1336. DWORD owner_vid;
  1337. struct packet_shop_item items[SHOP_HOST_ITEM_MAX_NUM];
  1338. } TPacketGCShopStart;
  1339.  
  1340. typedef struct packet_shop_start_ex // 다음에 TSubPacketShopTab* shop_tabs 이 따라옴.
  1341. {
  1342. typedef struct sub_packet_shop_tab
  1343. {
  1344. char name[SHOP_TAB_NAME_MAX];
  1345. BYTE coin_type;
  1346. packet_shop_item items[SHOP_HOST_ITEM_MAX_NUM];
  1347. } TSubPacketShopTab;
  1348. DWORD owner_vid;
  1349. BYTE shop_tab_count;
  1350. } TPacketGCShopStartEx;
  1351.  
  1352. typedef struct packet_shop_update_item
  1353. {
  1354. BYTE pos;
  1355. struct packet_shop_item item;
  1356. } TPacketGCShopUpdateItem;
  1357.  
  1358. typedef struct packet_shop_update_price
  1359. {
  1360. #ifdef ENABLE_YANG_LIMIT
  1361. long long iPrice;
  1362. #else
  1363. int iPrice;
  1364. #endif
  1365. } TPacketGCShopUpdatePrice;
  1366.  
  1367. typedef struct packet_shop // 가변 패킷
  1368. {
  1369. BYTE header;
  1370. WORD size;
  1371. BYTE subheader;
  1372. } TPacketGCShop;
  1373.  
  1374. struct packet_exchange
  1375. {
  1376. BYTE header;
  1377. BYTE sub_header;
  1378. BYTE is_me;
  1379. #ifdef ENABLE_YANG_LIMIT
  1380. long long arg1;
  1381. #else
  1382. DWORD arg1; // vnum
  1383. #endif
  1384. TItemPos arg2; // cell
  1385. DWORD arg3; // count
  1386. BYTE dice;
  1387. long alSockets[ITEM_SOCKET_MAX_NUM];
  1388. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
  1389. #ifdef __CHANGELOOK_SYSTEM__
  1390. DWORD dwTransmutation;
  1391. #endif
  1392. };
  1393.  
  1394. enum EPacketTradeSubHeaders
  1395. {
  1396. EXCHANGE_SUBHEADER_GC_START, /* arg1 == vid */
  1397. EXCHANGE_SUBHEADER_GC_ITEM_ADD, /* arg1 == vnum arg2 == pos arg3 == count */
  1398. EXCHANGE_SUBHEADER_GC_ITEM_DEL,
  1399. EXCHANGE_SUBHEADER_GC_GOLD_ADD, /* arg1 == gold */
  1400. EXCHANGE_SUBHEADER_GC_ACCEPT, /* arg1 == accept */
  1401. EXCHANGE_SUBHEADER_GC_END, /* arg1 == not used */
  1402. EXCHANGE_SUBHEADER_GC_ALREADY, /* arg1 == not used */
  1403. EXCHANGE_SUBHEADER_GC_LESS_GOLD, /* arg1 == not used */
  1404. };
  1405.  
  1406. struct packet_position
  1407. {
  1408. BYTE header;
  1409. DWORD vid;
  1410. BYTE position;
  1411. };
  1412.  
  1413. typedef struct packet_ping
  1414. {
  1415. BYTE header;
  1416. } TPacketGCPing;
  1417.  
  1418. struct packet_script
  1419. {
  1420. BYTE header;
  1421. WORD size;
  1422. BYTE skin;
  1423. WORD src_size;
  1424. #ifdef ENABLE_QUEST_CATEGORY
  1425. BYTE quest_flag;
  1426. #endif
  1427. };
  1428.  
  1429. typedef struct packet_change_speed
  1430. {
  1431. BYTE header;
  1432. DWORD vid;
  1433. WORD moving_speed;
  1434. } TPacketGCChangeSpeed;
  1435.  
  1436. struct packet_mount
  1437. {
  1438. BYTE header;
  1439. DWORD vid;
  1440. DWORD mount_vid;
  1441. BYTE pos;
  1442. DWORD x, y;
  1443. };
  1444.  
  1445. typedef struct packet_move
  1446. {
  1447. BYTE bHeader;
  1448. BYTE bFunc;
  1449. BYTE bArg;
  1450. BYTE bRot;
  1451. DWORD dwVID;
  1452. long lX;
  1453. long lY;
  1454. DWORD dwTime;
  1455. DWORD dwDuration;
  1456. } TPacketGCMove;
  1457.  
  1458. // 소유권
  1459. typedef struct packet_ownership
  1460. {
  1461. BYTE bHeader;
  1462. DWORD dwOwnerVID;
  1463. DWORD dwVictimVID;
  1464. } TPacketGCOwnership;
  1465.  
  1466. // 위치 동기화 패킷의 bCount 만큼 붙는 단위
  1467. typedef struct packet_sync_position_element
  1468. {
  1469. DWORD dwVID;
  1470. long lX;
  1471. long lY;
  1472. } TPacketGCSyncPositionElement;
  1473.  
  1474. // 위치 동기화
  1475. typedef struct packet_sync_position // 가변 패킷
  1476. {
  1477. BYTE bHeader;
  1478. WORD wSize; // 개수 = (wSize - sizeof(TPacketGCSyncPosition)) / sizeof(TPacketGCSyncPositionElement)
  1479. } TPacketGCSyncPosition;
  1480.  
  1481. typedef struct packet_fly
  1482. {
  1483. BYTE bHeader;
  1484. BYTE bType;
  1485. DWORD dwStartVID;
  1486. DWORD dwEndVID;
  1487. } TPacketGCCreateFly;
  1488.  
  1489. typedef struct command_fly_targeting
  1490. {
  1491. BYTE bHeader;
  1492. DWORD dwTargetVID;
  1493. long x, y;
  1494. } TPacketCGFlyTargeting;
  1495.  
  1496. typedef struct packet_fly_targeting
  1497. {
  1498. BYTE bHeader;
  1499. DWORD dwShooterVID;
  1500. DWORD dwTargetVID;
  1501. long x, y;
  1502. } TPacketGCFlyTargeting;
  1503.  
  1504. typedef struct packet_shoot
  1505. {
  1506. BYTE bHeader;
  1507. BYTE bType;
  1508. } TPacketCGShoot;
  1509.  
  1510. typedef struct packet_duel_start
  1511. {
  1512. BYTE header;
  1513. WORD wSize; // DWORD가 몇개? 개수 = (wSize - sizeof(TPacketGCPVPList)) / 4
  1514. } TPacketGCDuelStart;
  1515.  
  1516. enum EPVPModes
  1517. {
  1518. PVP_MODE_NONE,
  1519. PVP_MODE_AGREE,
  1520. PVP_MODE_FIGHT,
  1521. PVP_MODE_REVENGE
  1522. };
  1523.  
  1524. typedef struct packet_pvp
  1525. {
  1526. BYTE bHeader;
  1527. DWORD dwVIDSrc;
  1528. DWORD dwVIDDst;
  1529. BYTE bMode; // 0 이면 끔, 1이면 켬
  1530. } TPacketGCPVP;
  1531.  
  1532. typedef struct command_use_skill
  1533. {
  1534. BYTE bHeader;
  1535. DWORD dwVnum;
  1536. DWORD dwVID;
  1537. } TPacketCGUseSkill;
  1538.  
  1539. typedef struct command_target
  1540. {
  1541. BYTE header;
  1542. DWORD dwVID;
  1543. } TPacketCGTarget;
  1544.  
  1545. typedef struct packet_target
  1546. {
  1547. BYTE header;
  1548. DWORD dwVID;
  1549. BYTE bHPPercent;
  1550. } TPacketGCTarget;
  1551.  
  1552. #ifdef __SEND_TARGET_INFO__
  1553. typedef struct packet_target_info
  1554. {
  1555. BYTE header;
  1556. DWORD dwVID;
  1557. DWORD race;
  1558. DWORD dwVnum;
  1559. BYTE count;
  1560. } TPacketGCTargetInfo;
  1561.  
  1562. typedef struct packet_target_info_load
  1563. {
  1564. BYTE header;
  1565. DWORD dwVID;
  1566. } TPacketCGTargetInfoLoad;
  1567. #endif
  1568.  
  1569. typedef struct packet_warp
  1570. {
  1571. BYTE bHeader;
  1572. long lX;
  1573. long lY;
  1574. long lAddr;
  1575. WORD wPort;
  1576. } TPacketGCWarp;
  1577.  
  1578. typedef struct command_warp
  1579. {
  1580. BYTE bHeader;
  1581. } TPacketCGWarp;
  1582.  
  1583. struct packet_quest_info
  1584. {
  1585. BYTE header;
  1586. WORD size;
  1587. WORD index;
  1588. #ifdef ENABLE_QUEST_CATEGORY
  1589. WORD c_index;
  1590. #endif
  1591. BYTE flag;
  1592. };
  1593.  
  1594. enum
  1595. {
  1596. MESSENGER_SUBHEADER_GC_LIST,
  1597. MESSENGER_SUBHEADER_GC_LOGIN,
  1598. MESSENGER_SUBHEADER_GC_LOGOUT,
  1599. MESSENGER_SUBHEADER_GC_INVITE,
  1600. MESSENGER_SUBHEADER_GC_MOBILE
  1601. };
  1602.  
  1603. typedef struct packet_messenger
  1604. {
  1605. BYTE header;
  1606. WORD size;
  1607. BYTE subheader;
  1608. } TPacketGCMessenger;
  1609.  
  1610. typedef struct packet_messenger_guild_list
  1611. {
  1612. BYTE connected;
  1613. BYTE length;
  1614. //char login[LOGIN_MAX_LEN+1];
  1615. } TPacketGCMessengerGuildList;
  1616.  
  1617. typedef struct packet_messenger_guild_login
  1618. {
  1619. BYTE length;
  1620. //char login[LOGIN_MAX_LEN+1];
  1621. } TPacketGCMessengerGuildLogin;
  1622.  
  1623. typedef struct packet_messenger_guild_logout
  1624. {
  1625. BYTE length;
  1626.  
  1627. //char login[LOGIN_MAX_LEN+1];
  1628. } TPacketGCMessengerGuildLogout;
  1629.  
  1630. typedef struct packet_messenger_list_offline
  1631. {
  1632. BYTE connected; // always 0
  1633. BYTE length;
  1634. } TPacketGCMessengerListOffline;
  1635.  
  1636. typedef struct packet_messenger_list_online
  1637. {
  1638. BYTE connected; // always 1
  1639. BYTE length;
  1640. } TPacketGCMessengerListOnline;
  1641.  
  1642. enum
  1643. {
  1644. MESSENGER_SUBHEADER_CG_ADD_BY_VID,
  1645. MESSENGER_SUBHEADER_CG_ADD_BY_NAME,
  1646. MESSENGER_SUBHEADER_CG_REMOVE,
  1647. MESSENGER_SUBHEADER_CG_INVITE_ANSWER,
  1648. };
  1649.  
  1650. typedef struct command_messenger
  1651. {
  1652. BYTE header;
  1653. BYTE subheader;
  1654. } TPacketCGMessenger;
  1655.  
  1656. typedef struct command_messenger_add_by_vid
  1657. {
  1658. DWORD vid;
  1659. } TPacketCGMessengerAddByVID;
  1660.  
  1661. typedef struct command_messenger_add_by_name
  1662. {
  1663. BYTE length;
  1664. //char login[LOGIN_MAX_LEN+1];
  1665. } TPacketCGMessengerAddByName;
  1666.  
  1667. typedef struct command_messenger_remove
  1668. {
  1669. char login[LOGIN_MAX_LEN+1];
  1670. //DWORD account;
  1671. } TPacketCGMessengerRemove;
  1672.  
  1673. typedef struct command_safebox_checkout
  1674. {
  1675. BYTE bHeader;
  1676. BYTE bSafePos;
  1677. TItemPos ItemPos;
  1678. } TPacketCGSafeboxCheckout;
  1679.  
  1680. typedef struct command_safebox_checkin
  1681. {
  1682. BYTE bHeader;
  1683. BYTE bSafePos;
  1684. TItemPos ItemPos;
  1685. } TPacketCGSafeboxCheckin;
  1686.  
  1687. ///////////////////////////////////////////////////////////////////////////////////
  1688. // Party
  1689.  
  1690. typedef struct command_party_parameter
  1691. {
  1692. BYTE bHeader;
  1693. BYTE bDistributeMode;
  1694. } TPacketCGPartyParameter;
  1695.  
  1696. typedef struct paryt_parameter
  1697. {
  1698. BYTE bHeader;
  1699. BYTE bDistributeMode;
  1700. } TPacketGCPartyParameter;
  1701.  
  1702. typedef struct packet_party_add
  1703. {
  1704. BYTE header;
  1705. DWORD pid;
  1706. char name[CHARACTER_NAME_MAX_LEN+1];
  1707. } TPacketGCPartyAdd;
  1708.  
  1709. typedef struct command_party_invite
  1710. {
  1711. BYTE header;
  1712. DWORD vid;
  1713. } TPacketCGPartyInvite;
  1714.  
  1715. typedef struct packet_party_invite
  1716. {
  1717. BYTE header;
  1718. DWORD leader_vid;
  1719. } TPacketGCPartyInvite;
  1720.  
  1721. typedef struct command_party_invite_answer
  1722. {
  1723. BYTE header;
  1724. DWORD leader_vid;
  1725. BYTE accept;
  1726. } TPacketCGPartyInviteAnswer;
  1727.  
  1728. typedef struct packet_party_update
  1729. {
  1730. BYTE header;
  1731. DWORD pid;
  1732. BYTE role;
  1733. BYTE percent_hp;
  1734. short affects[7];
  1735. } TPacketGCPartyUpdate;
  1736.  
  1737. typedef struct packet_party_remove
  1738. {
  1739. BYTE header;
  1740. DWORD pid;
  1741. } TPacketGCPartyRemove;
  1742.  
  1743. typedef struct packet_party_link
  1744. {
  1745. BYTE header;
  1746. DWORD pid;
  1747. DWORD vid;
  1748. } TPacketGCPartyLink;
  1749.  
  1750. typedef struct packet_party_unlink
  1751. {
  1752. BYTE header;
  1753. DWORD pid;
  1754. DWORD vid;
  1755. } TPacketGCPartyUnlink;
  1756.  
  1757. typedef struct command_party_remove
  1758. {
  1759. BYTE header;
  1760. DWORD pid;
  1761. } TPacketCGPartyRemove;
  1762.  
  1763. typedef struct command_party_set_state
  1764. {
  1765. BYTE header;
  1766. DWORD pid;
  1767. BYTE byRole;
  1768. BYTE flag;
  1769. } TPacketCGPartySetState;
  1770.  
  1771. enum
  1772. {
  1773. PARTY_SKILL_HEAL = 1,
  1774. PARTY_SKILL_WARP = 2
  1775. };
  1776.  
  1777. typedef struct command_party_use_skill
  1778. {
  1779. BYTE header;
  1780. BYTE bySkillIndex;
  1781. DWORD vid;
  1782. } TPacketCGPartyUseSkill;
  1783.  
  1784. typedef struct packet_safebox_size
  1785. {
  1786. BYTE bHeader;
  1787. BYTE bSize;
  1788. } TPacketCGSafeboxSize;
  1789.  
  1790. typedef struct packet_safebox_wrong_password
  1791. {
  1792. BYTE bHeader;
  1793. } TPacketCGSafeboxWrongPassword;
  1794.  
  1795. typedef struct command_empire
  1796. {
  1797. BYTE bHeader;
  1798. BYTE bEmpire;
  1799. } TPacketCGEmpire;
  1800.  
  1801. typedef struct packet_empire
  1802. {
  1803. BYTE bHeader;
  1804. BYTE bEmpire;
  1805. } TPacketGCEmpire;
  1806.  
  1807. enum
  1808. {
  1809. SAFEBOX_MONEY_STATE_SAVE,
  1810. SAFEBOX_MONEY_STATE_WITHDRAW,
  1811. };
  1812.  
  1813. typedef struct command_safebox_money
  1814. {
  1815. BYTE bHeader;
  1816. BYTE bState;
  1817. long lMoney;
  1818. } TPacketCGSafeboxMoney;
  1819.  
  1820. typedef struct packet_safebox_money_change
  1821. {
  1822. BYTE bHeader;
  1823. long lMoney;
  1824. } TPacketGCSafeboxMoneyChange;
  1825.  
  1826. // Guild
  1827.  
  1828. enum
  1829. {
  1830. GUILD_SUBHEADER_GC_LOGIN,
  1831. GUILD_SUBHEADER_GC_LOGOUT,
  1832. GUILD_SUBHEADER_GC_LIST,
  1833. GUILD_SUBHEADER_GC_GRADE,
  1834. GUILD_SUBHEADER_GC_ADD,
  1835. GUILD_SUBHEADER_GC_REMOVE,
  1836. GUILD_SUBHEADER_GC_GRADE_NAME,
  1837. GUILD_SUBHEADER_GC_GRADE_AUTH,
  1838. GUILD_SUBHEADER_GC_INFO,
  1839. GUILD_SUBHEADER_GC_COMMENTS,
  1840. GUILD_SUBHEADER_GC_CHANGE_EXP,
  1841. GUILD_SUBHEADER_GC_CHANGE_MEMBER_GRADE,
  1842. GUILD_SUBHEADER_GC_SKILL_INFO,
  1843. GUILD_SUBHEADER_GC_CHANGE_MEMBER_GENERAL,
  1844. GUILD_SUBHEADER_GC_GUILD_INVITE,
  1845. GUILD_SUBHEADER_GC_WAR,
  1846. GUILD_SUBHEADER_GC_GUILD_NAME,
  1847. GUILD_SUBHEADER_GC_GUILD_WAR_LIST,
  1848. GUILD_SUBHEADER_GC_GUILD_WAR_END_LIST,
  1849. GUILD_SUBHEADER_GC_WAR_SCORE,
  1850. GUILD_SUBHEADER_GC_MONEY_CHANGE,
  1851. };
  1852.  
  1853. enum GUILD_SUBHEADER_CG
  1854. {
  1855. GUILD_SUBHEADER_CG_ADD_MEMBER,
  1856. GUILD_SUBHEADER_CG_REMOVE_MEMBER,
  1857. GUILD_SUBHEADER_CG_CHANGE_GRADE_NAME,
  1858. GUILD_SUBHEADER_CG_CHANGE_GRADE_AUTHORITY,
  1859. GUILD_SUBHEADER_CG_OFFER,
  1860. GUILD_SUBHEADER_CG_POST_COMMENT,
  1861. GUILD_SUBHEADER_CG_DELETE_COMMENT,
  1862. GUILD_SUBHEADER_CG_REFRESH_COMMENT,
  1863. GUILD_SUBHEADER_CG_CHANGE_MEMBER_GRADE,
  1864. GUILD_SUBHEADER_CG_USE_SKILL,
  1865. GUILD_SUBHEADER_CG_CHANGE_MEMBER_GENERAL,
  1866. GUILD_SUBHEADER_CG_GUILD_INVITE_ANSWER,
  1867. GUILD_SUBHEADER_CG_CHARGE_GSP,
  1868. GUILD_SUBHEADER_CG_DEPOSIT_MONEY,
  1869. GUILD_SUBHEADER_CG_WITHDRAW_MONEY,
  1870. };
  1871.  
  1872. typedef struct packet_guild
  1873. {
  1874. BYTE header;
  1875. WORD size;
  1876. BYTE subheader;
  1877. } TPacketGCGuild;
  1878.  
  1879. typedef struct packet_guild_name_t
  1880. {
  1881. BYTE header;
  1882. WORD size;
  1883. BYTE subheader;
  1884. DWORD guildID;
  1885. char guildName[GUILD_NAME_MAX_LEN];
  1886. } TPacketGCGuildName;
  1887.  
  1888. typedef struct packet_guild_war
  1889. {
  1890. DWORD dwGuildSelf;
  1891. DWORD dwGuildOpp;
  1892. BYTE bType;
  1893. BYTE bWarState;
  1894. } TPacketGCGuildWar;
  1895.  
  1896. typedef struct command_guild
  1897. {
  1898. BYTE header;
  1899. BYTE subheader;
  1900. } TPacketCGGuild;
  1901.  
  1902. typedef struct command_guild_answer_make_guild
  1903. {
  1904. BYTE header;
  1905. char guild_name[GUILD_NAME_MAX_LEN+1];
  1906. } TPacketCGAnswerMakeGuild;
  1907.  
  1908. typedef struct command_guild_use_skill
  1909. {
  1910. DWORD dwVnum;
  1911. DWORD dwPID;
  1912. } TPacketCGGuildUseSkill;
  1913.  
  1914. // Guild Mark
  1915. typedef struct command_mark_login
  1916. {
  1917. BYTE header;
  1918. DWORD handle;
  1919. DWORD random_key;
  1920. } TPacketCGMarkLogin;
  1921.  
  1922. typedef struct command_mark_upload
  1923. {
  1924. BYTE header;
  1925. DWORD gid;
  1926. BYTE image[16*12*4];
  1927. } TPacketCGMarkUpload;
  1928.  
  1929. typedef struct command_mark_idxlist
  1930. {
  1931. BYTE header;
  1932. } TPacketCGMarkIDXList;
  1933.  
  1934. typedef struct command_mark_crclist
  1935. {
  1936. BYTE header;
  1937. BYTE imgIdx;
  1938. DWORD crclist[80];
  1939. } TPacketCGMarkCRCList;
  1940.  
  1941. typedef struct packet_mark_idxlist
  1942. {
  1943. BYTE header;
  1944. DWORD bufSize;
  1945. WORD count;
  1946. //뒤에 size * (WORD + WORD)만큼 데이터 붙음
  1947. } TPacketGCMarkIDXList;
  1948.  
  1949. typedef struct packet_mark_block
  1950. {
  1951. BYTE header;
  1952. DWORD bufSize;
  1953. BYTE imgIdx;
  1954. DWORD count;
  1955. // 뒤에 64 x 48 x 픽셀크기(4바이트) = 12288만큼 데이터 붙음
  1956. } TPacketGCMarkBlock;
  1957.  
  1958. typedef struct command_symbol_upload
  1959. {
  1960. BYTE header;
  1961. WORD size;
  1962. DWORD guild_id;
  1963. } TPacketCGGuildSymbolUpload;
  1964.  
  1965. typedef struct command_symbol_crc
  1966. {
  1967. BYTE header;
  1968. DWORD guild_id;
  1969. DWORD crc;
  1970. DWORD size;
  1971. } TPacketCGSymbolCRC;
  1972.  
  1973. typedef struct packet_symbol_data
  1974. {
  1975. BYTE header;
  1976. WORD size;
  1977. DWORD guild_id;
  1978. } TPacketGCGuildSymbolData;
  1979.  
  1980. // Fishing
  1981.  
  1982. typedef struct command_fishing
  1983. {
  1984. BYTE header;
  1985. BYTE dir;
  1986. } TPacketCGFishing;
  1987.  
  1988. typedef struct packet_fishing
  1989. {
  1990. BYTE header;
  1991. BYTE subheader;
  1992. DWORD info;
  1993. BYTE dir;
  1994. } TPacketGCFishing;
  1995.  
  1996. enum
  1997. {
  1998. FISHING_SUBHEADER_GC_START,
  1999. FISHING_SUBHEADER_GC_STOP,
  2000. FISHING_SUBHEADER_GC_REACT,
  2001. FISHING_SUBHEADER_GC_SUCCESS,
  2002. FISHING_SUBHEADER_GC_FAIL,
  2003. FISHING_SUBHEADER_GC_FISH,
  2004. };
  2005.  
  2006. typedef struct command_give_item
  2007. {
  2008. BYTE byHeader;
  2009. DWORD dwTargetVID;
  2010. TItemPos ItemPos;
  2011. BYTE byItemCount;
  2012. } TPacketCGGiveItem;
  2013.  
  2014. typedef struct SPacketCGHack
  2015. {
  2016. BYTE bHeader;
  2017. char szBuf[255 + 1];
  2018. } TPacketCGHack;
  2019.  
  2020. // SubHeader - Dungeon
  2021. enum
  2022. {
  2023. DUNGEON_SUBHEADER_GC_TIME_ATTACK_START = 0,
  2024. DUNGEON_SUBHEADER_GC_DESTINATION_POSITION = 1,
  2025. };
  2026.  
  2027. typedef struct packet_dungeon
  2028. {
  2029. BYTE bHeader;
  2030. WORD size;
  2031. BYTE subheader;
  2032. } TPacketGCDungeon;
  2033.  
  2034. typedef struct packet_dungeon_dest_position
  2035. {
  2036. long x;
  2037. long y;
  2038. } TPacketGCDungeonDestPosition;
  2039.  
  2040. typedef struct SPacketGCShopSign
  2041. {
  2042. BYTE bHeader;
  2043. DWORD dwVID;
  2044. char szSign[SHOP_SIGN_MAX_LEN + 1];
  2045. } TPacketGCShopSign;
  2046.  
  2047. typedef struct SPacketCGMyShop
  2048. {
  2049. BYTE bHeader;
  2050. char szSign[SHOP_SIGN_MAX_LEN + 1];
  2051. BYTE bCount;
  2052. #ifdef OFFLINE_SHOP
  2053. BYTE days;
  2054. #endif
  2055. } TPacketCGMyShop;
  2056.  
  2057. typedef struct SPacketGCTime
  2058. {
  2059. BYTE bHeader;
  2060. time_t time;
  2061. } TPacketGCTime;
  2062.  
  2063. enum
  2064. {
  2065. WALKMODE_RUN,
  2066. WALKMODE_WALK,
  2067. };
  2068.  
  2069. typedef struct SPacketGCWalkMode
  2070. {
  2071. BYTE header;
  2072. DWORD vid;
  2073. BYTE mode;
  2074. } TPacketGCWalkMode;
  2075.  
  2076. typedef struct SPacketGCChangeSkillGroup
  2077. {
  2078. BYTE header;
  2079. BYTE skill_group;
  2080. } TPacketGCChangeSkillGroup;
  2081.  
  2082. typedef struct SPacketCGRefine
  2083. {
  2084. BYTE header;
  2085. BYTE pos;
  2086. BYTE type;
  2087. #ifdef ENABLE_FEATURES_REFINE_SYSTEM
  2088. BYTE lLow;
  2089. BYTE lMedium;
  2090. BYTE lExtra;
  2091. BYTE lTotal;
  2092. #endif
  2093. } TPacketCGRefine;
  2094.  
  2095. typedef struct SPacketCGRequestRefineInfo
  2096. {
  2097. BYTE header;
  2098. BYTE pos;
  2099. } TPacketCGRequestRefineInfo;
  2100.  
  2101. typedef struct SPacketGCRefineInformaion
  2102. {
  2103. BYTE header;
  2104. BYTE type;
  2105. BYTE pos;
  2106. DWORD src_vnum;
  2107. DWORD result_vnum;
  2108. BYTE material_count;
  2109. int cost; // 소요 비용
  2110. int prob; // 확률
  2111. TRefineMaterial materials[REFINE_MATERIAL_MAX_NUM];
  2112. } TPacketGCRefineInformation;
  2113.  
  2114. struct TNPCPosition
  2115. {
  2116. BYTE bType;
  2117. char name[CHARACTER_NAME_MAX_LEN+1];
  2118. long x;
  2119. long y;
  2120. };
  2121.  
  2122. typedef struct SPacketGCNPCPosition
  2123. {
  2124. BYTE header;
  2125. WORD size;
  2126. WORD count;
  2127.  
  2128. // array of TNPCPosition
  2129. } TPacketGCNPCPosition;
  2130.  
  2131. typedef struct SPacketGCSpecialEffect
  2132. {
  2133. BYTE header;
  2134. BYTE type;
  2135. DWORD vid;
  2136. } TPacketGCSpecialEffect;
  2137.  
  2138. typedef struct SPacketCGChangeName
  2139. {
  2140. BYTE header;
  2141. BYTE index;
  2142. char name[CHARACTER_NAME_MAX_LEN+1];
  2143. } TPacketCGChangeName;
  2144.  
  2145. typedef struct SPacketGCChangeName
  2146. {
  2147. BYTE header;
  2148. DWORD pid;
  2149. char name[CHARACTER_NAME_MAX_LEN+1];
  2150. } TPacketGCChangeName;
  2151.  
  2152.  
  2153. typedef struct command_client_version
  2154. {
  2155. BYTE header;
  2156. char filename[32+1];
  2157. char timestamp[32+1];
  2158. } TPacketCGClientVersion;
  2159.  
  2160. typedef struct command_client_version2
  2161. {
  2162. BYTE header;
  2163. char filename[32+1];
  2164. char timestamp[32+1];
  2165. } TPacketCGClientVersion2;
  2166.  
  2167. typedef struct packet_channel
  2168. {
  2169. BYTE header;
  2170. BYTE channel;
  2171. } TPacketGCChannel;
  2172.  
  2173.  
  2174. typedef struct SEquipmentItemSet
  2175. {
  2176. DWORD vnum;
  2177. BYTE count;
  2178. long alSockets[ITEM_SOCKET_MAX_NUM];
  2179. TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
  2180. } TEquipmentItemSet;
  2181.  
  2182. typedef struct pakcet_view_equip
  2183. {
  2184. BYTE header;
  2185. DWORD vid;
  2186. TEquipmentItemSet equips[WEAR_MAX_NUM];
  2187. } TPacketViewEquip;
  2188.  
  2189. typedef struct
  2190. {
  2191. DWORD dwID;
  2192. long x, y;
  2193. long width, height;
  2194. DWORD dwGuildID;
  2195. } TLandPacketElement;
  2196.  
  2197. typedef struct packet_land_list
  2198. {
  2199. BYTE header;
  2200. WORD size;
  2201. } TPacketGCLandList;
  2202.  
  2203. typedef struct
  2204. {
  2205. BYTE bHeader;
  2206. long lID;
  2207. char szName[32+1];
  2208. DWORD dwVID;
  2209. BYTE bType;
  2210. } TPacketGCTargetCreate;
  2211.  
  2212. enum
  2213. {
  2214. CREATE_TARGET_TYPE_NONE,
  2215. CREATE_TARGET_TYPE_LOCATION,
  2216. CREATE_TARGET_TYPE_CHARACTER,
  2217. #if defined(ENABLE_SHOP_SEARCH)
  2218. CREATE_TARGET_TYPE_SHOP,
  2219. #endif
  2220. };
  2221.  
  2222. typedef struct
  2223. {
  2224. BYTE bHeader;
  2225. long lID;
  2226. char szTargetName[32+1];
  2227. DWORD dwVID;
  2228. BYTE byType;
  2229. } TPacketGCTargetCreateNew;
  2230.  
  2231. typedef struct
  2232. {
  2233. BYTE bHeader;
  2234. long lID;
  2235. long lX, lY;
  2236. } TPacketGCTargetUpdate;
  2237.  
  2238. typedef struct
  2239. {
  2240. BYTE bHeader;
  2241. long lID;
  2242. } TPacketGCTargetDelete;
  2243.  
  2244. typedef struct
  2245. {
  2246. BYTE bHeader;
  2247. TPacketAffectElement elem;
  2248. } TPacketGCAffectAdd;
  2249.  
  2250. typedef struct
  2251. {
  2252. BYTE bHeader;
  2253. DWORD dwType;
  2254. BYTE bApplyOn;
  2255. } TPacketGCAffectRemove;
  2256.  
  2257. typedef struct packet_lover_info
  2258. {
  2259. BYTE header;
  2260. char name[CHARACTER_NAME_MAX_LEN + 1];
  2261. BYTE love_point;
  2262. } TPacketGCLoverInfo;
  2263.  
  2264. typedef struct packet_love_point_update
  2265. {
  2266. BYTE header;
  2267. BYTE love_point;
  2268. } TPacketGCLovePointUpdate;
  2269.  
  2270. // MINING
  2271. typedef struct packet_dig_motion
  2272. {
  2273. BYTE header;
  2274. DWORD vid;
  2275. DWORD target_vid;
  2276. BYTE count;
  2277. } TPacketGCDigMotion;
  2278. // END_OF_MINING
  2279.  
  2280. // SCRIPT_SELECT_ITEM
  2281. typedef struct command_script_select_item
  2282. {
  2283. BYTE header;
  2284. DWORD selection;
  2285. } TPacketCGScriptSelectItem;
  2286. // END_OF_SCRIPT_SELECT_ITEM
  2287.  
  2288. typedef struct packet_damage_info
  2289. {
  2290. BYTE header;
  2291. DWORD dwVID;
  2292. BYTE flag;
  2293. int damage;
  2294. } TPacketGCDamageInfo;
  2295.  
  2296. enum
  2297. {
  2298. RUNUP_MATRIX_ANSWER_MAX_LEN = 4,
  2299. RUNUP_MATRIX_QUIZ_MAX_LEN = 8 ,
  2300.  
  2301. };
  2302.  
  2303. typedef struct packet_runup_matrix_quiz
  2304. {
  2305. BYTE bHeader;
  2306. char szQuiz[RUNUP_MATRIX_QUIZ_MAX_LEN + 1];
  2307. } TPacketGCRunupMatrixQuiz;
  2308.  
  2309. typedef struct command_runup_matrix_answer
  2310. {
  2311. BYTE bHeader;
  2312. char szAnswer[RUNUP_MATRIX_ANSWER_MAX_LEN + 1];
  2313. } TPacketCGRunupMatrixAnswer;
  2314.  
  2315. typedef struct packet_passpod
  2316. {
  2317. BYTE bHeader;
  2318. char szAnswer[8+1];
  2319. } TPacketCGPasspod;
  2320.  
  2321. typedef struct packet_passpod_failed
  2322. {
  2323. BYTE bHeader;
  2324. char szMessage[128];
  2325. } TPacketCGPasspodFailed;
  2326.  
  2327. typedef struct tag_GGSiege
  2328. {
  2329. BYTE bHeader;
  2330. BYTE bEmpire;
  2331. BYTE bTowerCount;
  2332. } TPacketGGSiege;
  2333.  
  2334. typedef struct SPacketGGMonarchTransfer
  2335. {
  2336. BYTE bHeader;
  2337. DWORD dwTargetPID;
  2338. long x;
  2339. long y;
  2340. } TPacketMonarchGGTransfer;
  2341.  
  2342. typedef struct SPacketGGPCBangUpdate
  2343. {
  2344. BYTE bHeader;
  2345. unsigned long ulPCBangID;
  2346. } TPacketPCBangUpdate;
  2347.  
  2348. typedef struct SPacketGGCheckAwakeness
  2349. {
  2350. BYTE bHeader;
  2351. } TPacketGGCheckAwakeness;
  2352.  
  2353. typedef struct SPacketGCPanamaPack
  2354. {
  2355. BYTE bHeader;
  2356. char szPackName[256];
  2357. BYTE abIV[32];
  2358. } TPacketGCPanamaPack;
  2359.  
  2360. //TODO : 아우 짱나..가변패킷 사이즈 받아들일수 있게 패킷 핸들러 Refactoring 하자.
  2361. typedef struct SPacketGCHybridCryptKeys
  2362. {
  2363. SPacketGCHybridCryptKeys() : m_pStream(NULL) {}
  2364. ~SPacketGCHybridCryptKeys()
  2365. {
  2366. //GCC 에선 NULL delete 해도 괜찮나? 일단 안전하게 NULL 체크 하자. ( 근데 이거 C++ 표준아니었나 --a )
  2367. if( m_pStream )
  2368. {
  2369. delete[] m_pStream;
  2370. m_pStream = NULL;
  2371. }
  2372. }
  2373.  
  2374. DWORD GetStreamSize()
  2375. {
  2376. return sizeof(bHeader) + sizeof(WORD) + sizeof(int) + KeyStreamLen;
  2377. }
  2378.  
  2379. BYTE* GetStreamData()
  2380. {
  2381. if( m_pStream )
  2382. delete[] m_pStream;
  2383.  
  2384. uDynamicPacketSize = (WORD)GetStreamSize();
  2385.  
  2386. m_pStream = new BYTE[ uDynamicPacketSize ];
  2387.  
  2388. memcpy( m_pStream, &bHeader, 1 );
  2389. memcpy( m_pStream+1, &uDynamicPacketSize, 2 );
  2390. memcpy( m_pStream+3, &KeyStreamLen, 4 );
  2391.  
  2392. if( KeyStreamLen > 0 )
  2393. memcpy( m_pStream+7, pDataKeyStream, KeyStreamLen );
  2394.  
  2395. return m_pStream;
  2396. }
  2397.  
  2398. BYTE bHeader;
  2399. WORD uDynamicPacketSize; // 빌어먹을 클라 DynamicPacketHeader 구조때문에 맞춰줘야한다 -_-;
  2400. int KeyStreamLen;
  2401. BYTE* pDataKeyStream;
  2402.  
  2403. private:
  2404. BYTE* m_pStream;
  2405.  
  2406.  
  2407. } TPacketGCHybridCryptKeys;
  2408.  
  2409.  
  2410. typedef struct SPacketGCPackageSDB
  2411. {
  2412. SPacketGCPackageSDB() : m_pDataSDBStream(NULL), m_pStream(NULL) {}
  2413. ~SPacketGCPackageSDB()
  2414. {
  2415. if( m_pStream )
  2416. {
  2417. delete[] m_pStream;
  2418. m_pStream = NULL;
  2419. }
  2420. }
  2421.  
  2422. DWORD GetStreamSize()
  2423. {
  2424. return sizeof(bHeader) + sizeof(WORD) + sizeof(int) + iStreamLen;
  2425. }
  2426.  
  2427. BYTE* GetStreamData()
  2428. {
  2429. if( m_pStream )
  2430. delete[] m_pStream;
  2431.  
  2432. uDynamicPacketSize = GetStreamSize();
  2433.  
  2434. m_pStream = new BYTE[ uDynamicPacketSize ];
  2435.  
  2436. memcpy( m_pStream, &bHeader, 1 );
  2437. memcpy( m_pStream+1, &uDynamicPacketSize, 2 );
  2438. memcpy( m_pStream+3, &iStreamLen, 4 );
  2439.  
  2440. if( iStreamLen > 0 )
  2441. memcpy( m_pStream+7, m_pDataSDBStream, iStreamLen );
  2442.  
  2443. return m_pStream;
  2444. }
  2445.  
  2446. BYTE bHeader;
  2447. WORD uDynamicPacketSize; // 빌어먹을 클라 DynamicPacketHeader 구조때문에 맞춰줘야한다 -_-;
  2448. int iStreamLen;
  2449. BYTE* m_pDataSDBStream;
  2450.  
  2451. private:
  2452. BYTE* m_pStream;
  2453.  
  2454.  
  2455. } TPacketGCPackageSDB;
  2456.  
  2457. #ifdef _IMPROVED_PACKET_ENCRYPTION_
  2458. struct TPacketKeyAgreement
  2459. {
  2460. static const int MAX_DATA_LEN = 256;
  2461. BYTE bHeader;
  2462. WORD wAgreedLength;
  2463. WORD wDataLength;
  2464. BYTE data[MAX_DATA_LEN];
  2465. };
  2466.  
  2467. struct TPacketKeyAgreementCompleted
  2468. {
  2469. BYTE bHeader;
  2470. BYTE data[3]; // dummy (not used)
  2471. };
  2472.  
  2473. #endif // _IMPROVED_PACKET_ENCRYPTION_
  2474.  
  2475. #define MAX_EFFECT_FILE_NAME 128
  2476. typedef struct SPacketGCSpecificEffect
  2477. {
  2478. BYTE header;
  2479. DWORD vid;
  2480. char effect_file[MAX_EFFECT_FILE_NAME];
  2481. } TPacketGCSpecificEffect;
  2482.  
  2483. // 용혼석
  2484. enum EDragonSoulRefineWindowRefineType
  2485. {
  2486. DragonSoulRefineWindow_UPGRADE,
  2487. DragonSoulRefineWindow_IMPROVEMENT,
  2488. DragonSoulRefineWindow_REFINE,
  2489. };
  2490.  
  2491. enum EPacketCGDragonSoulSubHeaderType
  2492. {
  2493. DS_SUB_HEADER_OPEN,
  2494. DS_SUB_HEADER_CLOSE,
  2495. DS_SUB_HEADER_DO_REFINE_GRADE,
  2496. DS_SUB_HEADER_DO_REFINE_STEP,
  2497. DS_SUB_HEADER_DO_REFINE_STRENGTH,
  2498. DS_SUB_HEADER_REFINE_FAIL,
  2499. DS_SUB_HEADER_REFINE_FAIL_MAX_REFINE,
  2500. DS_SUB_HEADER_REFINE_FAIL_INVALID_MATERIAL,
  2501. DS_SUB_HEADER_REFINE_FAIL_NOT_ENOUGH_MONEY,
  2502. DS_SUB_HEADER_REFINE_FAIL_NOT_ENOUGH_MATERIAL,
  2503. DS_SUB_HEADER_REFINE_FAIL_TOO_MUCH_MATERIAL,
  2504. DS_SUB_HEADER_REFINE_SUCCEED,
  2505. };
  2506. typedef struct SPacketCGDragonSoulRefine
  2507. {
  2508. SPacketCGDragonSoulRefine() : header (HEADER_CG_DRAGON_SOUL_REFINE)
  2509. {}
  2510. BYTE header;
  2511. BYTE bSubType;
  2512. TItemPos ItemGrid[DRAGON_SOUL_REFINE_GRID_SIZE];
  2513. } TPacketCGDragonSoulRefine;
  2514.  
  2515. typedef struct SPacketGCDragonSoulRefine
  2516. {
  2517. SPacketGCDragonSoulRefine() : header(HEADER_GC_DRAGON_SOUL_REFINE)
  2518. {}
  2519. BYTE header;
  2520. BYTE bSubType;
  2521. TItemPos Pos;
  2522. } TPacketGCDragonSoulRefine;
  2523.  
  2524. typedef struct SPacketCGStateCheck
  2525. {
  2526. BYTE header;
  2527. unsigned long key;
  2528. unsigned long index;
  2529. } TPacketCGStateCheck;
  2530.  
  2531. typedef struct SPacketGCStateCheck
  2532. {
  2533. BYTE header;
  2534. unsigned long key;
  2535. unsigned long index;
  2536. unsigned char state;
  2537. } TPacketGCStateCheck;
  2538.  
  2539. #ifdef __TITLE_SYSTEM__
  2540. typedef struct SPacketGGTitleInfo
  2541. {
  2542. BYTE bHeader;
  2543. int iTitle;
  2544. BYTE bAnswer;
  2545. } TPacketGGTitleInfo;
  2546. #endif
  2547.  
  2548. #ifdef __SASH_SYSTEM__
  2549. enum
  2550. {
  2551. HEADER_CG_SASH = 211,
  2552. HEADER_GC_SASH = 215,
  2553. SASH_SUBHEADER_GC_OPEN = 0,
  2554. SASH_SUBHEADER_GC_CLOSE,
  2555. SASH_SUBHEADER_GC_ADDED,
  2556. SASH_SUBHEADER_GC_REMOVED,
  2557. SASH_SUBHEADER_CG_REFINED,
  2558. SASH_SUBHEADER_CG_CLOSE = 0,
  2559. SASH_SUBHEADER_CG_ADD,
  2560. SASH_SUBHEADER_CG_REMOVE,
  2561. SASH_SUBHEADER_CG_REFINE,
  2562. };
  2563.  
  2564. typedef struct SPacketSash
  2565. {
  2566. BYTE header;
  2567. BYTE subheader;
  2568. bool bWindow;
  2569. DWORD dwPrice;
  2570. BYTE bPos;
  2571. TItemPos tPos;
  2572. DWORD dwItemVnum;
  2573. DWORD dwMinAbs;
  2574. DWORD dwMaxAbs;
  2575. } TPacketSash;
  2576. #endif
  2577.  
  2578. #ifdef __CHANGELOOK_SYSTEM__
  2579. enum
  2580. {
  2581. HEADER_CG_CL = 213,
  2582. HEADER_GC_CL = 218,
  2583. CL_SUBHEADER_OPEN = 0,
  2584. CL_SUBHEADER_CLOSE,
  2585. CL_SUBHEADER_ADD,
  2586. CL_SUBHEADER_REMOVE,
  2587. CL_SUBHEADER_REFINE,
  2588. };
  2589.  
  2590. typedef struct SPacketChangeLook
  2591. {
  2592. BYTE header;
  2593. BYTE subheader;
  2594. DWORD dwCost;
  2595. BYTE bPos;
  2596. TItemPos tPos;
  2597. } TPacketChangeLook;
  2598. #endif
  2599.  
  2600. #pragma pack()
  2601. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement