packets_struct.hpp 95 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931
  1. // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
  2. // Copyright (c) Hercules Dev Team - Licensed under GNU GPL
  3. // For more information, see LICENCE in the main folder
  4. #ifndef MAP_PACKETS_STRUCT_HPP
  5. #define MAP_PACKETS_STRUCT_HPP
  6. #include "../common/cbasetypes.hpp"
  7. #include "../common/mmo.hpp"
  8. /**
  9. *
  10. **/
  11. enum packet_headers {
  12. banking_withdraw_ackType = 0x9aa,
  13. banking_deposit_ackType = 0x9a8,
  14. banking_checkType = 0x9a6,
  15. cart_additem_ackType = 0x12c,
  16. sc_notickType = 0x196,
  17. #if PACKETVER >= 20150226
  18. cartaddType = 0xa0b,
  19. #elif PACKETVER >= 5
  20. cartaddType = 0x1c5,
  21. #else
  22. cartaddType = 0x124,
  23. #endif
  24. #if PACKETVER >= 20150226
  25. storageaddType = 0xa0a,
  26. #elif PACKETVER >= 5
  27. storageaddType = 0x1c4,
  28. #else
  29. storageaddType = 0xf4,
  30. #endif
  31. #if PACKETVER >= 20150226
  32. tradeaddType = 0xa09,
  33. #elif PACKETVER >= 20100223
  34. tradeaddType = 0x80f,
  35. #else
  36. tradeaddType = 0x0e9,
  37. #endif
  38. #if PACKETVER < 20061218
  39. additemType = 0x0a0,
  40. #elif PACKETVER < 20071002
  41. additemType = 0x29a,
  42. #elif PACKETVER < 20120925
  43. additemType = 0x2d4,
  44. #elif PACKETVER < 20150226
  45. additemType = 0x990,
  46. #elif PACKETVER < 20160921
  47. additemType = 0xa0c,
  48. #else
  49. additemType = 0xa37,
  50. #endif
  51. #if PACKETVER < 4
  52. idle_unitType = 0x78,
  53. #elif PACKETVER < 7
  54. idle_unitType = 0x1d8,
  55. #elif PACKETVER < 20080102
  56. idle_unitType = 0x22a,
  57. #elif PACKETVER < 20091103
  58. idle_unitType = 0x2ee,
  59. #elif PACKETVER < 20101124
  60. idle_unitType = 0x7f9,
  61. #elif PACKETVER < 20120221
  62. idle_unitType = 0x857,
  63. #elif PACKETVER < 20131223
  64. idle_unitType = 0x915,
  65. #elif PACKETVER < 20150513
  66. idle_unitType = 0x9dd,
  67. #else
  68. idle_unitType = 0x9ff,
  69. #endif
  70. #if PACKETVER >= 20120618
  71. status_changeType = 0x983,
  72. #elif PACKETVER >= 20090121
  73. status_changeType = 0x43f,
  74. #else
  75. status_changeType = sc_notickType,/* 0x196 */
  76. #endif
  77. status_change2Type = 0x43f,
  78. status_change_endType = 0x196,
  79. #if PACKETVER < 20091103
  80. spawn_unit2Type = 0x7c,
  81. idle_unit2Type = 0x78,
  82. #endif
  83. #if PACKETVER < 20071113
  84. damageType = 0x8a,
  85. #elif PACKETVER < 20131223
  86. damageType = 0x2e1,
  87. #else
  88. damageType = 0x8c8,
  89. #endif
  90. #if PACKETVER < 4
  91. spawn_unitType = 0x79,
  92. #elif PACKETVER < 7
  93. spawn_unitType = 0x1d9,
  94. #elif PACKETVER < 20080102
  95. spawn_unitType = 0x22b,
  96. #elif PACKETVER < 20091103
  97. spawn_unitType = 0x2ed,
  98. #elif PACKETVER < 20101124
  99. spawn_unitType = 0x7f8,
  100. #elif PACKETVER < 20120221
  101. spawn_unitType = 0x858,
  102. #elif PACKETVER < 20131223
  103. spawn_unitType = 0x90f,
  104. #elif PACKETVER < 20150513
  105. spawn_unitType = 0x9dc,
  106. #else
  107. spawn_unitType = 0x9fe,
  108. #endif
  109. #if PACKETVER < 20080102
  110. authokType = 0x73,
  111. #elif PACKETVER < 20141022
  112. authokType = 0x2eb,
  113. // Some clients smaller than 20160330 cant be tested [4144]
  114. #elif PACKETVER < 20160330
  115. authokType = 0xa18,
  116. #else
  117. authokType = 0x2eb,
  118. #endif
  119. script_clearType = 0x8d6,
  120. package_item_announceType = 0x7fd,
  121. item_drop_announceType = 0x7fd,
  122. #if PACKETVER < 4
  123. unit_walkingType = 0x7b,
  124. #elif PACKETVER < 7
  125. unit_walkingType = 0x1da,
  126. #elif PACKETVER < 20080102
  127. unit_walkingType = 0x22c,
  128. #elif PACKETVER < 20091103
  129. unit_walkingType = 0x2ec,
  130. #elif PACKETVER < 20101124
  131. unit_walkingType = 0x7f7,
  132. #elif PACKETVER < 20120221
  133. unit_walkingType = 0x856,
  134. #elif PACKETVER < 20131223
  135. unit_walkingType = 0x914,
  136. #elif PACKETVER < 20150513
  137. unit_walkingType = 0x9db,
  138. #else
  139. unit_walkingType = 0x9fd,
  140. #endif
  141. bgqueue_ackType = 0x8d8,
  142. bgqueue_notice_deleteType = 0x8db,
  143. bgqueue_registerType = 0x8d7,
  144. bgqueue_updateinfoType = 0x8d9,
  145. bgqueue_checkstateType = 0x90a,
  146. bgqueue_revokereqType = 0x8da,
  147. bgqueue_battlebeginackType = 0x8e0,
  148. bgqueue_notify_entryType = 0x8d9,
  149. bgqueue_battlebeginsType = 0x8df,
  150. notify_bounditemType = 0x2d3,
  151. #if PACKETVER < 20110718
  152. skill_entryType = 0x11f,
  153. #elif PACKETVER < 20121212
  154. skill_entryType = 0x8c7,
  155. #elif PACKETVER < 20130731
  156. skill_entryType = 0x99f,
  157. #else
  158. skill_entryType = 0x9ca,
  159. #endif
  160. graffiti_entryType = 0x1c9,
  161. #if defined(PACKETVER_ZERO) || PACKETVER >= 20180418
  162. dropflooritemType = 0xadd,
  163. #elif PACKETVER > 20130000 /* not sure date */
  164. dropflooritemType = 0x84b,
  165. #else
  166. dropflooritemType = 0x9e,
  167. #endif
  168. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  169. inventorylistnormalType = 0xb09,
  170. #elif PACKETVER >= 20120925
  171. inventorylistnormalType = 0x991,
  172. #elif PACKETVER >= 20080102
  173. inventorylistnormalType = 0x2e8,
  174. #elif PACKETVER >= 20071002
  175. inventorylistnormalType = 0x1ee,
  176. #else
  177. inventorylistnormalType = 0xa3,
  178. #endif
  179. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  180. inventorylistequipType = 0xb0a,
  181. #elif PACKETVER >= 20150226
  182. inventorylistequipType = 0xa0d,
  183. #elif PACKETVER >= 20120925
  184. inventorylistequipType = 0x992,
  185. #elif PACKETVER >= 20080102
  186. inventorylistequipType = 0x2d0,
  187. #elif PACKETVER >= 20071002
  188. inventorylistequipType = 0x295,
  189. #else
  190. inventorylistequipType = 0xa4,
  191. #endif
  192. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  193. storageListNormalType = 0xb09,
  194. #elif PACKETVER >= 20120925
  195. storageListNormalType = 0x995,
  196. #elif PACKETVER >= 20080102
  197. storageListNormalType = 0x2ea,
  198. #elif PACKETVER >= 20071002
  199. storageListNormalType = 0x295,
  200. #else
  201. storageListNormalType = 0xa5,
  202. #endif
  203. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  204. storageListEquipType = 0xb0a,
  205. #elif PACKETVER >= 20150226
  206. storageListEquipType = 0xa10,
  207. #elif PACKETVER >= 20120925
  208. storageListEquipType = 0x996,
  209. #elif PACKETVER >= 20080102
  210. storageListEquipType = 0x2d1,
  211. #elif PACKETVER >= 20071002
  212. storageListEquipType = 0x296,
  213. #else
  214. storageListEquipType = 0xa6,
  215. #endif
  216. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  217. cartlistnormalType = 0xb09,
  218. #elif PACKETVER >= 20120925
  219. cartlistnormalType = 0x993,
  220. #elif PACKETVER >= 20080102
  221. cartlistnormalType = 0x2e9,
  222. #elif PACKETVER >= 20071002
  223. cartlistnormalType = 0x1ef,
  224. #else
  225. cartlistnormalType = 0x123,
  226. #endif
  227. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  228. cartlistequipType = 0xb0a,
  229. #elif PACKETVER >= 20150226
  230. cartlistequipType = 0xa0f,
  231. #elif PACKETVER >= 20120925
  232. cartlistequipType = 0x994,
  233. #elif PACKETVER >= 20080102
  234. cartlistequipType = 0x2d2,
  235. #elif PACKETVER >= 20071002
  236. cartlistequipType = 0x297,
  237. #else
  238. cartlistequipType = 0x122,
  239. #endif
  240. #if PACKETVER < 20100105
  241. vendinglistType = 0x133,
  242. #else
  243. vendinglistType = 0x800,
  244. #endif
  245. openvendingType = 0x136,
  246. #if PACKETVER >= 20120925
  247. equipitemType = 0x998,
  248. #else
  249. equipitemType = 0xa9,
  250. #endif
  251. #if PACKETVER >= 20120925
  252. equipitemackType = 0x999,
  253. #else
  254. equipitemackType = 0xaa,
  255. #endif
  256. #if PACKETVER >= 20120925
  257. unequipitemackType = 0x99a,
  258. #else
  259. unequipitemackType = 0xac,
  260. #endif
  261. #if PACKETVER_MAIN_NUM >= 20180801 || PACKETVER_RE_NUM >= 20180801 || PACKETVER_ZERO_NUM >= 20180808
  262. viewequipackType = 0xb03,
  263. #elif PACKETVER >= 20150226
  264. viewequipackType = 0xa2d,
  265. #elif PACKETVER >= 20120925
  266. viewequipackType = 0x997,
  267. // [4144] not supported due other packets/structs not updated
  268. //#elif (PACKETVER_MAIN_NUM >= 20111207) || (PACKETVER_RE_NUM >= 20111122)
  269. // viewequipackType = 0x906,
  270. #elif PACKETVER >= 20101124
  271. viewequipackType = 0x859,
  272. #else
  273. viewequipackType = 0x2d7,
  274. #endif
  275. notifybindonequip = 0x2d3,
  276. monsterhpType = 0x977,
  277. maptypeproperty2Type = 0x99b,
  278. #if PACKETVER >= 20131223 // version probably can be 20131030 [4144]
  279. wisendType = 0x9df,
  280. #else
  281. wisendType = 0x98,
  282. #endif
  283. partyleaderchangedType = 0x7fc,
  284. rouletteinfoackType = 0xa1c,
  285. roulettgenerateackType = 0xa20,
  286. roulettercvitemackType = 0xa22,
  287. #if PACKETVER >= 20141016
  288. achievementListType = 0xa23,
  289. achievementUpdateType = 0xa24,
  290. achievementRewardAckType = 0xa26,
  291. #endif // PACKETVER >= 20141016
  292. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  293. questListType = 0xaff, ///< ZC_ALL_QUEST_LIST4
  294. #elif PACKETVER >= 20150513 // [4144] 0x09f8 handling in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
  295. questListType = 0x9f8, ///< ZC_ALL_QUEST_LIST3
  296. #elif PACKETVER >= 20141022
  297. questListType = 0x97a, ///< ZC_ALL_QUEST_LIST2
  298. #else // PACKETVER < 20141022
  299. questListType = 0x2b1, ///< ZC_ALL_QUEST_LIST
  300. #endif // PACKETVER >= 20141022
  301. /* Rodex */
  302. rodexicon = 0x09E7,
  303. rodexread = 0x09EB,
  304. rodexwriteresult = 0x09ED,
  305. rodexnextpage = 0x09F0,
  306. rodexgetzeny = 0x09F2,
  307. rodexgetitem = 0x09F4,
  308. rodexdelete = 0x09F6,
  309. rodexadditem = 0x0A05,
  310. rodexremoveitem = 0x0A07,
  311. rodexopenwrite = 0x0A12,
  312. #if PACKETVER < 20160601
  313. rodexmailList = 0x09F0,
  314. #elif PACKETVER < 20170419
  315. rodexmailList = 0x0A7D,
  316. #else // PACKETVER >= 20170419
  317. rodexmailList = 0x0Ac2,
  318. #endif
  319. #if PACKETVER < 20160316
  320. rodexcheckplayer = 0x0A14,
  321. #else // PACKETVER >= 20160316
  322. rodexcheckplayer = 0x0A51,
  323. #endif
  324. #if PACKETVER >= 20151223
  325. skillscale = 0xA41,
  326. #endif
  327. #if PACKETVER >= 20130821
  328. progressbarunit = 0x09D1,
  329. #endif
  330. #if PACKETVER >= 20171207
  331. partymemberinfo = 0x0ae4,
  332. partyinfo = 0x0ae5,
  333. #elif PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
  334. partymemberinfo = 0x0a43,
  335. partyinfo = 0x0a44,
  336. #else
  337. partymemberinfo = 0x01e9,
  338. partyinfo = 0x00fb,
  339. #endif
  340. #if PACKETVER >= 20120716
  341. clanOnlineCount = 0x0988, ///< ZC_NOTIFY_CLAN_CONNECTINFO
  342. clanLeave = 0x0989, ///< ZC_ACK_CLAN_LEAVE
  343. clanMessage = 0x098E, ///< ZC_NOTIFY_CLAN_CHAT
  344. #endif
  345. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  346. questAddType = 0xb0c,
  347. #elif PACKETVER >= 20150513 // [4144] 0x09f9 handled in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
  348. questAddType = 0x9f9,
  349. #else
  350. questAddType = 0x2b3,
  351. #endif // PACKETVER < 20150513
  352. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  353. questUpdateType = 0xafe,
  354. #elif PACKETVER >= 20150513
  355. questUpdateType = 0x9fa,
  356. #else
  357. questUpdateType = 0x2b5,
  358. #endif // PACKETVER < 20150513
  359. questUpdateType2 = 0x8fe,
  360. #if PACKETVER >= 20171122
  361. openUiType = 0xAE2,
  362. #elif PACKETVER >= 20150128
  363. openUiType = 0xA38,
  364. #endif
  365. #if PACKETVER >= 20180627
  366. authError = 0xb02,
  367. #elif PACKETVER >= 20101123
  368. authError = 0x83e,
  369. #else
  370. authError = 0x6a,
  371. #endif
  372. #if PACKETVER >= 3
  373. useItemAckType = 0x1c8,
  374. #else
  375. useItemAckType = 0xa8,
  376. #endif
  377. #if PACKETVER >= 4
  378. sendLookType = 0x1d7,
  379. #else
  380. sendLookType = 0xc3,
  381. #endif
  382. #if PACKETVER >= 20141016
  383. buyingStoreUpdateItemType = 0x9e6,
  384. #else
  385. buyingStoreUpdateItemType = 0x81b,
  386. #endif
  387. reqName = 0x95,
  388. #if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
  389. skilWarpPointType = 0xabe,
  390. #else
  391. skilWarpPointType = 0x11c,
  392. #endif
  393. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  394. guildExpulsion = 0xa82,
  395. #elif PACKETVER >= 20100803
  396. guildExpulsion = 0x839,
  397. #else
  398. guildExpulsion = 0x15c,
  399. #endif
  400. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  401. guildLeave = 0xa83,
  402. #else
  403. guildLeave = 0x15a,
  404. #endif
  405. };
  406. #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
  407. #pragma pack(push, 1)
  408. #endif // not NetBSD < 6 / Solaris
  409. /**
  410. * structs for data
  411. */
  412. struct EQUIPSLOTINFO {
  413. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  414. uint32 card[4];
  415. #else
  416. uint16 card[4];
  417. #endif
  418. } __attribute__((packed));
  419. struct NORMALITEM_INFO {
  420. int16 index;
  421. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  422. uint32 ITID;
  423. #else
  424. uint16 ITID;
  425. #endif
  426. uint8 type;
  427. #if PACKETVER < 20120925
  428. uint8 IsIdentified;
  429. #endif
  430. int16 count;
  431. #if PACKETVER >= 20120925
  432. uint32 WearState;
  433. #else
  434. uint16 WearState;
  435. #endif
  436. #if PACKETVER >= 5
  437. struct EQUIPSLOTINFO slot;
  438. #endif
  439. #if PACKETVER >= 20080102
  440. int32 HireExpireDate;
  441. #endif
  442. #if PACKETVER >= 20120925
  443. struct {
  444. uint8 IsIdentified : 1;
  445. uint8 PlaceETCTab : 1;
  446. uint8 SpareBits : 6;
  447. } Flag;
  448. #endif
  449. } __attribute__((packed));
  450. struct ItemOptions {
  451. int16 index;
  452. int16 value;
  453. uint8 param;
  454. } __attribute__((packed));
  455. struct EQUIPITEM_INFO {
  456. int16 index;
  457. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  458. uint32 ITID;
  459. #else
  460. uint16 ITID;
  461. #endif
  462. uint8 type;
  463. #if PACKETVER < 20120925
  464. uint8 IsIdentified;
  465. #endif
  466. #if PACKETVER >= 20120925
  467. uint32 location;
  468. uint32 WearState;
  469. #else
  470. uint16 location;
  471. uint16 WearState;
  472. #endif
  473. #if PACKETVER < 20120925
  474. uint8 IsDamaged;
  475. #endif
  476. uint8 RefiningLevel;
  477. struct EQUIPSLOTINFO slot;
  478. #if PACKETVER >= 20071002
  479. int32 HireExpireDate;
  480. #endif
  481. #if PACKETVER >= 20080102
  482. uint16 bindOnEquipType;
  483. #endif
  484. #if PACKETVER >= 20100629
  485. uint16 wItemSpriteNumber;
  486. #endif
  487. #if PACKETVER >= 20150226
  488. uint8 option_count;
  489. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  490. #endif
  491. #if PACKETVER >= 20120925
  492. struct {
  493. uint8 IsIdentified : 1;
  494. uint8 IsDamaged : 1;
  495. uint8 PlaceETCTab : 1;
  496. uint8 SpareBits : 5;
  497. } Flag;
  498. #endif
  499. } __attribute__((packed));
  500. struct packet_authok {
  501. int16 PacketType;
  502. uint32 startTime;
  503. uint8 PosDir[3];
  504. uint8 xSize;
  505. uint8 ySize;
  506. #if PACKETVER >= 20080102
  507. int16 font;
  508. #endif
  509. // Some clients smaller than 20160330 cant be tested [4144]
  510. #if PACKETVER >= 20141022 && PACKETVER < 20160330
  511. uint8 sex;
  512. #endif
  513. } __attribute__((packed));
  514. struct packet_monster_hp {
  515. int16 PacketType;
  516. uint32 GID;
  517. int32 HP;
  518. int32 MaxHP;
  519. } __attribute__((packed));
  520. struct packet_sc_notick {
  521. int16 PacketType;
  522. int16 index;
  523. uint32 AID;
  524. uint8 state;
  525. } __attribute__((packed));
  526. struct packet_additem {
  527. int16 PacketType;
  528. uint16 Index;
  529. uint16 count;
  530. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  531. uint32 nameid;
  532. #else
  533. uint16 nameid;
  534. #endif
  535. uint8 IsIdentified;
  536. uint8 IsDamaged;
  537. uint8 refiningLevel;
  538. struct EQUIPSLOTINFO slot;
  539. #if PACKETVER >= 20120925
  540. uint32 location;
  541. #else
  542. uint16 location;
  543. #endif
  544. uint8 type;
  545. uint8 result;
  546. #if PACKETVER >= 20061218
  547. int32 HireExpireDate;
  548. #endif
  549. #if PACKETVER >= 20071002
  550. uint16 bindOnEquipType;
  551. #endif
  552. #if PACKETVER >= 20150226
  553. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  554. #endif
  555. #if PACKETVER >= 20160921
  556. uint8 favorite;
  557. uint16 look;
  558. #endif
  559. } __attribute__((packed));
  560. struct packet_dropflooritem {
  561. int16 PacketType;
  562. uint32 ITAID;
  563. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  564. uint32 ITID;
  565. #else
  566. uint16 ITID;
  567. #endif
  568. #if PACKETVER >= 20130000 /* not sure date */
  569. uint16 type;
  570. #endif
  571. uint8 IsIdentified;
  572. int16 xPos;
  573. int16 yPos;
  574. uint8 subX;
  575. uint8 subY;
  576. int16 count;
  577. #if defined(PACKETVER_ZERO) || PACKETVER >= 20180418
  578. int8 showdropeffect;
  579. int16 dropeffectmode;
  580. #endif
  581. } __attribute__((packed));
  582. struct packet_idle_unit2 {
  583. #if PACKETVER < 20091103
  584. int16 PacketType;
  585. #if PACKETVER >= 20071106
  586. uint8 objecttype;
  587. #endif
  588. uint32 GID;
  589. int16 speed;
  590. int16 bodyState;
  591. int16 healthState;
  592. int16 effectState;
  593. int16 job;
  594. uint16 head;
  595. uint16 weapon;
  596. uint16 accessory;
  597. uint16 shield;
  598. uint16 accessory2;
  599. uint16 accessory3;
  600. int16 headpalette;
  601. int16 bodypalette;
  602. int16 headDir;
  603. uint32 GUID;
  604. int16 GEmblemVer;
  605. int16 honor;
  606. int16 virtue;
  607. uint8 isPKModeON;
  608. uint8 sex;
  609. uint8 PosDir[3];
  610. uint8 xSize;
  611. uint8 ySize;
  612. uint8 state;
  613. int16 clevel;
  614. #else // ! PACKETVER < 20091103
  615. UNAVAILABLE_STRUCT;
  616. #endif // PACKETVER < 20091103
  617. } __attribute__((packed));
  618. struct packet_spawn_unit2 {
  619. #if PACKETVER < 20091103
  620. int16 PacketType;
  621. #if PACKETVER >= 20071106
  622. uint8 objecttype;
  623. #endif
  624. uint32 GID;
  625. int16 speed;
  626. int16 bodyState;
  627. int16 healthState;
  628. int16 effectState;
  629. uint16 head;
  630. uint16 weapon;
  631. uint16 accessory;
  632. int16 job;
  633. uint16 shield;
  634. uint16 accessory2;
  635. uint16 accessory3;
  636. int16 headpalette;
  637. int16 bodypalette;
  638. int16 headDir;
  639. uint8 isPKModeON;
  640. uint8 sex;
  641. uint8 PosDir[3];
  642. uint8 xSize;
  643. uint8 ySize;
  644. #else // ! PACKETVER < 20091103
  645. UNAVAILABLE_STRUCT;
  646. #endif // PACKETVER < 20091103
  647. } __attribute__((packed));
  648. struct packet_spawn_unit {
  649. int16 PacketType;
  650. #if PACKETVER >= 20091103
  651. int16 PacketLength;
  652. uint8 objecttype;
  653. #endif
  654. #if PACKETVER >= 20131223
  655. uint32 AID;
  656. #endif
  657. uint32 GID;
  658. int16 speed;
  659. int16 bodyState;
  660. int16 healthState;
  661. #if PACKETVER < 20080102
  662. int16 effectState;
  663. #else
  664. int32 effectState;
  665. #endif
  666. int16 job;
  667. uint16 head;
  668. #if PACKETVER < 7
  669. uint16 weapon;
  670. #else
  671. uint32 weapon;
  672. #endif
  673. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  674. uint32 shield;
  675. #endif
  676. uint16 accessory;
  677. #if PACKETVER < 7
  678. uint16 shield;
  679. #endif
  680. uint16 accessory2;
  681. uint16 accessory3;
  682. int16 headpalette;
  683. int16 bodypalette;
  684. int16 headDir;
  685. #if PACKETVER >= 20101124
  686. uint16 robe;
  687. #endif
  688. uint32 GUID;
  689. int16 GEmblemVer;
  690. int16 honor;
  691. #if PACKETVER > 7
  692. int32 virtue;
  693. #else
  694. int16 virtue;
  695. #endif
  696. uint8 isPKModeON;
  697. uint8 sex;
  698. uint8 PosDir[3];
  699. uint8 xSize;
  700. uint8 ySize;
  701. int16 clevel;
  702. #if PACKETVER >= 20080102
  703. int16 font;
  704. #endif
  705. #if PACKETVER >= 20120221
  706. int32 maxHP;
  707. int32 HP;
  708. uint8 isBoss;
  709. #endif
  710. #if PACKETVER >= 20150513
  711. int16 body;
  712. #endif
  713. /* Might be earlier, this is when the named item bug began */
  714. #if PACKETVER >= 20131223
  715. char name[NAME_LENGTH];
  716. #endif
  717. } __attribute__((packed));
  718. struct packet_unit_walking {
  719. int16 PacketType;
  720. #if PACKETVER >= 20091103
  721. int16 PacketLength;
  722. #endif
  723. #if PACKETVER >= 20071106
  724. uint8 objecttype;
  725. #endif
  726. #if PACKETVER >= 20131223
  727. uint32 AID;
  728. #endif
  729. uint32 GID;
  730. int16 speed;
  731. int16 bodyState;
  732. int16 healthState;
  733. #if PACKETVER < 7
  734. int16 effectState;
  735. #else
  736. int32 effectState;
  737. #endif
  738. int16 job;
  739. uint16 head;
  740. #if PACKETVER < 7
  741. uint16 weapon;
  742. #else
  743. uint32 weapon;
  744. #endif
  745. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  746. uint32 shield;
  747. #endif
  748. uint16 accessory;
  749. uint32 moveStartTime;
  750. #if PACKETVER < 7
  751. uint16 shield;
  752. #endif
  753. uint16 accessory2;
  754. uint16 accessory3;
  755. int16 headpalette;
  756. int16 bodypalette;
  757. int16 headDir;
  758. #if PACKETVER >= 20101124
  759. uint16 robe;
  760. #endif
  761. uint32 GUID;
  762. int16 GEmblemVer;
  763. int16 honor;
  764. #if PACKETVER > 7
  765. int32 virtue;
  766. #else
  767. int16 virtue;
  768. #endif
  769. uint8 isPKModeON;
  770. uint8 sex;
  771. uint8 MoveData[6];
  772. uint8 xSize;
  773. uint8 ySize;
  774. int16 clevel;
  775. #if PACKETVER >= 20080102
  776. int16 font;
  777. #endif
  778. #if PACKETVER >= 20120221
  779. int32 maxHP;
  780. int32 HP;
  781. uint8 isBoss;
  782. #endif
  783. #if PACKETVER >= 20150513
  784. uint16 body;
  785. #endif
  786. /* Might be earlier, this is when the named item bug began */
  787. #if PACKETVER >= 20131223
  788. char name[NAME_LENGTH];
  789. #endif
  790. } __attribute__((packed));
  791. struct packet_idle_unit {
  792. int16 PacketType;
  793. #if PACKETVER >= 20091103
  794. int16 PacketLength;
  795. uint8 objecttype;
  796. #endif
  797. #if PACKETVER >= 20131223
  798. uint32 AID;
  799. #endif
  800. uint32 GID;
  801. int16 speed;
  802. int16 bodyState;
  803. int16 healthState;
  804. #if PACKETVER < 20080102
  805. int16 effectState;
  806. #else
  807. int32 effectState;
  808. #endif
  809. int16 job;
  810. uint16 head;
  811. #if PACKETVER < 7
  812. uint16 weapon;
  813. #else
  814. uint32 weapon;
  815. #endif
  816. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  817. uint32 shield;
  818. #endif
  819. uint16 accessory;
  820. #if PACKETVER < 7
  821. uint16 shield;
  822. #endif
  823. uint16 accessory2;
  824. uint16 accessory3;
  825. int16 headpalette;
  826. int16 bodypalette;
  827. int16 headDir;
  828. #if PACKETVER >= 20101124
  829. uint16 robe;
  830. #endif
  831. uint32 GUID;
  832. int16 GEmblemVer;
  833. int16 honor;
  834. #if PACKETVER > 7
  835. int32 virtue;
  836. #else
  837. int16 virtue;
  838. #endif
  839. uint8 isPKModeON;
  840. uint8 sex;
  841. uint8 PosDir[3];
  842. uint8 xSize;
  843. uint8 ySize;
  844. uint8 state;
  845. int16 clevel;
  846. #if PACKETVER >= 20080102
  847. int16 font;
  848. #endif
  849. #if PACKETVER >= 20120221
  850. int32 maxHP;
  851. int32 HP;
  852. uint8 isBoss;
  853. #endif
  854. #if PACKETVER >= 20150513
  855. uint16 body;
  856. #endif
  857. /* Might be earlier, this is when the named item bug began */
  858. #if PACKETVER >= 20131223
  859. char name[NAME_LENGTH];
  860. #endif
  861. } __attribute__((packed));
  862. struct packet_status_change {
  863. int16 PacketType;
  864. int16 index;
  865. uint32 AID;
  866. uint8 state;
  867. #if PACKETVER >= 20120618
  868. uint32 Total;
  869. #endif
  870. #if PACKETVER >= 20090121
  871. uint32 Left;
  872. int32 val1;
  873. int32 val2;
  874. int32 val3;
  875. #endif
  876. } __attribute__((packed));
  877. struct packet_status_change_end {
  878. int16 PacketType;
  879. int16 index;
  880. uint32 AID;
  881. uint8 state;
  882. } __attribute__((packed));
  883. struct packet_status_change2 {
  884. int16 PacketType;
  885. int16 index;
  886. uint32 AID;
  887. uint8 state;
  888. uint32 Left;
  889. int32 val1;
  890. int32 val2;
  891. int32 val3;
  892. } __attribute__((packed));
  893. struct packet_maptypeproperty2 {
  894. int16 PacketType;
  895. int16 type;
  896. struct {
  897. uint32 party : 1; // Show attack cursor on non-party members (PvP)
  898. uint32 guild : 1; // Show attack cursor on non-guild members (GvG)
  899. uint32 siege : 1; // Show emblem over characters' heads when in GvG (WoE castle)
  900. uint32 mineffect : 1; // Automatically enable /mineffect
  901. uint32 nolockon : 1; // TODO: What does this do? (shows attack cursor on non-party members)
  902. uint32 countpk : 1; /// Show the PvP counter
  903. uint32 nopartyformation : 1; /// Prevent party creation/modification
  904. uint32 bg : 1; // TODO: What does this do? Probably related to Battlegrounds, but I'm not sure on the effect
  905. uint32 nocostume : 1; /// Does not show costume sprite.
  906. uint32 usecart : 1; /// Allow opening cart inventory
  907. uint32 summonstarmiracle : 1; // TODO: What does this do? Related to Taekwon Masters, but I have no idea.
  908. uint32 SpareBits : 21; /// Currently ignored, reserved for future updates
  909. } flag;
  910. } __attribute__((packed));
  911. struct packet_bgqueue_ack {
  912. int16 PacketType;
  913. uint8 type;
  914. char bg_name[NAME_LENGTH];
  915. } __attribute__((packed));
  916. struct packet_bgqueue_notice_delete {
  917. int16 PacketType;
  918. uint8 type;
  919. char bg_name[NAME_LENGTH];
  920. } __attribute__((packed));
  921. struct packet_bgqueue_register {
  922. int16 PacketType;
  923. int16 type;
  924. char bg_name[NAME_LENGTH];
  925. } __attribute__((packed));
  926. struct packet_bgqueue_update_info {
  927. int16 PacketType;
  928. char bg_name[NAME_LENGTH];
  929. int32 position;
  930. } __attribute__((packed));
  931. struct packet_bgqueue_checkstate {
  932. int16 PacketType;
  933. char bg_name[NAME_LENGTH];
  934. } __attribute__((packed));
  935. struct packet_bgqueue_revoke_req {
  936. int16 PacketType;
  937. char bg_name[NAME_LENGTH];
  938. } __attribute__((packed));
  939. struct packet_bgqueue_battlebegin_ack {
  940. int16 PacketType;
  941. uint8 result;
  942. char bg_name[NAME_LENGTH];
  943. char game_name[NAME_LENGTH];
  944. } __attribute__((packed));
  945. struct packet_bgqueue_notify_entry {
  946. int16 PacketType;
  947. char name[NAME_LENGTH];
  948. int32 position;
  949. } __attribute__((packed));
  950. struct packet_bgqueue_battlebegins {
  951. int16 PacketType;
  952. char bg_name[NAME_LENGTH];
  953. char game_name[NAME_LENGTH];
  954. } __attribute__((packed));
  955. struct packet_script_clear {
  956. int16 PacketType;
  957. uint32 NpcID;
  958. } __attribute__((packed));
  959. /* made possible thanks to Yommy!! */
  960. struct packet_package_item_announce {
  961. int16 PacketType;
  962. int16 PacketLength;
  963. uint8 type;
  964. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  965. uint32 ItemID;
  966. #else
  967. uint16 ItemID;
  968. #endif
  969. int8 len;
  970. char Name[NAME_LENGTH];
  971. int8 unknown; // probably unused
  972. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  973. uint32 BoxItemID;
  974. #else
  975. uint16 BoxItemID;
  976. #endif
  977. } __attribute__((packed));
  978. /* made possible thanks to Yommy!! */
  979. struct packet_item_drop_announce {
  980. int16 PacketType;
  981. int16 PacketLength;
  982. uint8 type;
  983. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  984. uint32 ItemID;
  985. #else
  986. uint16 ItemID;
  987. #endif
  988. int8 len;
  989. char Name[NAME_LENGTH];
  990. char monsterNameLen;
  991. char monsterName[NAME_LENGTH];
  992. } __attribute__((packed));
  993. struct packet_cart_additem_ack {
  994. int16 PacketType;
  995. int8 result;
  996. } __attribute__((packed));
  997. struct packet_banking_check {
  998. int16 PacketType;
  999. int64 Money;
  1000. int16 Reason;
  1001. } __attribute__((packed));
  1002. struct packet_banking_deposit_req {
  1003. int16 PacketType;
  1004. uint32 AID;
  1005. int32 Money;
  1006. } __attribute__((packed));
  1007. struct packet_banking_withdraw_req {
  1008. int16 PacketType;
  1009. uint32 AID;
  1010. int32 Money;
  1011. } __attribute__((packed));
  1012. struct packet_banking_deposit_ack {
  1013. int16 PacketType;
  1014. int16 Reason;
  1015. int64 Money;
  1016. int32 Balance;
  1017. } __attribute__((packed));
  1018. struct packet_banking_withdraw_ack {
  1019. int16 PacketType;
  1020. int16 Reason;
  1021. int64 Money;
  1022. int32 Balance;
  1023. } __attribute__((packed));
  1024. /* Roulette System [Yommy/Hercules] */
  1025. struct packet_roulette_open_ack {
  1026. int16 PacketType;
  1027. int8 Result;
  1028. int32 Serial;
  1029. int8 Step;
  1030. int8 Idx;
  1031. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1032. uint32 AdditionItemID;
  1033. #else
  1034. uint16 AdditionItemID;
  1035. #endif
  1036. int32 GoldPoint;
  1037. int32 SilverPoint;
  1038. int32 BronzePoint;
  1039. } __attribute__((packed));
  1040. struct packet_roulette_info_ack {
  1041. int16 PacketType;
  1042. int16 PacketLength;
  1043. uint32 RouletteSerial;
  1044. struct {
  1045. uint16 Row;
  1046. uint16 Position;
  1047. #if PACKETVER >= 20180511
  1048. uint32 ItemId;
  1049. uint16 Count;
  1050. uint16 unused;
  1051. #else
  1052. uint16 ItemId;
  1053. uint16 Count;
  1054. #endif
  1055. } ItemInfo[42];
  1056. } __attribute__((packed));
  1057. struct packet_roulette_close_ack {
  1058. int16 PacketType;
  1059. uint8 Result;
  1060. } __attribute__((packed));
  1061. struct packet_roulette_generate_ack {
  1062. int16 PacketType;
  1063. uint8 Result;
  1064. uint16 Step;
  1065. uint16 Idx;
  1066. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1067. uint32 AdditionItemID;
  1068. #else
  1069. uint16 AdditionItemID;
  1070. #endif
  1071. int32 RemainGold;
  1072. int32 RemainSilver;
  1073. int32 RemainBronze;
  1074. } __attribute__((packed));
  1075. struct packet_roulette_itemrecv_req {
  1076. int16 PacketType;
  1077. uint8 Condition;
  1078. } __attribute__((packed));
  1079. struct packet_roulette_itemrecv_ack {
  1080. int16 PacketType;
  1081. uint8 Result;
  1082. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1083. uint32 AdditionItemID;
  1084. #else
  1085. uint16 AdditionItemID;
  1086. #endif
  1087. } __attribute__((packed));
  1088. struct packet_itemlist_normal {
  1089. int16 PacketType;
  1090. int16 PacketLength;
  1091. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1092. uint8 invType;
  1093. #endif
  1094. struct NORMALITEM_INFO list[MAX_ITEMLIST];
  1095. } __attribute__((packed));
  1096. struct packet_itemlist_equip {
  1097. int16 PacketType;
  1098. int16 PacketLength;
  1099. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1100. uint8 invType;
  1101. #endif
  1102. struct EQUIPITEM_INFO list[MAX_ITEMLIST];
  1103. } __attribute__((packed));
  1104. struct ZC_STORE_ITEMLIST_NORMAL {
  1105. int16 PacketType;
  1106. int16 PacketLength;
  1107. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1108. uint8 invType;
  1109. #endif
  1110. #if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002
  1111. char name[NAME_LENGTH];
  1112. #endif
  1113. struct NORMALITEM_INFO list[MAX_ITEMLIST];
  1114. } __attribute__((packed));
  1115. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1116. struct PACKET_ZC_INVENTORY_START {
  1117. int16 packetType;
  1118. #if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1119. int16 packetLength;
  1120. #endif
  1121. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1122. uint8 invType;
  1123. #endif
  1124. #if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1125. char name[];
  1126. #else
  1127. char name[NAME_LENGTH];
  1128. #endif
  1129. } __attribute__((packed));
  1130. DEFINE_PACKET_HEADER(ZC_INVENTORY_START, 0x0b08);
  1131. #endif // PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1132. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1133. struct PACKET_ZC_INVENTORY_END {
  1134. int16 packetType;
  1135. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1136. uint8 invType;
  1137. #endif
  1138. char flag;
  1139. } __attribute__((packed));
  1140. DEFINE_PACKET_HEADER(ZC_INVENTORY_END, 0x0b0b);
  1141. #endif // PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1142. struct ZC_STORE_ITEMLIST_EQUIP {
  1143. int16 PacketType;
  1144. int16 PacketLength;
  1145. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1146. uint8 invType;
  1147. #endif
  1148. #if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002
  1149. char name[NAME_LENGTH];
  1150. #endif
  1151. struct EQUIPITEM_INFO list[MAX_ITEMLIST];
  1152. } __attribute__((packed));
  1153. struct packet_equip_item {
  1154. int16 PacketType;
  1155. uint16 index;
  1156. #if PACKETVER >= 20120925
  1157. uint32 wearLocation;
  1158. #else
  1159. uint16 wearLocation;
  1160. #endif
  1161. } __attribute__((packed));
  1162. struct packet_equipitem_ack {
  1163. int16 PacketType;
  1164. uint16 index;
  1165. #if PACKETVER >= 20120925
  1166. uint32 wearLocation;
  1167. #else
  1168. uint16 wearLocation;
  1169. #endif
  1170. #if PACKETVER >= 20100629
  1171. uint16 wItemSpriteNumber;
  1172. #endif
  1173. uint8 result;
  1174. } __attribute__((packed));
  1175. struct packet_unequipitem_ack {
  1176. int16 PacketType;
  1177. uint16 index;
  1178. #if PACKETVER >= 20120925
  1179. uint32 wearLocation;
  1180. #else
  1181. uint16 wearLocation;
  1182. #endif
  1183. uint8 result;
  1184. } __attribute__((packed));
  1185. struct packet_viewequip_ack {
  1186. int16 PacketType;
  1187. int16 PacketLength;
  1188. char characterName[NAME_LENGTH];
  1189. int16 job;
  1190. int16 head;
  1191. int16 accessory;
  1192. int16 accessory2;
  1193. int16 accessory3;
  1194. #if PACKETVER >= 20101124
  1195. int16 robe;
  1196. #endif
  1197. int16 headpalette;
  1198. int16 bodypalette;
  1199. #if PACKETVER_MAIN_NUM >= 20180801 || PACKETVER_RE_NUM >= 20180801 || PACKETVER_ZERO_NUM >= 20180808
  1200. int16 body2;
  1201. #endif
  1202. uint8 sex;
  1203. // [4144] need remove MAX_INVENTORY from here
  1204. struct EQUIPITEM_INFO list[MAX_INVENTORY];
  1205. } __attribute__((packed));
  1206. struct packet_notify_bounditem {
  1207. int16 PacketType;
  1208. uint16 index;
  1209. } __attribute__((packed));
  1210. struct packet_skill_entry {
  1211. int16 PacketType;
  1212. #if PACKETVER >= 20110718
  1213. int16 PacketLength;
  1214. #endif
  1215. uint32 AID;
  1216. uint32 creatorAID;
  1217. int16 xPos;
  1218. int16 yPos;
  1219. #if PACKETVER >= 20121212
  1220. int32 job;
  1221. #else
  1222. uint8 job;
  1223. #endif
  1224. #if PACKETVER >= 20110718
  1225. int8 RadiusRange;
  1226. #endif
  1227. uint8 isVisible;
  1228. #if PACKETVER >= 20130731
  1229. uint8 level;
  1230. #endif
  1231. } __attribute__((packed));
  1232. struct packet_graffiti_entry {
  1233. int16 PacketType;
  1234. uint32 AID;
  1235. uint32 creatorAID;
  1236. int16 xPos;
  1237. int16 yPos;
  1238. uint8 job;
  1239. uint8 isVisible;
  1240. uint8 isContens;
  1241. char msg[80];
  1242. } __attribute__((packed));
  1243. struct packet_damage {
  1244. int16 PacketType;
  1245. uint32 GID;
  1246. uint32 targetGID;
  1247. uint32 startTime;
  1248. int32 attackMT;
  1249. int32 attackedMT;
  1250. #if PACKETVER < 20071113
  1251. int16 damage;
  1252. #else
  1253. int32 damage;
  1254. #endif
  1255. #if PACKETVER >= 20131223
  1256. uint8 is_sp_damaged;
  1257. #endif
  1258. int16 count;
  1259. uint8 action;
  1260. #if PACKETVER < 20071113
  1261. int16 leftDamage;
  1262. #else
  1263. int32 leftDamage;
  1264. #endif
  1265. } __attribute__((packed));
  1266. struct packet_gm_monster_item {
  1267. int16 PacketType;
  1268. #if PACKETVER >= 20131218
  1269. char str[100];
  1270. #else
  1271. char str[24];
  1272. #endif
  1273. } __attribute__((packed));
  1274. struct packet_npc_market_purchase_sub {
  1275. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1276. uint32 ITID;
  1277. #else
  1278. uint16 ITID;
  1279. #endif
  1280. int32 qty;
  1281. } __attribute__((packed));
  1282. struct packet_npc_market_purchase {
  1283. int16 PacketType;
  1284. int16 PacketLength;
  1285. struct packet_npc_market_purchase_sub list[];
  1286. } __attribute__((packed));
  1287. #if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
  1288. /* inner struct figured by Ind after some annoying hour of debugging (data Thanks to Yommy) */
  1289. struct PACKET_ZC_NPC_MARKET_OPEN_sub {
  1290. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1291. uint32 nameid;
  1292. #else
  1293. uint16 nameid;
  1294. #endif
  1295. uint8 type;
  1296. uint32 price;
  1297. uint32 qty;
  1298. uint16 weight;
  1299. } __attribute__((packed));
  1300. struct PACKET_ZC_NPC_MARKET_OPEN {
  1301. int16 packetType;
  1302. int16 packetLength;
  1303. struct PACKET_ZC_NPC_MARKET_OPEN_sub list[];
  1304. } __attribute__((packed));
  1305. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_OPEN, 0x09d5);
  1306. #endif
  1307. struct packet_wis_end {
  1308. int16 PacketType;
  1309. int8 result;
  1310. #if PACKETVER >= 20131223
  1311. uint32 AID;
  1312. #endif
  1313. } __attribute__((packed));
  1314. struct packet_party_leader_changed {
  1315. int16 PacketType;
  1316. uint32 prev_leader_aid;
  1317. uint32 new_leader_aid;
  1318. } __attribute__((packed));
  1319. #ifdef HOTKEY_SAVING
  1320. struct hotkey_data {
  1321. int8 isSkill; // 0: Item, 1:Skill
  1322. uint32 id; // Item/Skill ID
  1323. int16 count; // Item Quantity/Skill Level
  1324. } __attribute__((packed));
  1325. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
  1326. #define MAX_HOTKEYS_PACKET 38
  1327. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1328. int16 packetType;
  1329. int8 rotate;
  1330. int16 tab;
  1331. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1332. } __attribute__((packed));
  1333. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x0b20);
  1334. #elif PACKETVER_MAIN_NUM >= 20141022 || PACKETVER_RE_NUM >= 20141015 || defined(PACKETVER_ZERO)
  1335. #define MAX_HOTKEYS_PACKET 38
  1336. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1337. int16 packetType;
  1338. int8 rotate;
  1339. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1340. } __attribute__((packed));
  1341. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x0a00);
  1342. #elif PACKETVER_MAIN_NUM >= 20090617 || PACKETVER_RE_NUM >= 20090617 || PACKETVER_SAK_NUM >= 20090617
  1343. #define MAX_HOTKEYS_PACKET 38
  1344. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1345. int16 packetType;
  1346. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1347. } __attribute__((packed));
  1348. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x07d9);
  1349. #elif PACKETVER_MAIN_NUM >= 20090603 || PACKETVER_RE_NUM >= 20090603 || PACKETVER_SAK_NUM >= 20090603
  1350. #define MAX_HOTKEYS_PACKET 36
  1351. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1352. int16 packetType;
  1353. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1354. } __attribute__((packed));
  1355. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x07d9);
  1356. #elif PACKETVER_MAIN_NUM >= 20070711 || PACKETVER_RE_NUM >= 20080827 || PACKETVER_AD_NUM >= 20070711 || PACKETVER_SAK_NUM >= 20070628
  1357. #define MAX_HOTKEYS_PACKET 27
  1358. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1359. int16 packetType;
  1360. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1361. } __attribute__((packed));
  1362. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x02b9);
  1363. #endif
  1364. #if PACKETVER_MAIN_NUM >= 20070618 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_AD_NUM >= 20070618 || PACKETVER_SAK_NUM >= 20070618
  1365. struct PACKET_CZ_SHORTCUT_KEY_CHANGE1 {
  1366. int16 packetType;
  1367. uint16 index;
  1368. struct hotkey_data hotkey;
  1369. } __attribute__((packed));
  1370. DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE1, 0x02ba);
  1371. #endif
  1372. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
  1373. struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 {
  1374. int16 packetType;
  1375. uint16 tab;
  1376. uint16 index;
  1377. struct hotkey_data hotkey;
  1378. } __attribute__((packed));
  1379. DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE2, 0x0b21);
  1380. #endif
  1381. #if PACKETVER_MAIN_NUM >= 20140129 || PACKETVER_RE_NUM >= 20140129 || defined(PACKETVER_ZERO)
  1382. struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE1 {
  1383. int16 packetType;
  1384. uint8 rowshift;
  1385. } __attribute__((packed));
  1386. DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE1, 0x0a01);
  1387. #endif
  1388. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
  1389. struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 {
  1390. int16 packetType;
  1391. uint16 tab;
  1392. uint8 rowshift;
  1393. } __attribute__((packed));
  1394. DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE2, 0x0b22);
  1395. #endif
  1396. #endif // HOTKEY_SAVING
  1397. /**
  1398. * MISSION_HUNT_INFO (PACKETVER >= 20141022)
  1399. * MISSION_HUNT_INFO_EX (PACKETVER >= 20150513)
  1400. */
  1401. struct packet_mission_info_sub {
  1402. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  1403. uint32 huntIdent;
  1404. uint32 huntIdent2;
  1405. uint32 mobType;
  1406. #elif PACKETVER >= 20150513
  1407. uint32 huntIdent;
  1408. uint32 mobType;
  1409. #endif
  1410. uint32 mob_id;
  1411. #if PACKETVER >= 20150513
  1412. int16 levelMin;
  1413. int16 levelMax;
  1414. #endif
  1415. int16 huntCount;
  1416. int16 maxCount;
  1417. char mobName[NAME_LENGTH];
  1418. } __attribute__((packed));
  1419. /**
  1420. * PACKET_ZC_ALL_QUEST_LIST2_INFO (PACKETVER >= 20141022)
  1421. * PACKET_ZC_ALL_QUEST_LIST3_INFO (PACKETVER >= 20150513)
  1422. */
  1423. struct packet_quest_list_info {
  1424. int32 questID;
  1425. int8 active;
  1426. #if PACKETVER >= 20141022
  1427. int32 quest_svrTime;
  1428. int32 quest_endTime;
  1429. int16 hunting_count;
  1430. struct packet_mission_info_sub objectives[]; // Note: This will be < MAX_QUEST_OBJECTIVES
  1431. #endif // PACKETVER >= 20141022
  1432. } __attribute__((packed));
  1433. /**
  1434. * Header for:
  1435. * PACKET_ZC_ALL_QUEST_LIST (PACKETVER < 20141022)
  1436. * PACKET_ZC_ALL_QUEST_LIST2 (PACKETVER >= 20141022)
  1437. * PACKET_ZC_ALL_QUEST_LIST3 (PACKETVER >= 20150513)
  1438. *
  1439. * @remark
  1440. * Contains (is followed by) a variable-length array of packet_quest_list_info
  1441. */
  1442. struct packet_quest_list_header {
  1443. uint16 PacketType;
  1444. uint16 PacketLength;
  1445. int32 questCount;
  1446. //struct packet_quest_list_info list[]; // Variable-length
  1447. } __attribute__((packed));
  1448. struct packet_chat_message {
  1449. uint16 packet_id;
  1450. int16 packet_len;
  1451. char message[];
  1452. } __attribute__((packed));
  1453. struct packet_whisper_message {
  1454. uint16 packet_id;
  1455. int16 packet_len;
  1456. char name[NAME_LENGTH];
  1457. char message[];
  1458. } __attribute__((packed));
  1459. /* RoDEX */
  1460. struct PACKET_CZ_ADD_ITEM_TO_MAIL {
  1461. int16 PacketType;
  1462. int16 index;
  1463. int16 count;
  1464. } __attribute__((packed));
  1465. struct PACKET_ZC_ADD_ITEM_TO_MAIL {
  1466. int16 PacketType;
  1467. int8 result;
  1468. int16 index;
  1469. int16 count;
  1470. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1471. uint32 itemId;
  1472. #else
  1473. uint16 itemId;
  1474. #endif
  1475. int8 type;
  1476. int8 IsIdentified;
  1477. int8 IsDamaged;
  1478. int8 refiningLevel;
  1479. struct EQUIPSLOTINFO slot;
  1480. struct ItemOptions optionData[MAX_ITEM_OPTIONS];
  1481. int16 weight;
  1482. uint8 favorite;
  1483. uint32 location;
  1484. } __attribute__((packed));
  1485. struct mail_item {
  1486. int16 count;
  1487. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1488. uint32 ITID;
  1489. #else
  1490. uint16 ITID;
  1491. #endif
  1492. int8 IsIdentified;
  1493. int8 IsDamaged;
  1494. int8 refiningLevel;
  1495. struct EQUIPSLOTINFO slot;
  1496. uint32 location;
  1497. uint8 type;
  1498. uint16 viewSprite;
  1499. uint16 bindOnEquip;
  1500. struct ItemOptions optionData[MAX_ITEM_OPTIONS];
  1501. } __attribute__((packed));
  1502. struct PACKET_CZ_REQ_OPEN_WRITE_MAIL {
  1503. int16 PacketType;
  1504. char receiveName[NAME_LENGTH];
  1505. } __attribute__((packed));
  1506. struct PACKET_ZC_ACK_OPEN_WRITE_MAIL {
  1507. int16 PacketType;
  1508. char receiveName[NAME_LENGTH];
  1509. int8 result;
  1510. } __attribute__((packed));
  1511. struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL {
  1512. int16 PacketType;
  1513. int16 index;
  1514. uint16 cnt;
  1515. } __attribute__((packed));
  1516. struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL {
  1517. int16 PacketType;
  1518. int8 result;
  1519. int16 index;
  1520. uint16 cnt;
  1521. int16 weight;
  1522. } __attribute__((packed));
  1523. struct PACKET_CZ_SEND_MAIL {
  1524. int16 PacketType;
  1525. int16 PacketLength;
  1526. char receiveName[24];
  1527. char senderName[24];
  1528. int64 zeny;
  1529. int16 Titlelength;
  1530. int16 TextcontentsLength;
  1531. #if PACKETVER > 20160600
  1532. int32 receiver_char_id;
  1533. #endif // PACKETVER > 20160600
  1534. char string[];
  1535. } __attribute__((packed));
  1536. struct PACKET_ZC_WRITE_MAIL_RESULT {
  1537. int16 PacketType;
  1538. int8 result;
  1539. } __attribute__((packed));
  1540. struct PACKET_CZ_CHECKNAME {
  1541. int16 PacketType;
  1542. char Name[24];
  1543. } __attribute__((packed));
  1544. struct PACKET_ZC_CHECKNAME {
  1545. int16 PacketType;
  1546. int32 CharId;
  1547. int16 Class;
  1548. int16 BaseLevel;
  1549. #if PACKETVER >= 20160316
  1550. char Name[24];
  1551. #endif
  1552. } __attribute__((packed));
  1553. struct PACKET_ZC_NOTIFY_UNREADMAIL {
  1554. int16 PacketType;
  1555. char result;
  1556. } __attribute__((packed));
  1557. struct maillistinfo {
  1558. #if PACKETVER >= 20170419
  1559. uint8 openType;
  1560. #endif
  1561. int64 MailID;
  1562. int8 Isread;
  1563. uint8 type;
  1564. char SenderName[24];
  1565. #if PACKETVER < 20170419
  1566. int32 regDateTime;
  1567. #endif
  1568. int32 expireDateTime;
  1569. int16 Titlelength;
  1570. char title[];
  1571. } __attribute__((packed));
  1572. struct PACKET_ZC_MAIL_LIST {
  1573. int16 PacketType;
  1574. int16 PacketLength;
  1575. #if PACKETVER < 20170419
  1576. int8 opentype;
  1577. int8 cnt;
  1578. #endif
  1579. int8 IsEnd;
  1580. } __attribute__((packed));
  1581. struct PACKET_CZ_REQ_NEXT_MAIL_LIST {
  1582. int16 PacketType;
  1583. int8 opentype;
  1584. int64 Lower_MailID;
  1585. } __attribute__((packed));
  1586. struct PACKET_CZ_REQ_OPEN_MAIL {
  1587. int16 PacketType;
  1588. #if PACKETVER >= 20170419
  1589. int64 char_Upper_MailID;
  1590. int64 return_Upper_MailID;
  1591. int64 account_Upper_MailID;
  1592. #else
  1593. int8 opentype;
  1594. int64 Upper_MailID;
  1595. #endif
  1596. } __attribute__((packed));
  1597. struct PACKET_CZ_REQ_READ_MAIL {
  1598. int16 PacketType;
  1599. int8 opentype;
  1600. int64 MailID;
  1601. } __attribute__((packed));
  1602. struct PACKET_ZC_READ_MAIL {
  1603. int16 PacketType;
  1604. int16 PacketLength;
  1605. int8 opentype;
  1606. int64 MailID;
  1607. int16 TextcontentsLength;
  1608. int64 zeny;
  1609. int8 ItemCnt;
  1610. } __attribute__((packed));
  1611. struct PACKET_CZ_REQ_DELETE_MAIL {
  1612. int16 PacketType;
  1613. int8 opentype;
  1614. int64 MailID;
  1615. } __attribute__((packed));
  1616. struct PACKET_ZC_ACK_DELETE_MAIL {
  1617. int16 PacketType;
  1618. int8 opentype;
  1619. int64 MailID;
  1620. } __attribute__((packed));
  1621. struct PACKET_CZ_REQ_REFRESH_MAIL_LIST {
  1622. int16 PacketType;
  1623. #if PACKETVER >= 20170419
  1624. int64 Upper_MailID;
  1625. int8 unknown[16];
  1626. #else
  1627. int8 opentype;
  1628. int64 Upper_MailID;
  1629. #endif
  1630. } __attribute__((packed));
  1631. struct PACKET_CZ_REQ_ZENY_FROM_MAIL {
  1632. int16 PacketType;
  1633. int64 MailID;
  1634. int8 opentype;
  1635. } __attribute__((packed));
  1636. struct PACKET_ZC_ACK_ZENY_FROM_MAIL {
  1637. int16 PacketType;
  1638. int64 MailID;
  1639. int8 opentype;
  1640. int8 result;
  1641. } __attribute__((packed));
  1642. struct PACKET_CZ_REQ_ITEM_FROM_MAIL {
  1643. int16 PacketType;
  1644. int64 MailID;
  1645. int8 opentype;
  1646. } __attribute__((packed));
  1647. struct PACKET_ZC_ACK_ITEM_FROM_MAIL {
  1648. int16 PacketType;
  1649. int64 MailID;
  1650. int8 opentype;
  1651. int8 result;
  1652. } __attribute__((packed));
  1653. struct PACKET_ZC_SKILL_SCALE {
  1654. int16 PacketType;
  1655. uint32 AID;
  1656. int16 skill_id;
  1657. int16 skill_lv;
  1658. int16 x;
  1659. int16 y;
  1660. uint32 casttime;
  1661. } __attribute__((packed));
  1662. struct ZC_PROGRESS_ACTOR {
  1663. int16 PacketType;
  1664. int32 GID;
  1665. int32 color;
  1666. uint32 time;
  1667. } __attribute__((packed));
  1668. struct PACKET_ZC_ADD_MEMBER_TO_GROUP {
  1669. int16 packetType;
  1670. uint32 AID;
  1671. #if PACKETVER >= 20171207
  1672. uint32 GID;
  1673. #endif
  1674. uint32 leader;
  1675. #if PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
  1676. int16 class_;
  1677. int16 baseLevel;
  1678. #endif
  1679. int16 x;
  1680. int16 y;
  1681. uint8 offline;
  1682. char partyName[NAME_LENGTH];
  1683. char playerName[NAME_LENGTH];
  1684. char mapName[MAP_NAME_LENGTH_EXT];
  1685. int8 sharePickup;
  1686. int8 shareLoot;
  1687. } __attribute__((packed));
  1688. struct PACKET_ZC_GROUP_LIST_SUB {
  1689. uint32 AID;
  1690. #if PACKETVER >= 20171207
  1691. uint32 GID;
  1692. #endif
  1693. char playerName[NAME_LENGTH];
  1694. char mapName[MAP_NAME_LENGTH_EXT];
  1695. uint8 leader;
  1696. uint8 offline;
  1697. #if PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
  1698. int16 class_;
  1699. int16 baseLevel;
  1700. #endif
  1701. } __attribute__((packed));
  1702. struct PACKET_ZC_GROUP_LIST {
  1703. int16 packetType;
  1704. int16 packetLen;
  1705. char partyName[NAME_LENGTH];
  1706. struct PACKET_ZC_GROUP_LIST_SUB members[];
  1707. } __attribute__((packed));
  1708. #if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
  1709. struct PACKET_ZC_CLANINFO {
  1710. int16 PacketType;
  1711. int16 PacketLength;
  1712. uint32 ClanID;
  1713. char ClanName[NAME_LENGTH];
  1714. char MasterName[NAME_LENGTH];
  1715. char Map[MAP_NAME_LENGTH_EXT];
  1716. uint8 AllyCount;
  1717. uint8 AntagonistCount;
  1718. } __attribute__((packed));
  1719. DEFINE_PACKET_HEADER(ZC_CLANINFO, 0x098a);
  1720. #endif
  1721. struct PACKET_ZC_NOTIFY_CLAN_CONNECTINFO {
  1722. int16 PacketType;
  1723. int16 NumConnect;
  1724. int16 NumTotal;
  1725. } __attribute__((packed));
  1726. struct PACKET_ZC_ACK_CLAN_LEAVE {
  1727. int16 PacketType;
  1728. } __attribute__((packed));
  1729. struct PACKET_ZC_NOTIFY_CLAN_CHAT {
  1730. int16 PacketType;
  1731. int16 PacketLength;
  1732. char MemberName[NAME_LENGTH];
  1733. char Message[];
  1734. } __attribute__((packed));
  1735. /**
  1736. * PACKET_ZC_MISSION_HUNT (PACKETVER < 20150513)
  1737. * PACKET_ZC_MISSION_HUNT_EX (PACKETVER >= 20150513)
  1738. */
  1739. struct packet_quest_hunt_sub {
  1740. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  1741. uint32 huntIdent;
  1742. uint32 huntIdent2;
  1743. uint32 mobType;
  1744. #elif PACKETVER >= 20150513
  1745. uint32 huntIdent;
  1746. uint32 mobType;
  1747. #endif
  1748. uint32 mob_id;
  1749. #if PACKETVER >= 20150513
  1750. int16 levelMin;
  1751. int16 levelMax;
  1752. #endif
  1753. int16 huntCount;
  1754. char mobName[NAME_LENGTH];
  1755. } __attribute__((packed));
  1756. /**
  1757. * Header for:
  1758. * PACKET_ZC_ADD_QUEST (PACKETVER < 20150513)
  1759. * PACKET_ZC_ADD_QUEST_EX (PACKETVER >= 20150513)
  1760. */
  1761. struct packet_quest_add_header {
  1762. uint16 PacketType;
  1763. uint32 questID;
  1764. uint8 active;
  1765. int32 quest_svrTime;
  1766. int32 quest_endTime;
  1767. int16 count;
  1768. struct packet_quest_hunt_sub objectives[];
  1769. } __attribute__((packed));
  1770. /**
  1771. * PACKET_MOB_HUNTING (PACKETVER < 20150513)
  1772. * PACKET_MOB_HUNTING_EX (PACKETVER >= 20150513)
  1773. */
  1774. struct packet_quest_update_hunt {
  1775. uint32 questID;
  1776. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  1777. uint32 huntIdent;
  1778. uint32 huntIdent2;
  1779. #elif PACKETVER >= 20150513
  1780. uint32 huntIdent;
  1781. #else
  1782. uint32 mob_id;
  1783. #endif // PACKETVER < 20150513
  1784. int16 maxCount;
  1785. int16 count;
  1786. } __attribute__((packed));
  1787. /**
  1788. * Header for:
  1789. * PACKET_ZC_UPDATE_MISSION_HUNT (PACKETVER < 20150513)
  1790. * PACKET_ZC_UPDATE_MISSION_HUNT_EX (PACKETVER >= 20150513)
  1791. */
  1792. struct packet_quest_update_header {
  1793. uint16 PacketType;
  1794. uint16 PacketLength;
  1795. int16 count;
  1796. struct packet_quest_update_hunt objectives[];
  1797. } __attribute__((packed));
  1798. /**
  1799. * Header for:
  1800. * PACKET_MOB_HUNTING (PACKETVER >= 20150513)
  1801. */
  1802. struct packet_quest_hunt_info_sub {
  1803. uint32 questID;
  1804. uint32 mob_id;
  1805. int16 maxCount;
  1806. int16 count;
  1807. } __attribute__((packed));
  1808. /**
  1809. * Header for:
  1810. * ZC_HUNTING_QUEST_INFO (PACKETVER >= 20150513)
  1811. */
  1812. struct packet_quest_hunt_info {
  1813. uint16 PacketType;
  1814. uint16 PacketLength;
  1815. struct packet_quest_hunt_info_sub info[];
  1816. } __attribute__((packed));
  1817. struct PACKET_ZC_FORMATSTRING_MSG {
  1818. uint16 PacketType;
  1819. uint16 PacketLength;
  1820. uint16 MessageId;
  1821. char MessageString[];
  1822. } __attribute__((packed));
  1823. struct PACKET_ZC_FORMATSTRING_MSG_COLOR {
  1824. uint16 PacketType;
  1825. uint16 PacketLength;
  1826. uint16 messageId;
  1827. #if PACKETVER >= 20160406
  1828. uint32 color;
  1829. #endif
  1830. char messageString[];
  1831. } __attribute__((packed));
  1832. struct PACKET_ZC_MSG_COLOR {
  1833. uint16 PacketType;
  1834. uint16 MessageId;
  1835. uint32 MessageColor;
  1836. } __attribute__((packed));
  1837. struct PACKET_CZ_OPEN_UI {
  1838. int16 PacketType;
  1839. int8 UIType;
  1840. } __attribute__((packed));
  1841. struct PACKET_ZC_OPEN_UI {
  1842. int16 PacketType;
  1843. int8 UIType;
  1844. #if PACKETVER >= 20171122
  1845. int32 data;
  1846. #endif
  1847. } __attribute__((packed));
  1848. struct PACKET_ZC_UI_ACTION {
  1849. int16 PacketType;
  1850. int32 UIType;
  1851. int32 data;
  1852. } __attribute__((packed));
  1853. struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST {
  1854. int16 PacketType;
  1855. char mapName[MAP_NAME_LENGTH_EXT];
  1856. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1857. uint32 ItemID;
  1858. #else
  1859. uint16 ItemID;
  1860. #endif
  1861. } __attribute__((packed));
  1862. struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE {
  1863. int16 PacketType;
  1864. uint32 flag;
  1865. } __attribute__((packed));
  1866. struct PACKET_CZ_REQ_STYLE_CHANGE {
  1867. int16 PacketType;
  1868. int16 HeadPalette;
  1869. int16 HeadStyle;
  1870. int16 BodyPalette;
  1871. int16 TopAccessory;
  1872. int16 MidAccessory;
  1873. int16 BottomAccessory;
  1874. } __attribute__((packed));
  1875. struct PACKET_CZ_REQ_STYLE_CHANGE2 {
  1876. int16 PacketType;
  1877. int16 HeadPalette;
  1878. int16 HeadStyle;
  1879. int16 BodyPalette;
  1880. int16 TopAccessory;
  1881. int16 MidAccessory;
  1882. int16 BottomAccessory;
  1883. int16 BodyStyle;
  1884. } __attribute__((packed));
  1885. struct PACKET_ZC_STYLE_CHANGE_RES {
  1886. int16 PacketType;
  1887. int8 flag;
  1888. } __attribute__((packed));
  1889. struct pet_evolution_items {
  1890. int16 index;
  1891. int16 amount;
  1892. } __attribute__((packed));
  1893. struct PACKET_CZ_PET_EVOLUTION {
  1894. int16 PacketType;
  1895. uint16 PacketLength;
  1896. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1897. uint32 EvolvedPetEggID;
  1898. #else
  1899. uint16 EvolvedPetEggID;
  1900. #endif
  1901. // struct pet_evolution_items items[];
  1902. } __attribute__((packed));
  1903. struct packet_ZC_REFUSE_LOGIN {
  1904. int16 PacketType;
  1905. #if PACKETVER >= 20101123
  1906. uint32 error_code;
  1907. #else
  1908. uint8 error_code;
  1909. #endif
  1910. char block_date[20];
  1911. } __attribute__((packed));
  1912. struct PACKET_ZC_NOTIFY_CHAT {
  1913. int16 PacketType;
  1914. int16 PacketLength;
  1915. uint32 GID;
  1916. char Message[];
  1917. } __attribute__((packed));
  1918. struct PACKET_ZC_NOTIFY_PLAYERCHAT {
  1919. int16 PacketType;
  1920. int16 PacketLength;
  1921. char Message[];
  1922. } __attribute__((packed));
  1923. struct PACKET_ZC_ITEM_ENTRY {
  1924. int16 packetType;
  1925. uint32 AID;
  1926. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1927. uint32 itemId;
  1928. #else
  1929. uint16 itemId;
  1930. #endif
  1931. uint8 identify;
  1932. uint16 x;
  1933. uint16 y;
  1934. uint16 amount;
  1935. uint8 subX;
  1936. uint8 subY;
  1937. } __attribute__((packed));
  1938. struct PACKET_ZC_ADD_ITEM_TO_STORE {
  1939. int16 packetType;
  1940. int16 index;
  1941. int32 amount;
  1942. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1943. uint32 itemId;
  1944. #else
  1945. uint16 itemId;
  1946. #endif
  1947. #if PACKETVER >= 5
  1948. uint8 itemType;
  1949. #endif
  1950. uint8 identified;
  1951. uint8 damaged;
  1952. uint8 refine;
  1953. struct EQUIPSLOTINFO slot;
  1954. #if PACKETVER >= 20150226
  1955. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  1956. #endif
  1957. } __attribute__((packed));
  1958. struct PACKET_ZC_MVP_GETTING_ITEM {
  1959. int16 packetType;
  1960. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1961. uint32 itemId;
  1962. #else
  1963. uint16 itemId;
  1964. #endif
  1965. } __attribute__((packed));
  1966. struct PACKET_ZC_ACK_TOUSESKILL {
  1967. int16 packetType;
  1968. uint16 skillId;
  1969. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1970. int32 btype;
  1971. uint32 itemId;
  1972. #else
  1973. int16 btype;
  1974. uint16 itemId;
  1975. #endif
  1976. uint8 flag;
  1977. uint8 cause;
  1978. } __attribute__((packed));
  1979. struct PACKET_ZC_ADD_ITEM_TO_CART {
  1980. int16 packetType;
  1981. int16 index;
  1982. int32 amount;
  1983. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1984. uint32 itemId;
  1985. #else
  1986. uint16 itemId;
  1987. #endif
  1988. #if PACKETVER >= 5
  1989. uint8 itemType;
  1990. #endif
  1991. uint8 identified;
  1992. uint8 damaged;
  1993. uint8 refine;
  1994. struct EQUIPSLOTINFO slot;
  1995. #if PACKETVER >= 20150226
  1996. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  1997. #endif
  1998. } __attribute__((packed));
  1999. struct PACKET_CZ_REQMAKINGITEM {
  2000. int16 packetType;
  2001. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2002. uint32 itemId;
  2003. uint32 material[3];
  2004. #else
  2005. uint16 itemId;
  2006. uint16 material[3];
  2007. #endif
  2008. } __attribute__((packed));
  2009. struct PACKET_ZC_ACK_REQMAKINGITEM {
  2010. int16 packetType;
  2011. int16 result;
  2012. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2013. uint32 itemId;
  2014. #else
  2015. uint16 itemId;
  2016. #endif
  2017. } __attribute__((packed));
  2018. struct PACKET_ZC_FEED_PET {
  2019. int16 packetType;
  2020. uint8 result;
  2021. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2022. uint32 itemId;
  2023. #else
  2024. uint16 itemId;
  2025. #endif
  2026. } __attribute__((packed));
  2027. struct PACKET_ZC_FEED_MER {
  2028. int16 packetType;
  2029. uint8 result;
  2030. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2031. uint32 itemId;
  2032. #else
  2033. uint16 itemId;
  2034. #endif
  2035. } __attribute__((packed));
  2036. struct PACKET_ZC_USE_ITEM_ACK {
  2037. int16 packetType;
  2038. int16 index;
  2039. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2040. uint32 itemId;
  2041. uint32 AID;
  2042. #elif PACKETVER >= 3
  2043. uint16 itemId;
  2044. uint32 AID;
  2045. #endif
  2046. int16 amount;
  2047. uint8 result;
  2048. } __attribute__((packed));
  2049. struct PACKET_ZC_SPRITE_CHANGE {
  2050. int16 packetType;
  2051. uint32 AID;
  2052. uint8 type;
  2053. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2054. uint32 val;
  2055. uint32 val2;
  2056. #elif PACKETVER >= 4
  2057. uint16 val;
  2058. uint16 val2;
  2059. #else
  2060. uint8 val;
  2061. #endif
  2062. } __attribute__((packed));
  2063. struct PACKET_ZC_ADD_EXCHANGE_ITEM {
  2064. int16 packetType;
  2065. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2066. uint32 itemId;
  2067. uint8 itemType;
  2068. int32 amount;
  2069. #elif PACKETVER >= 20100223
  2070. uint16 itemId;
  2071. uint8 itemType;
  2072. int32 amount;
  2073. #else
  2074. int32 amount;
  2075. uint16 itemId;
  2076. #endif
  2077. uint8 identified;
  2078. uint8 damaged;
  2079. uint8 refine;
  2080. struct EQUIPSLOTINFO slot;
  2081. #if PACKETVER >= 20150226
  2082. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2083. #endif
  2084. } __attribute__((packed));
  2085. struct PACKET_ZC_CASH_TIME_COUNTER {
  2086. int16 packetType;
  2087. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2088. uint32 itemId;
  2089. #else
  2090. uint16 itemId;
  2091. #endif
  2092. uint32 seconds;
  2093. } __attribute__((packed));
  2094. struct PACKET_ZC_CASH_ITEM_DELETE {
  2095. int16 packetType;
  2096. uint16 index;
  2097. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2098. uint32 itemId;
  2099. #else
  2100. uint16 itemId;
  2101. #endif
  2102. } __attribute__((packed));
  2103. struct PACKET_ZC_ITEM_PICKUP_PARTY {
  2104. int16 packetType;
  2105. uint32 AID;
  2106. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2107. uint32 itemId;
  2108. #else
  2109. uint16 itemId;
  2110. #endif
  2111. uint8 identified;
  2112. uint8 damaged;
  2113. uint8 refine;
  2114. struct EQUIPSLOTINFO slot;
  2115. uint16 location;
  2116. uint8 itemType;
  2117. } __attribute__((packed));
  2118. struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE {
  2119. int16 packetType;
  2120. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2121. uint32 itemId;
  2122. #else
  2123. uint16 itemId;
  2124. #endif
  2125. uint16 amount;
  2126. #if PACKETVER >= 20141016
  2127. uint32 zeny;
  2128. uint32 zenyLimit;
  2129. uint32 charId;
  2130. uint32 updateTime;
  2131. #else
  2132. uint32 zenyLimit;
  2133. #endif
  2134. } __attribute__((packed));
  2135. struct PACKET_ZC_ACK_WEAPONREFINE {
  2136. int16 packetType;
  2137. int32 result;
  2138. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2139. uint32 itemId;
  2140. #else
  2141. uint16 itemId;
  2142. #endif
  2143. } __attribute__((packed));
  2144. #if PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626
  2145. // PACKET_ZC_PROPERTY_HOMUN3
  2146. struct PACKET_ZC_PROPERTY_HOMUN {
  2147. int16 packetType;
  2148. char name[NAME_LENGTH];
  2149. // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
  2150. uint8 flags;
  2151. uint16 level;
  2152. uint16 hunger;
  2153. uint16 intimacy;
  2154. uint16 atk2;
  2155. uint16 matk;
  2156. uint16 hit;
  2157. uint16 crit;
  2158. uint16 def;
  2159. uint16 mdef;
  2160. uint16 flee;
  2161. uint16 amotion;
  2162. uint32 hp;
  2163. uint32 maxHp;
  2164. uint16 sp;
  2165. uint16 maxSp;
  2166. uint32 exp;
  2167. uint32 expNext;
  2168. uint16 skillPoints;
  2169. uint16 range;
  2170. } __attribute__((packed));
  2171. DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x0b2f);
  2172. #elif PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
  2173. // PACKET_ZC_PROPERTY_HOMUN2
  2174. struct PACKET_ZC_PROPERTY_HOMUN {
  2175. int16 packetType;
  2176. char name[NAME_LENGTH];
  2177. // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
  2178. uint8 flags;
  2179. uint16 level;
  2180. uint16 hunger;
  2181. uint16 intimacy;
  2182. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2183. uint32 itemId;
  2184. #else
  2185. uint16 itemId;
  2186. #endif
  2187. uint16 atk2;
  2188. uint16 matk;
  2189. uint16 hit;
  2190. uint16 crit;
  2191. uint16 def;
  2192. uint16 mdef;
  2193. uint16 flee;
  2194. uint16 amotion;
  2195. uint32 hp;
  2196. uint32 maxHp;
  2197. uint16 sp;
  2198. uint16 maxSp;
  2199. uint32 exp;
  2200. uint32 expNext;
  2201. uint16 skillPoints;
  2202. uint16 range;
  2203. } __attribute__((packed));
  2204. DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x09f7);
  2205. #elif PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
  2206. // PACKET_ZC_PROPERTY_HOMUN1
  2207. struct PACKET_ZC_PROPERTY_HOMUN {
  2208. int16 packetType;
  2209. char name[NAME_LENGTH];
  2210. // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
  2211. uint8 flags;
  2212. uint16 level;
  2213. uint16 hunger;
  2214. uint16 intimacy;
  2215. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2216. uint32 itemId;
  2217. #else
  2218. uint16 itemId;
  2219. #endif
  2220. uint16 atk2;
  2221. uint16 matk;
  2222. uint16 hit;
  2223. uint16 crit;
  2224. uint16 def;
  2225. uint16 mdef;
  2226. uint16 flee;
  2227. uint16 amotion;
  2228. uint16 hp;
  2229. uint16 maxHp;
  2230. uint16 sp;
  2231. uint16 maxSp;
  2232. uint32 exp;
  2233. uint32 expNext;
  2234. uint16 skillPoints;
  2235. uint16 range;
  2236. } __attribute__((packed));
  2237. DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x022e);
  2238. #endif
  2239. struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER {
  2240. int16 packetType;
  2241. uint16 result;
  2242. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2243. uint32 itemId;
  2244. #else
  2245. uint16 itemId;
  2246. #endif
  2247. } __attribute__((packed));
  2248. struct PACKET_CZ_REQ_ITEMREPAIR {
  2249. int16 packetType;
  2250. int16 index;
  2251. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2252. uint32 itemId;
  2253. #else
  2254. uint16 itemId;
  2255. #endif
  2256. uint8 refine;
  2257. struct EQUIPSLOTINFO slot;
  2258. } __attribute__((packed));
  2259. struct PACKET_CZ_REQ_MAKINGITEM {
  2260. int16 packetType;
  2261. int16 type;
  2262. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2263. uint32 itemId;
  2264. #else
  2265. uint16 itemId;
  2266. #endif
  2267. } __attribute__((packed));
  2268. struct PACKET_CZ_SSILIST_ITEM_CLICK {
  2269. int16 packetType;
  2270. uint32 AID;
  2271. uint32 storeId;
  2272. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2273. uint32 itemId;
  2274. #else
  2275. uint16 itemId;
  2276. #endif
  2277. } __attribute__((packed));
  2278. struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub {
  2279. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2280. uint32 itemId;
  2281. #else
  2282. uint16 itemId;
  2283. #endif
  2284. uint32 price;
  2285. } __attribute__((packed));
  2286. struct PACKET_ZC_ACK_SCHEDULER_CASHITEM {
  2287. int16 packetType;
  2288. int16 packetLength;
  2289. int16 count;
  2290. int16 tabNum;
  2291. struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub items[];
  2292. } __attribute__((packed));
  2293. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub {
  2294. uint32 price;
  2295. int16 index;
  2296. int16 amount;
  2297. uint8 itemType;
  2298. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2299. uint32 itemId;
  2300. #else
  2301. uint16 itemId;
  2302. #endif
  2303. uint8 identified;
  2304. uint8 damaged;
  2305. uint8 refine;
  2306. struct EQUIPSLOTINFO slot;
  2307. #if PACKETVER >= 20150226
  2308. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2309. #endif
  2310. } __attribute__((packed));
  2311. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST {
  2312. int16 packetType;
  2313. int16 packetLength;
  2314. uint32 AID;
  2315. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub items[];
  2316. } __attribute__((packed));
  2317. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub {
  2318. uint32 price;
  2319. uint32 discountPrice;
  2320. uint8 itemType;
  2321. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2322. uint32 itemId;
  2323. #else
  2324. uint16 itemId;
  2325. #endif
  2326. } __attribute__((packed));
  2327. struct PACKET_ZC_PC_PURCHASE_ITEMLIST {
  2328. int16 packetType;
  2329. int16 packetLength;
  2330. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub items[];
  2331. } __attribute__((packed));
  2332. struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub {
  2333. uint16 amount;
  2334. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2335. uint32 itemId;
  2336. #else
  2337. uint16 itemId;
  2338. #endif
  2339. } __attribute__((packed));
  2340. struct PACKET_CZ_PC_PURCHASE_ITEMLIST {
  2341. int16 packetType;
  2342. int16 packetLength;
  2343. struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub items[];
  2344. } __attribute__((packed));
  2345. struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub {
  2346. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2347. uint32 itemId;
  2348. #else
  2349. uint16 itemId;
  2350. #endif
  2351. uint16 amount;
  2352. uint32 price;
  2353. } __attribute__((packed));
  2354. struct PACKET_CZ_REQ_OPEN_BUYING_STORE {
  2355. int16 packetType;
  2356. int16 packetLength;
  2357. uint32 zenyLimit;
  2358. uint8 result;
  2359. char storeName[MESSAGE_SIZE];
  2360. struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub items[];
  2361. } __attribute__((packed));
  2362. struct PACKET_ZC_MYITEMLIST_BUYING_STORE_sub {
  2363. uint32 price;
  2364. uint16 amount;
  2365. uint8 itemType;
  2366. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2367. uint32 itemId;
  2368. #else
  2369. uint16 itemId;
  2370. #endif
  2371. } __attribute__((packed));
  2372. struct PACKET_ZC_MYITEMLIST_BUYING_STORE {
  2373. int16 packetType;
  2374. int16 packetLength;
  2375. uint32 AID;
  2376. uint32 zenyLimit;
  2377. struct PACKET_ZC_MYITEMLIST_BUYING_STORE_sub items[];
  2378. } __attribute__((packed));
  2379. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub {
  2380. uint32 price;
  2381. uint16 amount;
  2382. int16 index;
  2383. uint8 itemType;
  2384. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2385. uint32 itemId;
  2386. #else
  2387. uint16 itemId;
  2388. #endif
  2389. uint8 identified;
  2390. uint8 damaged;
  2391. uint8 refine;
  2392. struct EQUIPSLOTINFO slot;
  2393. #if PACKETVER >= 20150226
  2394. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2395. #endif
  2396. // [4144] date 20160921 not confirmed. Can be bigger or smaller
  2397. #if PACKETVER >= 20160921
  2398. uint32 location;
  2399. uint16 viewSprite;
  2400. #endif
  2401. } __attribute__((packed));
  2402. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC {
  2403. int16 packetType;
  2404. int16 packetLength;
  2405. uint32 AID;
  2406. #if PACKETVER >= 20100105
  2407. uint32 venderId;
  2408. #endif
  2409. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub items[];
  2410. } __attribute__((packed));
  2411. struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE_sub {
  2412. uint32 price;
  2413. uint16 amount;
  2414. uint8 itemType;
  2415. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2416. uint32 itemId;
  2417. #else
  2418. uint16 itemId;
  2419. #endif
  2420. } __attribute__((packed));
  2421. struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE {
  2422. int16 packetType;
  2423. int16 packetLength;
  2424. uint32 AID;
  2425. uint32 storeId;
  2426. uint32 zenyLimit;
  2427. struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE_sub items[];
  2428. } __attribute__((packed));
  2429. struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub {
  2430. int16 index;
  2431. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2432. uint32 itemId;
  2433. #else
  2434. uint16 itemId;
  2435. #endif
  2436. uint16 amount;
  2437. } __attribute__((packed));
  2438. struct PACKET_CZ_REQ_TRADE_BUYING_STORE {
  2439. int16 packetType;
  2440. int16 packetLength;
  2441. uint32 AID;
  2442. uint32 storeId;
  2443. struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub items[];
  2444. } __attribute__((packed));
  2445. struct PACKET_ZC_MAKABLEITEMLIST_sub {
  2446. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2447. uint32 itemId;
  2448. uint32 material[3];
  2449. #else
  2450. uint16 itemId;
  2451. uint16 material[3];
  2452. #endif
  2453. } __attribute__((packed));
  2454. struct PACKET_ZC_MAKABLEITEMLIST {
  2455. int16 packetType;
  2456. int16 packetLength;
  2457. struct PACKET_ZC_MAKABLEITEMLIST_sub items[];
  2458. } __attribute__((packed));
  2459. struct PACKET_ZC_MAKINGARROW_LIST_sub {
  2460. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2461. uint32 itemId;
  2462. #else
  2463. uint16 itemId;
  2464. #endif
  2465. } __attribute__((packed));
  2466. struct PACKET_ZC_MAKINGARROW_LIST {
  2467. int16 packetType;
  2468. int16 packetLength;
  2469. struct PACKET_ZC_MAKINGARROW_LIST_sub items[];
  2470. } __attribute__((packed));
  2471. DEFINE_PACKET_HEADER(ZC_MAKINGARROW_LIST, 0x01ad);
  2472. struct PACKET_ZC_REPAIRITEMLIST_sub {
  2473. int16 index;
  2474. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2475. uint32 itemId;
  2476. #else
  2477. uint16 itemId;
  2478. #endif
  2479. uint8 refine; // unused?
  2480. struct EQUIPSLOTINFO slot; // unused?
  2481. } __attribute__((packed));
  2482. struct PACKET_ZC_REPAIRITEMLIST {
  2483. int16 packetType;
  2484. int16 packetLength;
  2485. struct PACKET_ZC_REPAIRITEMLIST_sub items[];
  2486. } __attribute__((packed));
  2487. struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub {
  2488. int16 index;
  2489. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2490. uint32 itemId;
  2491. #else
  2492. uint16 itemId;
  2493. #endif
  2494. uint8 refine; // unused?
  2495. struct EQUIPSLOTINFO slot; // unused?
  2496. } __attribute__((packed));
  2497. struct PACKET_ZC_NOTIFY_WEAPONITEMLIST {
  2498. int16 packetType;
  2499. int16 packetLength;
  2500. struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub items[];
  2501. } __attribute__((packed));
  2502. struct PACKET_ZC_MAKINGITEM_LIST_sub {
  2503. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2504. uint32 itemId;
  2505. #else
  2506. uint16 itemId;
  2507. #endif
  2508. } __attribute__((packed));
  2509. struct PACKET_ZC_MAKINGITEM_LIST {
  2510. int16 packetType;
  2511. int16 packetLength;
  2512. uint16 makeItem;
  2513. struct PACKET_ZC_MAKINGITEM_LIST_sub items[];
  2514. } __attribute__((packed));
  2515. DEFINE_PACKET_HEADER(ZC_MAKINGITEM_LIST, 0x025a);
  2516. struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub {
  2517. uint32 price;
  2518. uint32 discountPrice;
  2519. uint8 itemType;
  2520. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2521. uint32 itemId;
  2522. #else
  2523. uint16 itemId;
  2524. #endif
  2525. } __attribute__((packed));
  2526. struct PACKET_ZC_PC_CASH_POINT_ITEMLIST {
  2527. int16 packetType;
  2528. int16 packetLength;
  2529. uint32 cashPoints;
  2530. #if PACKETVER >= 20070711
  2531. uint32 kafraPoints;
  2532. #endif
  2533. struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub items[];
  2534. } __attribute__((packed));
  2535. struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub {
  2536. uint16 amount;
  2537. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2538. uint32 itemId;
  2539. #else
  2540. uint16 itemId;
  2541. #endif
  2542. } __attribute__((packed));
  2543. struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM {
  2544. int16 packetType;
  2545. #if PACKETVER >= 20101116
  2546. int16 packetLength;
  2547. uint32 kafraPoints;
  2548. uint16 count;
  2549. struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub items[];
  2550. #else
  2551. uint16 itemId;
  2552. uint16 amount;
  2553. #if PACKETVER >= 20070711
  2554. uint32 kafraPoints;
  2555. #endif
  2556. #endif
  2557. } __attribute__((packed));
  2558. struct PACKET_CZ_SEARCH_STORE_INFO_item {
  2559. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2560. uint32 itemId;
  2561. #else
  2562. uint16 itemId;
  2563. #endif
  2564. } __attribute__((packed));
  2565. struct PACKET_CZ_SEARCH_STORE_INFO {
  2566. int16 packetType;
  2567. int16 packetLength;
  2568. uint8 searchType;
  2569. uint32 maxPrice;
  2570. uint32 minPrice;
  2571. uint8 itemsCount;
  2572. uint8 cardsCount;
  2573. struct PACKET_CZ_SEARCH_STORE_INFO_item items[]; // items[itemCount]
  2574. /*
  2575. struct PACKET_CZ_SEARCH_STORE_INFO_item cards[cardCount];
  2576. */
  2577. } __attribute__((packed));
  2578. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub {
  2579. uint32 storeId;
  2580. uint32 AID;
  2581. char shopName[MESSAGE_SIZE];
  2582. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2583. uint32 itemId;
  2584. #else
  2585. uint16 itemId;
  2586. #endif
  2587. uint8 itemType;
  2588. uint32 price;
  2589. uint16 amount;
  2590. uint8 refine;
  2591. struct EQUIPSLOTINFO slot;
  2592. #if PACKETVER >= 20150226
  2593. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2594. #endif
  2595. } __attribute__((packed));
  2596. struct PACKET_ZC_SEARCH_STORE_INFO_ACK {
  2597. int16 packetType;
  2598. int16 packetLength;
  2599. uint8 firstPage;
  2600. uint8 nextPage;
  2601. uint8 usesCount;
  2602. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub items[];
  2603. } __attribute__((packed));
  2604. /* Achievement System */
  2605. struct ach_list_info {
  2606. uint32 ach_id;
  2607. uint8 completed;
  2608. uint32 objective[MAX_ACHIEVEMENT_OBJECTIVES];
  2609. uint32 completed_at;
  2610. uint8 reward;
  2611. } __attribute__((packed));
  2612. struct packet_achievement_list {
  2613. uint16 packet_id;
  2614. uint16 packet_len;
  2615. uint32 total_achievements;
  2616. uint32 total_points;
  2617. uint16 rank;
  2618. uint32 current_rank_points;
  2619. uint32 next_rank_points;
  2620. struct ach_list_info ach[MAX_ACHIEVEMENT_DB];
  2621. } __attribute__((packed));
  2622. struct packet_achievement_update {
  2623. uint16 packet_id;
  2624. uint32 total_points;
  2625. uint16 rank;
  2626. uint32 current_rank_points;
  2627. uint32 next_rank_points;
  2628. struct ach_list_info ach;
  2629. } __attribute__((packed));
  2630. struct packet_achievement_reward_ack {
  2631. uint16 packet_id;
  2632. uint8 failed;
  2633. uint32 ach_id;
  2634. } __attribute__((packed));
  2635. // Name Packet ZC_ACK_REQNAME
  2636. struct packet_reqname_ack {
  2637. uint16 packet_id;
  2638. int32 gid;
  2639. char name[NAME_LENGTH];
  2640. } __attribute__((packed));
  2641. // ZC_ACK_REQNAMEALL / ZC_ACK_REQNAMEALL2
  2642. #if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
  2643. struct PACKET_ZC_ACK_REQNAMEALL {
  2644. uint16 packet_id;
  2645. int32 gid;
  2646. char name[NAME_LENGTH];
  2647. char party_name[NAME_LENGTH];
  2648. char guild_name[NAME_LENGTH];
  2649. char position_name[NAME_LENGTH];
  2650. int32 title_id;
  2651. } __attribute__((packed));
  2652. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0a30);
  2653. #else
  2654. struct PACKET_ZC_ACK_REQNAMEALL {
  2655. uint16 packet_id;
  2656. int32 gid;
  2657. char name[NAME_LENGTH];
  2658. char party_name[NAME_LENGTH];
  2659. char guild_name[NAME_LENGTH];
  2660. char position_name[NAME_LENGTH];
  2661. } __attribute__((packed));
  2662. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0195);
  2663. #endif
  2664. #if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
  2665. struct PACKET_ZC_ACK_REQNAME_TITLE {
  2666. uint16 packet_id;
  2667. int32 gid;
  2668. int32 groupId;
  2669. char name[NAME_LENGTH];
  2670. char title[NAME_LENGTH];
  2671. } __attribute__((packed));
  2672. DEFINE_PACKET_HEADER(ZC_ACK_REQNAME_TITLE, 0x0adf);
  2673. #else
  2674. struct PACKET_ZC_ACK_REQNAME_TITLE {
  2675. uint16 packet_id;
  2676. int32 gid;
  2677. char name[NAME_LENGTH];
  2678. } __attribute__((packed));
  2679. DEFINE_PACKET_HEADER(ZC_ACK_REQNAME_TITLE, 0x0095);
  2680. #endif
  2681. struct PACKET_ZC_OVERWEIGHT_PERCENT {
  2682. int16 packetType;
  2683. uint32 percent;
  2684. } __attribute__((packed));
  2685. struct PACKET_ZC_WARPLIST_sub {
  2686. char map[MAP_NAME_LENGTH_EXT];
  2687. } __attribute__((packed));
  2688. struct PACKET_ZC_WARPLIST {
  2689. int16 packetType;
  2690. #if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
  2691. int16 packetLength;
  2692. uint16 skillId;
  2693. struct PACKET_ZC_WARPLIST_sub maps[];
  2694. #else
  2695. uint16 skillId;
  2696. struct PACKET_ZC_WARPLIST_sub maps[4];
  2697. #endif
  2698. } __attribute__((packed));
  2699. struct PACKET_ZC_GROUP_ISALIVE {
  2700. int16 packetType;
  2701. uint32 AID;
  2702. uint8 isDead;
  2703. } __attribute__((packed));
  2704. struct PACKET_ZC_GUILD_POSITION {
  2705. int16 packetType;
  2706. int16 packetLength;
  2707. uint32 AID;
  2708. char position[];
  2709. } __attribute__((packed));
  2710. struct PACKET_ZC_INVENTORY_MOVE_FAILED {
  2711. int16 packetType;
  2712. int16 index;
  2713. int16 unknown;
  2714. } __attribute__((packed));
  2715. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  2716. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD3
  2717. #elif PACKETVER >= 20100803
  2718. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD2
  2719. #else
  2720. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD1
  2721. #endif
  2722. struct PACKET_ZC_ACK_BAN_GUILD1 {
  2723. int16 packetType;
  2724. char name[NAME_LENGTH];
  2725. char reason[40];
  2726. char account_name[NAME_LENGTH];
  2727. } __attribute__((packed));
  2728. struct PACKET_ZC_ACK_BAN_GUILD2 {
  2729. int16 packetType;
  2730. char name[NAME_LENGTH];
  2731. char reason[40];
  2732. } __attribute__((packed));
  2733. struct PACKET_ZC_ACK_BAN_GUILD3 {
  2734. int16 packetType;
  2735. char reason[40];
  2736. uint32 GID;
  2737. } __attribute__((packed));
  2738. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  2739. #define PACKET_ZC_ACK_LEAVE_GUILD PACKET_ZC_ACK_LEAVE_GUILD2
  2740. #else
  2741. #define PACKET_ZC_ACK_LEAVE_GUILD PACKET_ZC_ACK_LEAVE_GUILD1
  2742. #endif
  2743. struct PACKET_ZC_ACK_LEAVE_GUILD1 {
  2744. int16 packetType;
  2745. char name[NAME_LENGTH];
  2746. char reason[40];
  2747. } __attribute__((packed));
  2748. struct PACKET_ZC_ACK_LEAVE_GUILD2 {
  2749. int16 packetType;
  2750. uint32 GID;
  2751. char reason[40];
  2752. } __attribute__((packed));
  2753. struct PACKET_CZ_MEMORIALDUNGEON_COMMAND {
  2754. int16 packetType;
  2755. int32 command;
  2756. } __attribute__((packed));
  2757. struct PACKET_ZC_REMOVE_EFFECT {
  2758. int16 packetType;
  2759. uint32 aid;
  2760. uint32 effectId;
  2761. } __attribute__((packed));
  2762. #if PACKETVER >= 20160525
  2763. struct PACKET_ZC_CAMERA_INFO {
  2764. int16 packetType;
  2765. int8 action;
  2766. float range;
  2767. float rotation;
  2768. float latitude;
  2769. } __attribute__((packed));
  2770. DEFINE_PACKET_HEADER(ZC_CAMERA_INFO, 0x0a78);
  2771. #endif
  2772. #if PACKETVER >= 20160525
  2773. struct PACKET_CZ_CAMERA_INFO {
  2774. int16 packetType;
  2775. int8 action;
  2776. float range;
  2777. float rotation;
  2778. float latitude;
  2779. } __attribute__((packed));
  2780. DEFINE_PACKET_HEADER(CZ_CAMERA_INFO, 0x0a77);
  2781. #endif
  2782. #if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
  2783. // PACKET_ZC_AUTOSPELLLIST2
  2784. struct PACKET_ZC_AUTOSPELLLIST {
  2785. int16 packetType;
  2786. int16 packetLength;
  2787. int skills[];
  2788. } __attribute__((packed));
  2789. DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x0afb);
  2790. #elif PACKETVER_MAIN_NUM >= 20090406 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_SAK_NUM >= 20080618
  2791. // PACKET_ZC_AUTOSPELLLIST1
  2792. struct PACKET_ZC_AUTOSPELLLIST {
  2793. int16 packetType;
  2794. int skills[7];
  2795. } __attribute__((packed));
  2796. DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x01cd);
  2797. #endif
  2798. #if PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  2799. #if 0 && (PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024 )
  2800. struct PACKET_ZC_ITEM_PREVIEW {
  2801. int16 packetType;
  2802. int16 index;
  2803. int8 isDamaged;
  2804. int16 refiningLevel;
  2805. struct EQUIPSLOTINFO slot;
  2806. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2807. } __attribute__((packed));
  2808. DEFINE_PACKET_HEADER(ZC_ITEM_PREVIEW, 0x0b13);
  2809. #else // PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
  2810. struct PACKET_ZC_ITEM_PREVIEW {
  2811. int16 packetType;
  2812. int16 index;
  2813. int16 refiningLevel;
  2814. struct EQUIPSLOTINFO slot;
  2815. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2816. } __attribute__((packed));
  2817. DEFINE_PACKET_HEADER(ZC_ITEM_PREVIEW, 0x0ab9);
  2818. #endif // PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
  2819. #endif // PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  2820. #if PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
  2821. struct PACKET_ZC_ENCHANT_EQUIPMENT {
  2822. int16 packetType;
  2823. int16 wearState;
  2824. int16 cardSlot;
  2825. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2826. int32 itemId;
  2827. #else
  2828. int16 itemId;
  2829. #endif
  2830. int8 equipFlag;
  2831. } __attribute__((packed));
  2832. DEFINE_PACKET_HEADER(ZC_ENCHANT_EQUIPMENT, 0x0a3f);
  2833. #endif // PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
  2834. #if PACKETVER_MAIN_NUM >= 20170830 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
  2835. struct PACKET_ZC_SERVICE_MESSAGE_COLOR {
  2836. int16 packetType;
  2837. int16 packetLength;
  2838. int32 color;
  2839. char message[];
  2840. } __attribute__((packed));
  2841. DEFINE_PACKET_HEADER(ZC_SERVICE_MESSAGE_COLOR, 0x0adb);
  2842. #endif
  2843. #if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
  2844. struct PACKET_CZ_START_USE_SKILL {
  2845. int16 packetType;
  2846. int16 skillId;
  2847. int16 skillLv;
  2848. uint32 targetId;
  2849. } __attribute__((packed));
  2850. DEFINE_PACKET_HEADER(CZ_START_USE_SKILL, 0x0b10);
  2851. struct PACKET_CZ_STOP_USE_SKILL {
  2852. int16 packetType;
  2853. int16 skillId;
  2854. } __attribute__((packed));
  2855. DEFINE_PACKET_HEADER(CZ_STOP_USE_SKILL, 0x0b11);
  2856. #endif
  2857. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  2858. struct PACKET_ZC_INVENTORY_EXPANSION_INFO {
  2859. int16 packetType;
  2860. int16 expansionSize;
  2861. } __attribute__((packed));
  2862. DEFINE_PACKET_HEADER(ZC_INVENTORY_EXPANSION_INFO, 0x0b18);
  2863. #endif
  2864. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  2865. struct PACKET_ZC_ACK_INVENTORY_EXPAND {
  2866. int16 packetType;
  2867. uint8 result;
  2868. uint32 itemId;
  2869. } __attribute__((packed));
  2870. DEFINE_PACKET_HEADER(ZC_ACK_INVENTORY_EXPAND, 0x0b15);
  2871. #endif
  2872. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  2873. struct PACKET_ZC_ACK_INVENTORY_EXPAND_RESULT {
  2874. int16 packetType;
  2875. uint8 result;
  2876. } __attribute__((packed));
  2877. DEFINE_PACKET_HEADER(ZC_ACK_INVENTORY_EXPAND_RESULT, 0x0b17);
  2878. #endif
  2879. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  2880. struct PACKET_CZ_INVENTORY_EXPAND {
  2881. int16 packetType;
  2882. } __attribute__((packed));
  2883. DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND, 0x0b14);
  2884. #endif
  2885. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  2886. struct PACKET_CZ_INVENTORY_EXPAND_CONFIRMED {
  2887. int16 packetType;
  2888. } __attribute__((packed));
  2889. DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND_CONFIRMED, 0x0b16);
  2890. #endif
  2891. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  2892. struct PACKET_CZ_INVENTORY_EXPAND_REJECTED {
  2893. int16 packetType;
  2894. } __attribute__((packed));
  2895. DEFINE_PACKET_HEADER(CZ_INVENTORY_EXPAND_REJECTED, 0x0b19);
  2896. #endif
  2897. struct PACKET_CZ_REQ_REMAINTIME {
  2898. int16 packetType;
  2899. } __attribute__((packed));
  2900. DEFINE_PACKET_HEADER(CZ_REQ_REMAINTIME, 0x01c0);
  2901. struct PACKET_CZ_PARTY_CONFIG {
  2902. int16 packetType;
  2903. uint8 refuseInvite;
  2904. } __attribute__((packed));
  2905. DEFINE_PACKET_HEADER(CZ_PARTY_CONFIG, 0x02c8);
  2906. #if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  2907. struct PACKET_ZC_NPC_BARTER_OPEN_sub {
  2908. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2909. uint32 nameid;
  2910. #else
  2911. uint16 nameid;
  2912. #endif
  2913. uint8 type;
  2914. uint32 amount;
  2915. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2916. uint32 currencyNameid;
  2917. #else
  2918. uint16 currencyNameid;
  2919. #endif
  2920. uint32 currencyAmount;
  2921. uint32 weight;
  2922. uint32 index;
  2923. } __attribute__((packed));
  2924. struct PACKET_ZC_NPC_BARTER_OPEN {
  2925. int16 packetType;
  2926. int16 packetLength;
  2927. struct PACKET_ZC_NPC_BARTER_OPEN_sub list[];
  2928. } __attribute__((packed));
  2929. DEFINE_PACKET_HEADER(ZC_NPC_BARTER_OPEN, 0x0b0e);
  2930. #endif
  2931. #if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  2932. struct PACKET_CZ_NPC_BARTER_CLOSE {
  2933. int16 packetType;
  2934. } __attribute__((packed));
  2935. DEFINE_PACKET_HEADER(CZ_NPC_BARTER_CLOSE, 0x0b12);
  2936. #endif
  2937. #if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  2938. struct PACKET_CZ_NPC_BARTER_PURCHASE_sub {
  2939. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2940. uint32 itemId;
  2941. #else
  2942. uint16 itemId;
  2943. #endif
  2944. uint32 amount;
  2945. uint16 invIndex;
  2946. uint32 shopIndex;
  2947. } __attribute__((packed));
  2948. struct PACKET_CZ_NPC_BARTER_PURCHASE {
  2949. int16 packetType;
  2950. int16 packetLength;
  2951. struct PACKET_CZ_NPC_BARTER_PURCHASE_sub list[];
  2952. } __attribute__((packed));
  2953. DEFINE_PACKET_HEADER(CZ_NPC_BARTER_PURCHASE, 0x0b0f);
  2954. #endif
  2955. #if PACKETVER_MAIN_NUM >= 20181212 || PACKETVER_RE_NUM >= 20181212 || PACKETVER_ZERO_NUM >= 20190130
  2956. struct PACKET_ZC_USESKILL_ACK {
  2957. int16 packetType;
  2958. uint32 srcId;
  2959. uint32 dstId;
  2960. uint16 x;
  2961. uint16 y;
  2962. uint16 skillId;
  2963. uint32 element;
  2964. uint32 delayTime;
  2965. uint8 disposable;
  2966. uint32 unknown;
  2967. } __attribute__((packed));
  2968. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x0b1a);
  2969. #elif PACKETVER_MAIN_NUM >= 20091124 || PACKETVER_RE_NUM >= 20091124 || defined(PACKETVER_ZERO)
  2970. struct PACKET_ZC_USESKILL_ACK {
  2971. int16 packetType;
  2972. uint32 srcId;
  2973. uint32 dstId;
  2974. uint16 x;
  2975. uint16 y;
  2976. uint16 skillId;
  2977. uint32 element;
  2978. uint32 delayTime;
  2979. uint8 disposable;
  2980. } __attribute__((packed));
  2981. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x07fb);
  2982. #elif PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_SAK_NUM >= 20080618 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
  2983. struct PACKET_ZC_USESKILL_ACK {
  2984. int16 packetType;
  2985. uint32 srcId;
  2986. uint32 dstId;
  2987. uint16 x;
  2988. uint16 y;
  2989. uint16 skillId;
  2990. uint32 element;
  2991. uint32 delayTime;
  2992. } __attribute__((packed));
  2993. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x013e);
  2994. #endif
  2995. #if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
  2996. struct PACKET_CZ_CLIENT_VERSION {
  2997. int16 packetType;
  2998. uint32 clientVersion;
  2999. } __attribute__((packed));
  3000. DEFINE_PACKET_HEADER(CZ_CLIENT_VERSION, 0x044a);
  3001. #endif
  3002. #if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
  3003. struct PACKET_CZ_PING {
  3004. int16 packetType;
  3005. } __attribute__((packed));
  3006. DEFINE_PACKET_HEADER(CZ_PING, 0x0b1c);
  3007. #endif
  3008. #if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
  3009. struct PACKET_ZC_PING {
  3010. int16 packetType;
  3011. } __attribute__((packed));
  3012. DEFINE_PACKET_HEADER(ZC_PING, 0x0b1d);
  3013. #endif
  3014. #if PACKETVER >= 20160622
  3015. struct PACKET_CZ_COOLDOWN_RESET {
  3016. int16 packetType;
  3017. } __attribute__((packed));
  3018. DEFINE_PACKET_HEADER(CZ_COOLDOWN_RESET, 0x0a88);
  3019. #endif
  3020. #if PACKETVER >= 20151104
  3021. struct PACKET_CZ_STYLE_CLOSE {
  3022. int16 packetType;
  3023. } __attribute__((packed));
  3024. DEFINE_PACKET_HEADER(CZ_STYLE_CLOSE, 0x0a48);
  3025. #endif
  3026. #if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320 || PACKETVER_ZERO_NUM >= 20190410
  3027. struct PACKET_ZC_LOAD_CONFIRM {
  3028. int16 packetType;
  3029. } __attribute__((packed));
  3030. DEFINE_PACKET_HEADER(ZC_LOAD_CONFIRM, 0x0b1b);
  3031. #endif
  3032. #if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO)
  3033. struct PACKET_ZC_PARTY_CONFIG {
  3034. int16 packetType;
  3035. uint8 denyPartyInvites;
  3036. } __attribute__((packed));
  3037. DEFINE_PACKET_HEADER(ZC_PARTY_CONFIG, 0x02c9);
  3038. #endif
  3039. struct PACKET_ZC_ROLE_CHANGE {
  3040. int16 packetType;
  3041. int32 flag;
  3042. char name[NAME_LENGTH];
  3043. } __attribute__((packed));
  3044. DEFINE_PACKET_HEADER(ZC_ROLE_CHANGE, 0x00e1);
  3045. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  3046. struct PACKET_ZC_BAN_LIST_sub {
  3047. int char_id;
  3048. char message[40];
  3049. } __attribute__((packed));
  3050. struct PACKET_ZC_BAN_LIST {
  3051. int16 packetType;
  3052. uint16 packetLen;
  3053. struct PACKET_ZC_BAN_LIST_sub chars[];
  3054. } __attribute__((packed));
  3055. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0a87);
  3056. // version unconfirmed
  3057. #elif PACKETVER >= 20100803
  3058. struct PACKET_ZC_BAN_LIST_sub {
  3059. char char_name[NAME_LENGTH];
  3060. char message[40];
  3061. } __attribute__((packed));
  3062. struct PACKET_ZC_BAN_LIST {
  3063. int16 packetType;
  3064. uint16 packetLen;
  3065. struct PACKET_ZC_BAN_LIST_sub chars[];
  3066. } __attribute__((packed));
  3067. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
  3068. #else
  3069. struct PACKET_ZC_BAN_LIST_sub {
  3070. char char_name[NAME_LENGTH];
  3071. char account_name[NAME_LENGTH];
  3072. char message[40];
  3073. } __attribute__((packed));
  3074. struct PACKET_ZC_BAN_LIST {
  3075. int16 packetType;
  3076. uint16 packetLen;
  3077. struct PACKET_ZC_BAN_LIST_sub chars[];
  3078. } __attribute__((packed));
  3079. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
  3080. #endif
  3081. #if PACKETVER_MAIN_NUM >= 20141008 || PACKETVER_RE_NUM >= 20140903 || defined(PACKETVER_ZERO)
  3082. struct PACKET_ZC_ACK_CLOSE_ROULETTE {
  3083. int16 packetType;
  3084. uint8 result;
  3085. } __attribute__((packed));
  3086. DEFINE_PACKET_HEADER(ZC_ACK_CLOSE_ROULETTE, 0x0a1e);
  3087. #endif
  3088. #if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
  3089. struct PACKET_ZC_ACK_MERGE_ITEM {
  3090. int16 packetType;
  3091. int16 index;
  3092. int16 amount;
  3093. uint8 reason;
  3094. } __attribute__((packed));
  3095. DEFINE_PACKET_HEADER(ZC_ACK_MERGE_ITEM, 0x096f);
  3096. #endif
  3097. #if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
  3098. struct PACKET_ZC_MERGE_ITEM_OPEN_sub {
  3099. int16 index;
  3100. } __attribute__((packed));
  3101. struct PACKET_ZC_MERGE_ITEM_OPEN {
  3102. int16 packetType;
  3103. uint16 packetLen;
  3104. struct PACKET_ZC_MERGE_ITEM_OPEN_sub items[];
  3105. } __attribute__((packed));
  3106. DEFINE_PACKET_HEADER(ZC_MERGE_ITEM_OPEN, 0x096d);
  3107. #endif
  3108. #if PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
  3109. struct PACKET_ZC_SE_PC_BUY_CASHITEM_RESULT {
  3110. int16 packetType;
  3111. uint32 itemId; // unused
  3112. uint16 result;
  3113. uint32 cashPoints;
  3114. uint32 kafraPoints;
  3115. } __attribute__((packed));
  3116. DEFINE_PACKET_HEADER(ZC_SE_PC_BUY_CASHITEM_RESULT, 0x0849);
  3117. #endif
  3118. #if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
  3119. struct PACKET_ZC_REFINE_OPEN_WINDOW {
  3120. int16 packetType;
  3121. } __attribute__((packed));
  3122. DEFINE_PACKET_HEADER(ZC_REFINE_OPEN_WINDOW, 0x0aa0);
  3123. #endif
  3124. #if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
  3125. struct PACKET_CZ_REFINE_ADD_ITEM {
  3126. int16 packetType;
  3127. int16 index;
  3128. };
  3129. DEFINE_PACKET_HEADER(CZ_REFINE_ADD_ITEM, 0x0aa1);
  3130. #endif
  3131. #if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
  3132. struct PACKET_ZC_REFINE_ADD_ITEM_SUB {
  3133. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3134. uint32 itemId;
  3135. #else
  3136. uint16 itemId;
  3137. #endif
  3138. int8 chance;
  3139. int32 zeny;
  3140. } __attribute__((packed));
  3141. struct PACKET_ZC_REFINE_ADD_ITEM {
  3142. int16 packetType;
  3143. int16 packtLength;
  3144. int16 itemIndex;
  3145. int8 blacksmithBlessing;
  3146. struct PACKET_ZC_REFINE_ADD_ITEM_SUB req[];
  3147. } __attribute__((packed));
  3148. DEFINE_PACKET_HEADER(ZC_REFINE_ADD_ITEM, 0x0aa2);
  3149. #endif
  3150. #if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
  3151. struct PACKET_CZ_REFINE_ITEM_REQUEST {
  3152. int16 packetType;
  3153. int16 index;
  3154. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3155. uint32 itemId;
  3156. #else
  3157. uint16 itemId;
  3158. #endif
  3159. int8 blacksmithBlessing;
  3160. } __attribute__((packed));
  3161. DEFINE_PACKET_HEADER(CZ_REFINE_ITEM_REQUEST, 0x0aa3);
  3162. struct PACKET_CZ_REFINE_WINDOW_CLOSE {
  3163. int16 packetType;
  3164. } __attribute__((packed));
  3165. DEFINE_PACKET_HEADER(CZ_REFINE_WINDOW_CLOSE, 0x0aa4);
  3166. #endif
  3167. #if PACKETVER_MAIN_NUM >= 20170906 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
  3168. struct PACKET_ZC_REFINE_STATUS {
  3169. int16 packetType;
  3170. char name[NAME_LENGTH];
  3171. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3172. uint32 itemId;
  3173. #else
  3174. uint16 itemId;
  3175. #endif
  3176. int8 refine_level;
  3177. int8 status;
  3178. } __attribute__((packed));
  3179. DEFINE_PACKET_HEADER(ZC_REFINE_STATUS, 0x0ada);
  3180. #endif
  3181. struct PACKET_ZC_ACK_RANKING_name {
  3182. char name[NAME_LENGTH];
  3183. } __attribute__((packed));
  3184. struct PACKET_ZC_ACK_RANKING_points {
  3185. uint32 points;
  3186. } __attribute__((packed));
  3187. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
  3188. struct PACKET_ZC_ACK_RANKING_sub {
  3189. char name[NAME_LENGTH];
  3190. uint32 points;
  3191. } __attribute__((packed));
  3192. struct PACKET_ZC_ACK_RANKING {
  3193. int16 packetType;
  3194. int16 rankType;
  3195. uint32 chars[10];
  3196. uint32 points[10];
  3197. uint32 myPoints;
  3198. } __attribute__((packed));
  3199. DEFINE_PACKET_HEADER(ZC_ACK_RANKING, 0x0af6);
  3200. #elif PACKETVER_MAIN_NUM >= 20130605 || PACKETVER_RE_NUM >= 20130529 || defined(PACKETVER_ZERO)
  3201. struct PACKET_ZC_ACK_RANKING_sub {
  3202. struct PACKET_ZC_ACK_RANKING_name names[10];
  3203. struct PACKET_ZC_ACK_RANKING_points points[10];
  3204. } __attribute__((packed));
  3205. struct PACKET_ZC_ACK_RANKING {
  3206. int16 packetType;
  3207. int16 rankType;
  3208. struct PACKET_ZC_ACK_RANKING_sub ranks;
  3209. uint32 myPoints;
  3210. } __attribute__((packed));
  3211. DEFINE_PACKET_HEADER(ZC_ACK_RANKING, 0x097d);
  3212. #else
  3213. struct PACKET_ZC_ACK_RANKING_sub {
  3214. struct PACKET_ZC_ACK_RANKING_name names[10];
  3215. struct PACKET_ZC_ACK_RANKING_points points[10];
  3216. } __attribute__((packed));
  3217. #endif
  3218. struct PACKET_ZC_STATUS_CHANGE_ACK {
  3219. int16 packetType;
  3220. uint16 sp;
  3221. uint8 ok;
  3222. uint8 value;
  3223. } __attribute__((packed));
  3224. DEFINE_PACKET_HEADER(ZC_STATUS_CHANGE_ACK, 0x00bc);
  3225. #if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
  3226. struct PACKET_ZC_HAT_EFFECT {
  3227. int16 packetType;
  3228. int16 packetLength;
  3229. uint32 aid;
  3230. int8 status;
  3231. uint16 effects[];
  3232. } __attribute__((packed));
  3233. DEFINE_PACKET_HEADER(ZC_HAT_EFFECT, 0x0a3b);
  3234. #endif
  3235. // [4144] this struct updated not in all packets in client
  3236. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3237. struct SKILLDATA {
  3238. uint16 id;
  3239. int inf;
  3240. uint16 level;
  3241. uint16 sp;
  3242. uint16 range2;
  3243. uint8 upFlag;
  3244. uint16 level2;
  3245. } __attribute__((packed));
  3246. #else
  3247. struct SKILLDATA {
  3248. uint16 id;
  3249. int inf;
  3250. uint16 level;
  3251. uint16 sp;
  3252. uint16 range2;
  3253. char name[NAME_LENGTH];
  3254. uint8 upFlag;
  3255. } __attribute__((packed));
  3256. #endif
  3257. struct PACKET_ZC_ADD_SKILL {
  3258. int16 packetType;
  3259. struct SKILLDATA skill;
  3260. } __attribute__((packed));
  3261. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3262. DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0b31);
  3263. #else
  3264. DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0111);
  3265. #endif
  3266. struct PACKET_ZC_SKILLINFO_LIST {
  3267. int16 packetType;
  3268. int16 packetLength;
  3269. struct SKILLDATA skills[];
  3270. } __attribute__((packed));
  3271. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3272. DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x0b32);
  3273. #else
  3274. DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x010f);
  3275. #endif
  3276. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3277. struct PACKET_ZC_SKILLINFO_UPDATE2 {
  3278. int16 packetType;
  3279. uint16 id;
  3280. int inf;
  3281. uint16 level;
  3282. uint16 sp;
  3283. uint16 range2;
  3284. uint8 upFlag;
  3285. uint16 level2;
  3286. } __attribute__((packed));
  3287. DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x0b33);
  3288. #else
  3289. struct PACKET_ZC_SKILLINFO_UPDATE2 {
  3290. int16 packetType;
  3291. uint16 id;
  3292. int inf;
  3293. uint16 level;
  3294. uint16 sp;
  3295. uint16 range2;
  3296. uint8 upFlag;
  3297. } __attribute__((packed));
  3298. DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x07e1);
  3299. #endif
  3300. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub {
  3301. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3302. uint32 ITID;
  3303. #else
  3304. uint16 ITID;
  3305. #endif
  3306. uint16 qty;
  3307. uint32 price;
  3308. } __attribute__((packed));
  3309. #if PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
  3310. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT {
  3311. int16 PacketType;
  3312. int16 PacketLength;
  3313. uint16 result;
  3314. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[];
  3315. } __attribute__((packed));
  3316. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x0b4e);
  3317. #elif PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20130911 || defined(PACKETVER_ZERO)
  3318. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT {
  3319. int16 PacketType;
  3320. int16 PacketLength;
  3321. uint8 result;
  3322. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[];
  3323. } __attribute__((packed));
  3324. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x09d7);
  3325. #endif
  3326. struct PACKET_ZC_TALKBOX_CHATCONTENTS {
  3327. int16 PacketType;
  3328. uint32 aid;
  3329. char message[TALKBOX_MESSAGE_SIZE];
  3330. } __attribute__((packed));
  3331. DEFINE_PACKET_HEADER(ZC_TALKBOX_CHATCONTENTS, 0x0191);
  3332. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  3333. struct PACKET_ZC_GUILD_CASTLE_LIST {
  3334. int16 packetType;
  3335. int16 packetLength;
  3336. int8 castle_list[];
  3337. } __attribute__((packed));
  3338. DEFINE_PACKET_HEADER(ZC_GUILD_CASTLE_LIST, 0x0b27);
  3339. #endif
  3340. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190522 || PACKETVER_ZERO_NUM >= 20190515
  3341. struct PACKET_CZ_CASTLE_TELEPORT_REQUEST {
  3342. int16 packetType;
  3343. int8 castle_id;
  3344. } __attribute__((packed));
  3345. DEFINE_PACKET_HEADER(CZ_CASTLE_TELEPORT_REQUEST, 0x0b28);
  3346. #endif
  3347. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  3348. struct PACKET_ZC_CASTLE_TELEPORT_RESPONSE {
  3349. int16 packetType;
  3350. int16 result;
  3351. } __attribute__((packed));
  3352. DEFINE_PACKET_HEADER(ZC_CASTLE_TELEPORT_RESPONSE, 0x0b2e);
  3353. #endif
  3354. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  3355. struct PACKET_ZC_CASTLE_INFO {
  3356. int16 packetType;
  3357. int8 castle_id;
  3358. int32 economy;
  3359. int32 defense;
  3360. } __attribute__((packed));
  3361. DEFINE_PACKET_HEADER(ZC_CASTLE_INFO, 0x0b2d);
  3362. #endif
  3363. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190522 || PACKETVER_ZERO_NUM >= 20190515
  3364. struct PACKET_CZ_CASTLE_INFO_REQUEST {
  3365. int16 packetType;
  3366. int8 castle_id;
  3367. } __attribute__((packed));
  3368. DEFINE_PACKET_HEADER(CZ_CASTLE_INFO_REQUEST, 0x0b2c);
  3369. #endif
  3370. #if PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  3371. struct PACKET_ZC_LAPINEDDUKDDAK_OPEN {
  3372. int16 packetType;
  3373. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3374. int32 itemId;
  3375. #else
  3376. int16 itemId;
  3377. #endif
  3378. } __attribute__((packed));
  3379. DEFINE_PACKET_HEADER(ZC_LAPINEDDUKDDAK_OPEN, 0x0a4e);
  3380. #endif // PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  3381. #if PACKETVER_MAIN_NUM >= 20160504 || PACKETVER_RE_NUM >= 20160504 || defined(PACKETVER_ZERO)
  3382. struct PACKET_CZ_LAPINEDDUKDDAK_CLOSE {
  3383. int16 packetType;
  3384. } __attribute__((packed));
  3385. DEFINE_PACKET_HEADER(CZ_LAPINEDDUKDDAK_CLOSE, 0x0a70);
  3386. #endif // PACKETVER_MAIN_NUM >= 20160504 || PACKETVER_RE_NUM >= 20160504 || defined(PACKETVER_ZERO)
  3387. #if PACKETVER >= 20160302
  3388. struct PACKET_CZ_LAPINEDDUKDDAK_ACK_sub {
  3389. int16 index;
  3390. int16 count;
  3391. } __attribute__((packed));
  3392. struct PACKET_CZ_LAPINEDDUKDDAK_ACK {
  3393. int16 packetType;
  3394. int16 packetLength;
  3395. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3396. int32 itemId;
  3397. #else
  3398. int16 itemId;
  3399. #endif
  3400. struct PACKET_CZ_LAPINEDDUKDDAK_ACK_sub items[];
  3401. } __attribute__((packed));
  3402. DEFINE_PACKET_HEADER(CZ_LAPINEDDUKDDAK_ACK, 0x0a4f);
  3403. #endif // PACKETVER >= 20160302
  3404. #if PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  3405. struct PACKET_ZC_LAPINEDDUKDDAK_RESULT {
  3406. int16 packetType;
  3407. int16 result;
  3408. } __attribute__((packed));
  3409. DEFINE_PACKET_HEADER(ZC_LAPINEDDUKDDAK_RESULT, 0x0a50);
  3410. #endif // PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  3411. #if PACKETVER_MAIN_NUM >= 20190703 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190709
  3412. struct PACKET_CZ_REQ_MOUNTOFF {
  3413. int16 packetType;
  3414. uint8 action;
  3415. } __attribute__((packed));
  3416. DEFINE_PACKET_HEADER(CZ_REQ_MOUNTOFF, 0x0b35);
  3417. #endif
  3418. // in 3 clients from same version
  3419. #if PACKETVER >= 20191127
  3420. struct PACKET_ZC_NOTIFY_EFFECT3 {
  3421. int16 packetType;
  3422. uint32 aid;
  3423. uint32 effectId;
  3424. uint64 num;
  3425. } __attribute__((packed));
  3426. DEFINE_PACKET_HEADER(ZC_NOTIFY_EFFECT3, 0x0b69);
  3427. #elif PACKETVER_MAIN_NUM >= 20060911 || PACKETVER_AD_NUM >= 20060911 || PACKETVER_SAK_NUM >= 20060911 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO)
  3428. struct PACKET_ZC_NOTIFY_EFFECT3 {
  3429. int16 packetType;
  3430. uint32 aid;
  3431. uint32 effectId;
  3432. uint32 num;
  3433. } __attribute__((packed));
  3434. DEFINE_PACKET_HEADER(ZC_NOTIFY_EFFECT3, 0x0284);
  3435. #endif
  3436. #if PACKETVER >= 20100824
  3437. struct PACKET_CZ_SE_CASHSHOP_OPEN1 {
  3438. int16 packetType;
  3439. } __attribute__((packed));
  3440. DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN1, 0x0844);
  3441. #endif
  3442. #if PACKETVER >= 20191224
  3443. struct PACKET_CZ_SE_CASHSHOP_OPEN2 {
  3444. int16 packetType;
  3445. uint32 tab;
  3446. } __attribute__((packed));
  3447. DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN2, 0x0b6d);
  3448. #endif
  3449. #if PACKETVER >= 20190724
  3450. struct PACKET_CZ_SE_CASHSHOP_LIMITED_REQ {
  3451. int16 packetType;
  3452. } __attribute__((packed));
  3453. DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_LIMITED_REQ, 0x0b4c);
  3454. #endif
  3455. #if PACKETVER_MAIN_NUM >= 20200129 || PACKETVER_RE_NUM >= 20200205 || PACKETVER_ZERO_NUM >= 20191224
  3456. struct PACKET_ZC_SE_CASHSHOP_OPEN {
  3457. int16 packetType;
  3458. uint32 cashPoints;
  3459. uint32 kafraPoints;
  3460. uint32 tab;
  3461. } __attribute__((packed));
  3462. DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0b6e);
  3463. // for ragexeRE in some version this packet unused [4144]
  3464. #elif PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
  3465. struct PACKET_ZC_SE_CASHSHOP_OPEN {
  3466. int16 packetType;
  3467. uint32 cashPoints;
  3468. uint32 kafraPoints;
  3469. } __attribute__((packed));
  3470. DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0845);
  3471. #endif
  3472. #if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
  3473. struct PACKET_CZ_NPC_EXPANDED_BARTER_CLOSE {
  3474. int16 packetType;
  3475. } __attribute__((packed));
  3476. DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_CLOSE, 0x0b58);
  3477. #endif
  3478. #if PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127
  3479. struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 {
  3480. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3481. uint32 nameid;
  3482. #else
  3483. uint16 nameid;
  3484. #endif
  3485. uint16 refine_level;
  3486. uint32 amount;
  3487. uint16 type;
  3488. } __attribute__((packed));
  3489. struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub {
  3490. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3491. uint32 nameid;
  3492. #else
  3493. uint16 nameid;
  3494. #endif
  3495. uint16 type;
  3496. uint32 amount;
  3497. uint32 weight;
  3498. uint32 index;
  3499. uint32 zeny;
  3500. uint32 currency_count;
  3501. #if defined(_MSC_VER)
  3502. // Workaround for fix Visual Studio bug (error C2233). Here should be currencies[]
  3503. struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 currencies[1];
  3504. #else
  3505. struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 currencies[];
  3506. #endif
  3507. } __attribute__((packed));
  3508. struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN {
  3509. int16 packetType;
  3510. int16 packetLength;
  3511. int32 items_count;
  3512. struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub items[];
  3513. } __attribute__((packed));
  3514. DEFINE_PACKET_HEADER(ZC_NPC_EXPANDED_BARTER_OPEN, 0x0b56);
  3515. #endif
  3516. #if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
  3517. struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE_sub {
  3518. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3519. uint32 itemId;
  3520. #else
  3521. uint16 itemId;
  3522. #endif
  3523. uint32 shopIndex;
  3524. uint32 amount;
  3525. } __attribute__((packed));
  3526. struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE {
  3527. int16 packetType;
  3528. int16 packetLength;
  3529. struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE_sub list[];
  3530. } __attribute__((packed));
  3531. DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_PURCHASE, 0x0b57);
  3532. #endif
  3533. #if PACKETVER >= 7
  3534. struct PACKET_ZC_STATE_CHANGE {
  3535. int16 packetType;
  3536. uint32 AID;
  3537. int16 bodyState;
  3538. int16 healthState;
  3539. int32 effectState;
  3540. int8 isPKModeON;
  3541. } __attribute__((packed));
  3542. DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0229);
  3543. #else
  3544. struct PACKET_ZC_STATE_CHANGE {
  3545. int16 PacketType;
  3546. uint32 AID;
  3547. int16 bodyState;
  3548. int16 healthState;
  3549. int16 effectState;
  3550. int8 isPKModeON;
  3551. } __attribute__((packed));
  3552. DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0119);
  3553. #endif
  3554. struct PACKET_ZC_AUTORUN_SKILL {
  3555. int16 packetType;
  3556. uint16 skill_id;
  3557. uint32 skill_type;
  3558. uint16 skill_lv;
  3559. uint16 skill_sp;
  3560. uint16 skill_range;
  3561. char skill_name[NAME_LENGTH];
  3562. char up_flag;
  3563. } __attribute__((packed));
  3564. DEFINE_PACKET_HEADER(ZC_AUTORUN_SKILL, 0x0147);
  3565. #if PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  3566. struct PACKET_ZC_LAPINEUPGRADE_OPEN {
  3567. int16 packetType;
  3568. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3569. uint32 itemId;
  3570. #else
  3571. uint16 itemId;
  3572. #endif
  3573. } __attribute__((packed));
  3574. DEFINE_PACKET_HEADER(ZC_LAPINEUPGRADE_OPEN, 0x0ab4);
  3575. struct PACKET_ZC_LAPINEUPGRADE_RESULT {
  3576. int16 packetType;
  3577. uint16 result;
  3578. } __attribute__((packed));
  3579. DEFINE_PACKET_HEADER(ZC_LAPINEUPGRADE_RESULT, 0x0ab7);
  3580. #endif // PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  3581. #if PACKETVER_MAIN_NUM >= 20170111 || PACKETVER_RE_NUM >= 20170111 || defined(PACKETVER_ZERO)
  3582. struct PACKET_CZ_LAPINEUPGRADE_CLOSE {
  3583. int16 packetType;
  3584. } __attribute__((packed));
  3585. DEFINE_PACKET_HEADER(CZ_LAPINEUPGRADE_CLOSE, 0x0ab5);
  3586. struct PACKET_CZ_LAPINEUPGRADE_MAKE_ITEM {
  3587. int16 packetType;
  3588. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3589. uint32 itemId;
  3590. #else
  3591. uint16 itemId;
  3592. #endif
  3593. uint16 index;
  3594. } __attribute__((packed));
  3595. DEFINE_PACKET_HEADER(CZ_LAPINEUPGRADE_MAKE_ITEM, 0x0ab6);
  3596. #endif // PACKETVER_MAIN_NUM >= 20170111 || PACKETVER_RE_NUM >= 20170111 || defined(PACKETVER_ZERO)
  3597. #if PACKETVER_MAIN_NUM >= 20120503 || PACKETVER_RE_NUM >= 20120502 || defined(PACKETVER_ZERO)
  3598. struct PACKET_ZC_PERSONAL_INFOMATION_SUB {
  3599. int8 type;
  3600. int32 exp;
  3601. int32 death;
  3602. int32 drop;
  3603. } __attribute__((packed));
  3604. struct PACKET_ZC_PERSONAL_INFOMATION {
  3605. int16 packetType;
  3606. int16 length;
  3607. int32 total_exp;
  3608. int32 total_death;
  3609. int32 total_drop;
  3610. struct PACKET_ZC_PERSONAL_INFOMATION_SUB details[];
  3611. } __attribute__((packed));
  3612. DEFINE_PACKET_HEADER(ZC_PERSONAL_INFOMATION, 0x097b);
  3613. #endif // PACKETVER_MAIN_NUM >= 20120503 || PACKETVER_RE_NUM >= 20120502 || defined(PACKETVER_ZERO)
  3614. #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
  3615. #pragma pack(pop)
  3616. #endif // not NetBSD < 6 / Solaris
  3617. #endif /* MAP_PACKETS_STRUCT_HPP */