packets_struct.hpp 156 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982
  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 < 4
  18. idle_unitType = 0x78,
  19. #elif PACKETVER < 7
  20. idle_unitType = 0x1d8,
  21. #elif PACKETVER < 20080102
  22. idle_unitType = 0x22a,
  23. #elif PACKETVER < 20091103
  24. idle_unitType = 0x2ee,
  25. #elif PACKETVER < 20101124
  26. idle_unitType = 0x7f9,
  27. #elif PACKETVER < 20120221
  28. idle_unitType = 0x857,
  29. #elif PACKETVER < 20131223
  30. idle_unitType = 0x915,
  31. #elif PACKETVER < 20150513
  32. idle_unitType = 0x9dd,
  33. #else
  34. idle_unitType = 0x9ff,
  35. #endif
  36. #if PACKETVER >= 20120618
  37. status_changeType = 0x983,
  38. #elif PACKETVER >= 20090121
  39. status_changeType = 0x43f,
  40. #else
  41. status_changeType = sc_notickType,/* 0x196 */
  42. #endif
  43. status_change2Type = 0x43f,
  44. status_change_endType = 0x196,
  45. #if PACKETVER < 20091103
  46. spawn_unit2Type = 0x7c,
  47. idle_unit2Type = 0x78,
  48. #endif
  49. #if PACKETVER < 20071113
  50. damageType = 0x8a,
  51. #elif PACKETVER < 20131223
  52. damageType = 0x2e1,
  53. #else
  54. damageType = 0x8c8,
  55. #endif
  56. #if PACKETVER < 4
  57. spawn_unitType = 0x79,
  58. #elif PACKETVER < 7
  59. spawn_unitType = 0x1d9,
  60. #elif PACKETVER < 20080102
  61. spawn_unitType = 0x22b,
  62. #elif PACKETVER < 20091103
  63. spawn_unitType = 0x2ed,
  64. #elif PACKETVER < 20101124
  65. spawn_unitType = 0x7f8,
  66. #elif PACKETVER < 20120221
  67. spawn_unitType = 0x858,
  68. #elif PACKETVER < 20131223
  69. spawn_unitType = 0x90f,
  70. #elif PACKETVER < 20150513
  71. spawn_unitType = 0x9dc,
  72. #else
  73. spawn_unitType = 0x9fe,
  74. #endif
  75. #if PACKETVER < 20080102
  76. authokType = 0x73,
  77. #elif PACKETVER < 20141022
  78. authokType = 0x2eb,
  79. // Some clients smaller than 20160330 cant be tested [4144]
  80. #elif PACKETVER < 20160330
  81. authokType = 0xa18,
  82. #else
  83. authokType = 0x2eb,
  84. #endif
  85. script_clearType = 0x8d6,
  86. package_item_announceType = 0x7fd,
  87. item_drop_announceType = 0x7fd,
  88. #if PACKETVER < 4
  89. unit_walkingType = 0x7b,
  90. #elif PACKETVER < 7
  91. unit_walkingType = 0x1da,
  92. #elif PACKETVER < 20080102
  93. unit_walkingType = 0x22c,
  94. #elif PACKETVER < 20091103
  95. unit_walkingType = 0x2ec,
  96. #elif PACKETVER < 20101124
  97. unit_walkingType = 0x7f7,
  98. #elif PACKETVER < 20120221
  99. unit_walkingType = 0x856,
  100. #elif PACKETVER < 20131223
  101. unit_walkingType = 0x914,
  102. #elif PACKETVER < 20150513
  103. unit_walkingType = 0x9db,
  104. #else
  105. unit_walkingType = 0x9fd,
  106. #endif
  107. bgqueue_ackType = 0x8d8,
  108. bgqueue_notice_deleteType = 0x8db,
  109. bgqueue_registerType = 0x8d7,
  110. bgqueue_updateinfoType = 0x8d9,
  111. bgqueue_checkstateType = 0x90a,
  112. bgqueue_revokereqType = 0x8da,
  113. bgqueue_battlebeginackType = 0x8e0,
  114. bgqueue_notify_entryType = 0x8d9,
  115. bgqueue_battlebeginsType = 0x8df,
  116. notify_bounditemType = 0x2d3,
  117. #if PACKETVER < 20110718
  118. skill_entryType = 0x11f,
  119. #elif PACKETVER < 20121212
  120. skill_entryType = 0x8c7,
  121. #elif PACKETVER < 20130731
  122. skill_entryType = 0x99f,
  123. #else
  124. skill_entryType = 0x9ca,
  125. #endif
  126. graffiti_entryType = 0x1c9,
  127. #if defined(PACKETVER_ZERO) || PACKETVER >= 20180418
  128. dropflooritemType = 0xadd,
  129. #elif PACKETVER > 20130000 /* not sure date */
  130. dropflooritemType = 0x84b,
  131. #else
  132. dropflooritemType = 0x9e,
  133. #endif
  134. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  135. inventorylistnormalType = 0xb09,
  136. #elif PACKETVER >= 20120925
  137. inventorylistnormalType = 0x991,
  138. #elif PACKETVER >= 20080102
  139. inventorylistnormalType = 0x2e8,
  140. #elif PACKETVER >= 20071002
  141. inventorylistnormalType = 0x1ee,
  142. #else
  143. inventorylistnormalType = 0xa3,
  144. #endif
  145. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  146. inventorylistequipType = 0xb39,
  147. #elif PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919
  148. inventorylistequipType = 0xb0a,
  149. #elif PACKETVER >= 20150226
  150. inventorylistequipType = 0xa0d,
  151. #elif PACKETVER >= 20120925
  152. inventorylistequipType = 0x992,
  153. #elif PACKETVER >= 20080102
  154. inventorylistequipType = 0x2d0,
  155. #elif PACKETVER >= 20071002
  156. inventorylistequipType = 0x295,
  157. #else
  158. inventorylistequipType = 0xa4,
  159. #endif
  160. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  161. storageListNormalType = 0xb09,
  162. #elif PACKETVER >= 20120925
  163. storageListNormalType = 0x995,
  164. #elif PACKETVER >= 20080102
  165. storageListNormalType = 0x2ea,
  166. #elif PACKETVER >= 20071002
  167. storageListNormalType = 0x295,
  168. #else
  169. storageListNormalType = 0xa5,
  170. #endif
  171. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  172. storageListEquipType = 0xb39,
  173. #elif PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
  174. storageListEquipType = 0xb0a,
  175. #elif PACKETVER >= 20150226
  176. storageListEquipType = 0xa10,
  177. #elif PACKETVER >= 20120925
  178. storageListEquipType = 0x996,
  179. #elif PACKETVER >= 20080102
  180. storageListEquipType = 0x2d1,
  181. #elif PACKETVER >= 20071002
  182. storageListEquipType = 0x296,
  183. #else
  184. storageListEquipType = 0xa6,
  185. #endif
  186. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  187. cartlistnormalType = 0xb09,
  188. #elif PACKETVER >= 20120925
  189. cartlistnormalType = 0x993,
  190. #elif PACKETVER >= 20080102
  191. cartlistnormalType = 0x2e9,
  192. #elif PACKETVER >= 20071002
  193. cartlistnormalType = 0x1ef,
  194. #else
  195. cartlistnormalType = 0x123,
  196. #endif
  197. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  198. cartlistequipType = 0xb39,
  199. #elif PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919
  200. cartlistequipType = 0xb0a,
  201. #elif PACKETVER >= 20150226
  202. cartlistequipType = 0xa0f,
  203. #elif PACKETVER >= 20120925
  204. cartlistequipType = 0x994,
  205. #elif PACKETVER >= 20080102
  206. cartlistequipType = 0x2d2,
  207. #elif PACKETVER >= 20071002
  208. cartlistequipType = 0x297,
  209. #else
  210. cartlistequipType = 0x122,
  211. #endif
  212. openvendingType = 0x136,
  213. #if PACKETVER >= 20120925
  214. equipitemType = 0x998,
  215. #else
  216. equipitemType = 0xa9,
  217. #endif
  218. #if PACKETVER >= 20120925
  219. unequipitemackType = 0x99a,
  220. #else
  221. unequipitemackType = 0xac,
  222. #endif
  223. notifybindonequip = 0x2d3,
  224. monsterhpType = 0x977,
  225. maptypeproperty2Type = 0x99b,
  226. #if PACKETVER >= 20131223 // version probably can be 20131030 [4144]
  227. wisendType = 0x9df,
  228. #else
  229. wisendType = 0x98,
  230. #endif
  231. partyleaderchangedType = 0x7fc,
  232. rouletteinfoackType = 0xa1c,
  233. roulettgenerateackType = 0xa20,
  234. roulettercvitemackType = 0xa22,
  235. #if PACKETVER >= 20141016
  236. achievementListType = 0xa23,
  237. achievementUpdateType = 0xa24,
  238. achievementRewardAckType = 0xa26,
  239. #endif // PACKETVER >= 20141016
  240. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  241. questListType = 0xaff, ///< ZC_ALL_QUEST_LIST4
  242. #elif PACKETVER >= 20150513 // [4144] 0x09f8 handling in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
  243. questListType = 0x9f8, ///< ZC_ALL_QUEST_LIST3
  244. #elif PACKETVER >= 20141022
  245. questListType = 0x97a, ///< ZC_ALL_QUEST_LIST2
  246. #else // PACKETVER < 20141022
  247. questListType = 0x2b1, ///< ZC_ALL_QUEST_LIST
  248. #endif // PACKETVER >= 20141022
  249. /* Rodex */
  250. rodexicon = 0x09E7,
  251. rodexwriteresult = 0x09ED,
  252. rodexnextpage = 0x09F0,
  253. rodexgetzeny = 0x09F2,
  254. rodexgetitem = 0x09F4,
  255. rodexdelete = 0x09F6,
  256. rodexremoveitem = 0x0A07,
  257. rodexopenwrite = 0x0A12,
  258. #if PACKETVER < 20160601
  259. rodexmailList = 0x09F0,
  260. #elif PACKETVER < 20170419
  261. rodexmailList = 0x0A7D,
  262. #else // PACKETVER >= 20170419
  263. rodexmailList = 0x0Ac2,
  264. #endif
  265. #if PACKETVER >= 20151223
  266. skillscale = 0xA41,
  267. #endif
  268. #if PACKETVER >= 20130821
  269. progressbarunit = 0x09D1,
  270. #endif
  271. #if PACKETVER >= 20171207
  272. partymemberinfo = 0x0ae4,
  273. partyinfo = 0x0ae5,
  274. #elif PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
  275. partymemberinfo = 0x0a43,
  276. partyinfo = 0x0a44,
  277. #else
  278. partymemberinfo = 0x01e9,
  279. partyinfo = 0x00fb,
  280. #endif
  281. #if PACKETVER >= 20120716
  282. clanOnlineCount = 0x0988, ///< ZC_NOTIFY_CLAN_CONNECTINFO
  283. clanLeave = 0x0989, ///< ZC_ACK_CLAN_LEAVE
  284. clanMessage = 0x098E, ///< ZC_NOTIFY_CLAN_CHAT
  285. #endif
  286. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  287. questAddType = 0xb0c,
  288. #elif PACKETVER >= 20150513 // [4144] 0x09f9 handled in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
  289. questAddType = 0x9f9,
  290. #else
  291. questAddType = 0x2b3,
  292. #endif // PACKETVER < 20150513
  293. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  294. questUpdateType = 0xafe,
  295. #elif PACKETVER >= 20150513
  296. questUpdateType = 0x9fa,
  297. #else
  298. questUpdateType = 0x2b5,
  299. #endif // PACKETVER < 20150513
  300. questUpdateType2 = 0x8fe,
  301. #if PACKETVER >= 20180627
  302. authError = 0xb02,
  303. #elif PACKETVER >= 20101123
  304. authError = 0x83e,
  305. #else
  306. authError = 0x6a,
  307. #endif
  308. #if PACKETVER >= 3
  309. useItemAckType = 0x1c8,
  310. #else
  311. useItemAckType = 0xa8,
  312. #endif
  313. #if PACKETVER >= 4
  314. sendLookType = 0x1d7,
  315. #else
  316. sendLookType = 0xc3,
  317. #endif
  318. #if PACKETVER >= 20141016
  319. buyingStoreUpdateItemType = 0x9e6,
  320. #else
  321. buyingStoreUpdateItemType = 0x81b,
  322. #endif
  323. reqName = 0x95,
  324. #if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
  325. skilWarpPointType = 0xabe,
  326. #else
  327. skilWarpPointType = 0x11c,
  328. #endif
  329. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  330. guildExpulsion = 0xa82,
  331. #elif PACKETVER >= 20100803
  332. guildExpulsion = 0x839,
  333. #else
  334. guildExpulsion = 0x15c,
  335. #endif
  336. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  337. guildLeave = 0xa83,
  338. #else
  339. guildLeave = 0x15a,
  340. #endif
  341. };
  342. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  343. DEFINE_PACKET_ID(ZC_PAR_4JOB_CHANGE, 0x0b25);
  344. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  345. #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
  346. #pragma pack(push, 1)
  347. #endif // not NetBSD < 6 / Solaris
  348. struct PACKET_ZC_PAR_CHANGE {
  349. int16 PacketType;
  350. uint16 varID;
  351. int32 count;
  352. } __attribute__((packed));
  353. DEFINE_PACKET_HEADER(ZC_PAR_CHANGE, 0x00b0);
  354. struct PACKET_ZC_LONGPAR_CHANGE {
  355. int16 PacketType;
  356. uint16 varID;
  357. int32 amount;
  358. } __attribute__((packed));
  359. DEFINE_PACKET_ID(ZC_LONGPAR_CHANGE, 0x00b1);
  360. struct PACKET_ZC_STATUS_CHANGE {
  361. int16 PacketType;
  362. uint16 statusID;
  363. uint8 value;
  364. } __attribute__((packed));
  365. DEFINE_PACKET_HEADER(ZC_STATUS_CHANGE, 0x00be);
  366. struct PACKET_ZC_NOTIFY_CARTITEM_COUNTINFO {
  367. int16 PacketType;
  368. int16 curCount;
  369. int16 maxCount;
  370. int32 curWeight;
  371. int32 maxWeight;
  372. } __attribute__((packed));
  373. DEFINE_PACKET_HEADER(ZC_NOTIFY_CARTITEM_COUNTINFO, 0x0121);
  374. struct PACKET_ZC_ATTACK_RANGE {
  375. int16 PacketType;
  376. int16 currentAttRange;
  377. } __attribute__((packed));
  378. DEFINE_PACKET_HEADER(ZC_ATTACK_RANGE, 0x013a);
  379. struct PACKET_ZC_COUPLESTATUS {
  380. int16 PacketType;
  381. uint32 statusType;
  382. int32 defaultStatus;
  383. int32 plusStatus;
  384. } __attribute__((packed));
  385. DEFINE_PACKET_ID(ZC_COUPLESTATUS, 0x0141);
  386. #if PACKETVER_MAIN_NUM >= 20170906 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
  387. struct PACKET_ZC_LONGLONGPAR_CHANGE {
  388. int16 PacketType;
  389. uint16 varID;
  390. int64 amount;
  391. } __attribute__((packed));
  392. DEFINE_PACKET_ID(ZC_LONGLONGPAR_CHANGE, 0x0acb);
  393. #endif // PACKETVER_MAIN_NUM >= 20170906 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
  394. /**
  395. * structs for data
  396. */
  397. struct EQUIPSLOTINFO {
  398. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  399. uint32 card[4];
  400. #else
  401. uint16 card[4];
  402. #endif
  403. } __attribute__((packed));
  404. struct NORMALITEM_INFO {
  405. int16 index;
  406. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  407. uint32 ITID;
  408. #else
  409. uint16 ITID;
  410. #endif
  411. uint8 type;
  412. #if PACKETVER < 20120925
  413. uint8 IsIdentified;
  414. #endif
  415. int16 count;
  416. #if PACKETVER >= 20120925
  417. uint32 WearState;
  418. #else
  419. uint16 WearState;
  420. #endif
  421. #if PACKETVER >= 5
  422. struct EQUIPSLOTINFO slot;
  423. #endif
  424. #if PACKETVER >= 20080102
  425. int32 HireExpireDate;
  426. #endif
  427. #if PACKETVER >= 20120925
  428. struct {
  429. uint8 IsIdentified : 1;
  430. uint8 PlaceETCTab : 1;
  431. uint8 SpareBits : 6;
  432. } Flag;
  433. #endif
  434. } __attribute__((packed));
  435. struct ItemOptions {
  436. int16 index;
  437. int16 value;
  438. uint8 param;
  439. } __attribute__((packed));
  440. // TODO split struct inside blocks of #if/#elif
  441. struct EQUIPITEM_INFO {
  442. int16 index;
  443. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  444. uint32 ITID;
  445. #else
  446. uint16 ITID;
  447. #endif
  448. uint8 type;
  449. #if PACKETVER < 20120925
  450. uint8 IsIdentified;
  451. #endif
  452. #if PACKETVER >= 20120925
  453. uint32 location;
  454. uint32 WearState;
  455. #else
  456. uint16 location;
  457. uint16 WearState;
  458. #endif
  459. #if PACKETVER < 20120925
  460. uint8 IsDamaged;
  461. #endif
  462. #if !(PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024)
  463. uint8 RefiningLevel;
  464. #endif // !(PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024)
  465. struct EQUIPSLOTINFO slot;
  466. #if PACKETVER >= 20071002
  467. int32 HireExpireDate;
  468. #endif
  469. #if PACKETVER >= 20080102
  470. uint16 bindOnEquipType;
  471. #endif
  472. #if PACKETVER >= 20100629
  473. uint16 wItemSpriteNumber;
  474. #endif
  475. #if PACKETVER >= 20150226
  476. uint8 option_count;
  477. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  478. #endif
  479. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  480. uint8 RefiningLevel;
  481. uint8 grade;
  482. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  483. #if PACKETVER >= 20120925
  484. struct {
  485. uint8 IsIdentified : 1;
  486. uint8 IsDamaged : 1;
  487. uint8 PlaceETCTab : 1;
  488. uint8 SpareBits : 5;
  489. } Flag;
  490. #endif
  491. } __attribute__((packed));
  492. struct packet_authok {
  493. int16 PacketType;
  494. uint32 startTime;
  495. uint8 PosDir[3];
  496. uint8 xSize;
  497. uint8 ySize;
  498. #if PACKETVER >= 20080102
  499. int16 font;
  500. #endif
  501. // Some clients smaller than 20160330 cant be tested [4144]
  502. #if PACKETVER >= 20141022 && PACKETVER < 20160330
  503. uint8 sex;
  504. #endif
  505. } __attribute__((packed));
  506. struct packet_monster_hp {
  507. int16 PacketType;
  508. uint32 GID;
  509. int32 HP;
  510. int32 MaxHP;
  511. } __attribute__((packed));
  512. struct packet_sc_notick {
  513. int16 PacketType;
  514. int16 index;
  515. uint32 AID;
  516. uint8 state;
  517. } __attribute__((packed));
  518. // TODO put struct under #ifdef/#elif
  519. // [4144] dates unconfirmed
  520. struct PACKET_ZC_ITEM_PICKUP_ACK {
  521. int16 PacketType;
  522. uint16 Index;
  523. uint16 count;
  524. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  525. uint32 nameid;
  526. #else
  527. uint16 nameid;
  528. #endif
  529. uint8 IsIdentified;
  530. uint8 IsDamaged;
  531. #if !(PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024)
  532. uint8 refiningLevel;
  533. #endif // !(PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024)
  534. struct EQUIPSLOTINFO slot;
  535. #if PACKETVER >= 20120925
  536. uint32 location;
  537. #else
  538. uint16 location;
  539. #endif
  540. uint8 type;
  541. uint8 result;
  542. #if PACKETVER >= 20061218
  543. int32 HireExpireDate;
  544. #endif
  545. #if PACKETVER >= 20071002
  546. uint16 bindOnEquipType;
  547. #endif
  548. #if PACKETVER >= 20150226
  549. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  550. #endif
  551. #if PACKETVER >= 20160921
  552. uint8 favorite;
  553. uint16 look;
  554. #endif
  555. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  556. uint8 refiningLevel;
  557. uint8 grade;
  558. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  559. } __attribute__((packed));
  560. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  561. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_ACK, 0x0b41);
  562. #elif PACKETVER >= 20160921
  563. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_ACK, 0x0a37);
  564. #elif PACKETVER >= 20150226
  565. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_ACK, 0x0a0c);
  566. #elif PACKETVER >= 20120925
  567. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_ACK, 0x0990);
  568. #elif PACKETVER >= 20071002
  569. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_ACK, 0x02d4);
  570. #elif PACKETVER >= 20061218
  571. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_ACK, 0x029a);
  572. #else
  573. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_ACK, 0x00a0);
  574. #endif
  575. struct packet_dropflooritem {
  576. int16 PacketType;
  577. uint32 ITAID;
  578. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  579. uint32 ITID;
  580. #else
  581. uint16 ITID;
  582. #endif
  583. #if PACKETVER >= 20130000 /* not sure date */
  584. uint16 type;
  585. #endif
  586. uint8 IsIdentified;
  587. int16 xPos;
  588. int16 yPos;
  589. uint8 subX;
  590. uint8 subY;
  591. int16 count;
  592. #if defined(PACKETVER_ZERO) || PACKETVER >= 20180418
  593. int8 showdropeffect;
  594. int16 dropeffectmode;
  595. #endif
  596. } __attribute__((packed));
  597. struct packet_idle_unit2 {
  598. #if PACKETVER < 20091103
  599. int16 PacketType;
  600. #if PACKETVER >= 20071106
  601. uint8 objecttype;
  602. #endif
  603. uint32 GID;
  604. int16 speed;
  605. int16 bodyState;
  606. int16 healthState;
  607. int16 effectState;
  608. int16 job;
  609. uint16 head;
  610. uint16 weapon;
  611. uint16 accessory;
  612. uint16 shield;
  613. uint16 accessory2;
  614. uint16 accessory3;
  615. int16 headpalette;
  616. int16 bodypalette;
  617. int16 headDir;
  618. uint32 GUID;
  619. int16 GEmblemVer;
  620. int16 honor;
  621. int16 virtue;
  622. uint8 isPKModeON;
  623. uint8 sex;
  624. uint8 PosDir[3];
  625. uint8 xSize;
  626. uint8 ySize;
  627. uint8 state;
  628. int16 clevel;
  629. #else // ! PACKETVER < 20091103
  630. UNAVAILABLE_STRUCT;
  631. #endif // PACKETVER < 20091103
  632. } __attribute__((packed));
  633. struct packet_spawn_unit2 {
  634. #if PACKETVER < 20091103
  635. int16 PacketType;
  636. #if PACKETVER >= 20071106
  637. uint8 objecttype;
  638. #endif
  639. uint32 GID;
  640. int16 speed;
  641. int16 bodyState;
  642. int16 healthState;
  643. int16 effectState;
  644. uint16 head;
  645. uint16 weapon;
  646. uint16 accessory;
  647. int16 job;
  648. uint16 shield;
  649. uint16 accessory2;
  650. uint16 accessory3;
  651. int16 headpalette;
  652. int16 bodypalette;
  653. int16 headDir;
  654. uint8 isPKModeON;
  655. uint8 sex;
  656. uint8 PosDir[3];
  657. uint8 xSize;
  658. uint8 ySize;
  659. #else // ! PACKETVER < 20091103
  660. UNAVAILABLE_STRUCT;
  661. #endif // PACKETVER < 20091103
  662. } __attribute__((packed));
  663. struct packet_spawn_unit {
  664. int16 PacketType;
  665. #if PACKETVER >= 20091103
  666. int16 PacketLength;
  667. uint8 objecttype;
  668. #endif
  669. #if PACKETVER >= 20131223
  670. uint32 AID;
  671. #endif
  672. uint32 GID;
  673. int16 speed;
  674. int16 bodyState;
  675. int16 healthState;
  676. #if PACKETVER < 20080102
  677. int16 effectState;
  678. #else
  679. int32 effectState;
  680. #endif
  681. int16 job;
  682. uint16 head;
  683. #if PACKETVER < 7
  684. uint16 weapon;
  685. #else
  686. uint32 weapon;
  687. #endif
  688. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  689. uint32 shield;
  690. #endif
  691. uint16 accessory;
  692. #if PACKETVER < 7
  693. uint16 shield;
  694. #endif
  695. uint16 accessory2;
  696. uint16 accessory3;
  697. int16 headpalette;
  698. int16 bodypalette;
  699. int16 headDir;
  700. #if PACKETVER >= 20101124
  701. uint16 robe;
  702. #endif
  703. uint32 GUID;
  704. int16 GEmblemVer;
  705. int16 honor;
  706. #if PACKETVER > 7
  707. int32 virtue;
  708. #else
  709. int16 virtue;
  710. #endif
  711. uint8 isPKModeON;
  712. uint8 sex;
  713. uint8 PosDir[3];
  714. uint8 xSize;
  715. uint8 ySize;
  716. int16 clevel;
  717. #if PACKETVER >= 20080102
  718. int16 font;
  719. #endif
  720. #if PACKETVER >= 20120221
  721. int32 maxHP;
  722. int32 HP;
  723. uint8 isBoss;
  724. #endif
  725. #if PACKETVER >= 20150513
  726. int16 body;
  727. #endif
  728. /* Might be earlier, this is when the named item bug began */
  729. #if PACKETVER >= 20131223
  730. char name[NAME_LENGTH];
  731. #endif
  732. } __attribute__((packed));
  733. struct packet_unit_walking {
  734. int16 PacketType;
  735. #if PACKETVER >= 20091103
  736. int16 PacketLength;
  737. #endif
  738. #if PACKETVER >= 20071106
  739. uint8 objecttype;
  740. #endif
  741. #if PACKETVER >= 20131223
  742. uint32 AID;
  743. #endif
  744. uint32 GID;
  745. int16 speed;
  746. int16 bodyState;
  747. int16 healthState;
  748. #if PACKETVER < 7
  749. int16 effectState;
  750. #else
  751. int32 effectState;
  752. #endif
  753. int16 job;
  754. uint16 head;
  755. #if PACKETVER < 7
  756. uint16 weapon;
  757. #else
  758. uint32 weapon;
  759. #endif
  760. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  761. uint32 shield;
  762. #endif
  763. uint16 accessory;
  764. uint32 moveStartTime;
  765. #if PACKETVER < 7
  766. uint16 shield;
  767. #endif
  768. uint16 accessory2;
  769. uint16 accessory3;
  770. int16 headpalette;
  771. int16 bodypalette;
  772. int16 headDir;
  773. #if PACKETVER >= 20101124
  774. uint16 robe;
  775. #endif
  776. uint32 GUID;
  777. int16 GEmblemVer;
  778. int16 honor;
  779. #if PACKETVER > 7
  780. int32 virtue;
  781. #else
  782. int16 virtue;
  783. #endif
  784. uint8 isPKModeON;
  785. uint8 sex;
  786. uint8 MoveData[6];
  787. uint8 xSize;
  788. uint8 ySize;
  789. int16 clevel;
  790. #if PACKETVER >= 20080102
  791. int16 font;
  792. #endif
  793. #if PACKETVER >= 20120221
  794. int32 maxHP;
  795. int32 HP;
  796. uint8 isBoss;
  797. #endif
  798. #if PACKETVER >= 20150513
  799. uint16 body;
  800. #endif
  801. /* Might be earlier, this is when the named item bug began */
  802. #if PACKETVER >= 20131223
  803. char name[NAME_LENGTH];
  804. #endif
  805. } __attribute__((packed));
  806. struct packet_idle_unit {
  807. int16 PacketType;
  808. #if PACKETVER >= 20091103
  809. int16 PacketLength;
  810. uint8 objecttype;
  811. #endif
  812. #if PACKETVER >= 20131223
  813. uint32 AID;
  814. #endif
  815. uint32 GID;
  816. int16 speed;
  817. int16 bodyState;
  818. int16 healthState;
  819. #if PACKETVER < 20080102
  820. int16 effectState;
  821. #else
  822. int32 effectState;
  823. #endif
  824. int16 job;
  825. uint16 head;
  826. #if PACKETVER < 7
  827. uint16 weapon;
  828. #else
  829. uint32 weapon;
  830. #endif
  831. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  832. uint32 shield;
  833. #endif
  834. uint16 accessory;
  835. #if PACKETVER < 7
  836. uint16 shield;
  837. #endif
  838. uint16 accessory2;
  839. uint16 accessory3;
  840. int16 headpalette;
  841. int16 bodypalette;
  842. int16 headDir;
  843. #if PACKETVER >= 20101124
  844. uint16 robe;
  845. #endif
  846. uint32 GUID;
  847. int16 GEmblemVer;
  848. int16 honor;
  849. #if PACKETVER > 7
  850. int32 virtue;
  851. #else
  852. int16 virtue;
  853. #endif
  854. uint8 isPKModeON;
  855. uint8 sex;
  856. uint8 PosDir[3];
  857. uint8 xSize;
  858. uint8 ySize;
  859. uint8 state;
  860. int16 clevel;
  861. #if PACKETVER >= 20080102
  862. int16 font;
  863. #endif
  864. #if PACKETVER >= 20120221
  865. int32 maxHP;
  866. int32 HP;
  867. uint8 isBoss;
  868. #endif
  869. #if PACKETVER >= 20150513
  870. uint16 body;
  871. #endif
  872. /* Might be earlier, this is when the named item bug began */
  873. #if PACKETVER >= 20131223
  874. char name[NAME_LENGTH];
  875. #endif
  876. } __attribute__((packed));
  877. struct packet_status_change {
  878. int16 PacketType;
  879. int16 index;
  880. uint32 AID;
  881. uint8 state;
  882. #if PACKETVER >= 20120618
  883. uint32 Total;
  884. #endif
  885. #if PACKETVER >= 20090121
  886. uint32 Left;
  887. int32 val1;
  888. int32 val2;
  889. int32 val3;
  890. #endif
  891. } __attribute__((packed));
  892. struct packet_status_change_end {
  893. int16 PacketType;
  894. int16 index;
  895. uint32 AID;
  896. uint8 state;
  897. } __attribute__((packed));
  898. struct packet_status_change2 {
  899. int16 PacketType;
  900. int16 index;
  901. uint32 AID;
  902. uint8 state;
  903. uint32 Left;
  904. int32 val1;
  905. int32 val2;
  906. int32 val3;
  907. } __attribute__((packed));
  908. struct packet_maptypeproperty2 {
  909. int16 PacketType;
  910. int16 type;
  911. struct {
  912. uint32 party : 1; // Show attack cursor on non-party members (PvP)
  913. uint32 guild : 1; // Show attack cursor on non-guild members (GvG)
  914. uint32 siege : 1; // Show emblem over characters' heads when in GvG (WoE castle)
  915. uint32 mineffect : 1; // Automatically enable /mineffect
  916. uint32 nolockon : 1; // TODO: What does this do? (shows attack cursor on non-party members)
  917. uint32 countpk : 1; /// Show the PvP counter
  918. uint32 nopartyformation : 1; /// Prevent party creation/modification
  919. uint32 bg : 1; // TODO: What does this do? Probably related to Battlegrounds, but I'm not sure on the effect
  920. uint32 nocostume : 1; /// Does not show costume sprite.
  921. uint32 usecart : 1; /// Allow opening cart inventory
  922. uint32 summonstarmiracle : 1; // TODO: What does this do? Related to Taekwon Masters, but I have no idea.
  923. uint32 SpareBits : 21; /// Currently ignored, reserved for future updates
  924. } flag;
  925. } __attribute__((packed));
  926. struct packet_bgqueue_ack {
  927. int16 PacketType;
  928. uint8 type;
  929. char bg_name[NAME_LENGTH];
  930. } __attribute__((packed));
  931. struct packet_bgqueue_notice_delete {
  932. int16 PacketType;
  933. uint8 type;
  934. char bg_name[NAME_LENGTH];
  935. } __attribute__((packed));
  936. struct packet_bgqueue_register {
  937. int16 PacketType;
  938. int16 type;
  939. char bg_name[NAME_LENGTH];
  940. } __attribute__((packed));
  941. struct packet_bgqueue_update_info {
  942. int16 PacketType;
  943. char bg_name[NAME_LENGTH];
  944. int32 position;
  945. } __attribute__((packed));
  946. struct packet_bgqueue_checkstate {
  947. int16 PacketType;
  948. char bg_name[NAME_LENGTH];
  949. } __attribute__((packed));
  950. struct packet_bgqueue_revoke_req {
  951. int16 PacketType;
  952. char bg_name[NAME_LENGTH];
  953. } __attribute__((packed));
  954. struct packet_bgqueue_battlebegin_ack {
  955. int16 PacketType;
  956. uint8 result;
  957. char bg_name[NAME_LENGTH];
  958. char game_name[NAME_LENGTH];
  959. } __attribute__((packed));
  960. struct packet_bgqueue_notify_entry {
  961. int16 PacketType;
  962. char name[NAME_LENGTH];
  963. int32 position;
  964. } __attribute__((packed));
  965. struct packet_bgqueue_battlebegins {
  966. int16 PacketType;
  967. char bg_name[NAME_LENGTH];
  968. char game_name[NAME_LENGTH];
  969. } __attribute__((packed));
  970. struct packet_script_clear {
  971. int16 PacketType;
  972. uint32 NpcID;
  973. } __attribute__((packed));
  974. #if PACKETVER_MAIN_NUM >= 20220518 || PACKETVER_ZERO_NUM >= 20220518
  975. struct PACKET_ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN_item {
  976. int16 PacketType;
  977. int16 PacketLength;
  978. uint8 type;
  979. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  980. uint32 ItemID;
  981. #else
  982. uint16 ItemID;
  983. #endif
  984. int8 len;
  985. char Name[NAME_LENGTH];
  986. int8 boxItemID_len;
  987. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  988. uint32 BoxItemID;
  989. #else
  990. uint16 BoxItemID;
  991. #endif
  992. int8 refineLevel_len;
  993. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  994. uint32 refineLevel;
  995. #else
  996. uint16 refineLevel;
  997. #endif
  998. } __attribute__((packed));
  999. DEFINE_PACKET_HEADER(ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN_item, 0x0bba)
  1000. #elif PACKETVER >= 20091201
  1001. /* made possible thanks to Yommy!! */
  1002. struct PACKET_ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN_item {
  1003. int16 PacketType;
  1004. int16 PacketLength;
  1005. uint8 type;
  1006. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1007. uint32 ItemID;
  1008. #else
  1009. uint16 ItemID;
  1010. #endif
  1011. int8 len;
  1012. char Name[NAME_LENGTH];
  1013. int8 boxItemID_len;
  1014. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1015. uint32 BoxItemID;
  1016. #else
  1017. uint16 BoxItemID;
  1018. #endif
  1019. } __attribute__((packed));
  1020. DEFINE_PACKET_HEADER(ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN_item, 0x07fd)
  1021. #endif
  1022. /* made possible thanks to Yommy!! */
  1023. struct packet_item_drop_announce {
  1024. int16 PacketType;
  1025. int16 PacketLength;
  1026. uint8 type;
  1027. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1028. uint32 ItemID;
  1029. #else
  1030. uint16 ItemID;
  1031. #endif
  1032. int8 len;
  1033. char Name[NAME_LENGTH];
  1034. char monsterNameLen;
  1035. char monsterName[NAME_LENGTH];
  1036. } __attribute__((packed));
  1037. struct packet_cart_additem_ack {
  1038. int16 PacketType;
  1039. int8 result;
  1040. } __attribute__((packed));
  1041. struct packet_banking_check {
  1042. int16 PacketType;
  1043. int64 Money;
  1044. int16 Reason;
  1045. } __attribute__((packed));
  1046. struct packet_banking_deposit_req {
  1047. int16 PacketType;
  1048. uint32 AID;
  1049. int32 Money;
  1050. } __attribute__((packed));
  1051. struct packet_banking_withdraw_req {
  1052. int16 PacketType;
  1053. uint32 AID;
  1054. int32 Money;
  1055. } __attribute__((packed));
  1056. struct packet_banking_deposit_ack {
  1057. int16 PacketType;
  1058. int16 Reason;
  1059. int64 Money;
  1060. int32 Balance;
  1061. } __attribute__((packed));
  1062. struct packet_banking_withdraw_ack {
  1063. int16 PacketType;
  1064. int16 Reason;
  1065. int64 Money;
  1066. int32 Balance;
  1067. } __attribute__((packed));
  1068. /* Roulette System [Yommy/Hercules] */
  1069. struct packet_roulette_open_ack {
  1070. int16 PacketType;
  1071. int8 Result;
  1072. int32 Serial;
  1073. int8 Step;
  1074. int8 Idx;
  1075. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1076. uint32 AdditionItemID;
  1077. #else
  1078. uint16 AdditionItemID;
  1079. #endif
  1080. int32 GoldPoint;
  1081. int32 SilverPoint;
  1082. int32 BronzePoint;
  1083. } __attribute__((packed));
  1084. struct packet_roulette_info_ack {
  1085. int16 PacketType;
  1086. int16 PacketLength;
  1087. uint32 RouletteSerial;
  1088. struct {
  1089. uint16 Row;
  1090. uint16 Position;
  1091. #if PACKETVER >= 20180511
  1092. uint32 ItemId;
  1093. uint16 Count;
  1094. uint16 unused;
  1095. #else
  1096. uint16 ItemId;
  1097. uint16 Count;
  1098. #endif
  1099. } ItemInfo[42];
  1100. } __attribute__((packed));
  1101. struct packet_roulette_close_ack {
  1102. int16 PacketType;
  1103. uint8 Result;
  1104. } __attribute__((packed));
  1105. struct packet_roulette_generate_ack {
  1106. int16 PacketType;
  1107. uint8 Result;
  1108. uint16 Step;
  1109. uint16 Idx;
  1110. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1111. uint32 AdditionItemID;
  1112. #else
  1113. uint16 AdditionItemID;
  1114. #endif
  1115. int32 RemainGold;
  1116. int32 RemainSilver;
  1117. int32 RemainBronze;
  1118. } __attribute__((packed));
  1119. struct packet_roulette_itemrecv_req {
  1120. int16 PacketType;
  1121. uint8 Condition;
  1122. } __attribute__((packed));
  1123. struct packet_roulette_itemrecv_ack {
  1124. int16 PacketType;
  1125. uint8 Result;
  1126. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1127. uint32 AdditionItemID;
  1128. #else
  1129. uint16 AdditionItemID;
  1130. #endif
  1131. } __attribute__((packed));
  1132. struct packet_itemlist_normal {
  1133. int16 PacketType;
  1134. int16 PacketLength;
  1135. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1136. uint8 invType;
  1137. #endif
  1138. struct NORMALITEM_INFO list[MAX_ITEMLIST];
  1139. } __attribute__((packed));
  1140. struct packet_itemlist_equip {
  1141. int16 PacketType;
  1142. int16 PacketLength;
  1143. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1144. uint8 invType;
  1145. #endif
  1146. struct EQUIPITEM_INFO list[MAX_ITEMLIST];
  1147. } __attribute__((packed));
  1148. struct ZC_STORE_ITEMLIST_NORMAL {
  1149. int16 PacketType;
  1150. int16 PacketLength;
  1151. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1152. uint8 invType;
  1153. #endif
  1154. #if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002
  1155. char name[NAME_LENGTH];
  1156. #endif
  1157. struct NORMALITEM_INFO list[MAX_ITEMLIST];
  1158. } __attribute__((packed));
  1159. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1160. struct PACKET_ZC_INVENTORY_START {
  1161. int16 packetType;
  1162. #if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1163. int16 packetLength;
  1164. #endif
  1165. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1166. uint8 invType;
  1167. #endif
  1168. #if PACKETVER_RE_NUM >= 20180919 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1169. char name[];
  1170. #else
  1171. char name[NAME_LENGTH];
  1172. #endif
  1173. } __attribute__((packed));
  1174. DEFINE_PACKET_HEADER(ZC_INVENTORY_START, 0x0b08);
  1175. #endif // PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1176. #if PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1177. struct PACKET_ZC_INVENTORY_END {
  1178. int16 packetType;
  1179. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1180. uint8 invType;
  1181. #endif
  1182. char flag;
  1183. } __attribute__((packed));
  1184. DEFINE_PACKET_HEADER(ZC_INVENTORY_END, 0x0b0b);
  1185. #endif // PACKETVER_RE_NUM >= 20180829 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1186. struct ZC_STORE_ITEMLIST_EQUIP {
  1187. int16 PacketType;
  1188. int16 PacketLength;
  1189. #if PACKETVER_RE_NUM >= 20180912 || PACKETVER_ZERO_NUM >= 20180919 || PACKETVER_MAIN_NUM >= 20181002
  1190. uint8 invType;
  1191. #endif
  1192. #if PACKETVER >= 20120925 && PACKETVER_RE_NUM < 20180829 && PACKETVER_ZERO_NUM < 20180919 && PACKETVER_MAIN_NUM < 20181002
  1193. char name[NAME_LENGTH];
  1194. #endif
  1195. struct EQUIPITEM_INFO list[MAX_ITEMLIST];
  1196. } __attribute__((packed));
  1197. struct packet_equip_item {
  1198. int16 PacketType;
  1199. uint16 index;
  1200. #if PACKETVER >= 20120925
  1201. uint32 wearLocation;
  1202. #else
  1203. uint16 wearLocation;
  1204. #endif
  1205. } __attribute__((packed));
  1206. #if PACKETVER_MAIN_NUM >= 20121205 || PACKETVER_RE_NUM >= 20121107 || defined(PACKETVER_ZERO)
  1207. struct PACKET_ZC_REQ_WEAR_EQUIP_ACK {
  1208. int16 PacketType;
  1209. uint16 index;
  1210. uint32 wearLocation;
  1211. uint16 wItemSpriteNumber;
  1212. uint8 result;
  1213. } __attribute__((packed));
  1214. DEFINE_PACKET_HEADER(ZC_REQ_WEAR_EQUIP_ACK, 0x0999)
  1215. #elif PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20100629
  1216. struct PACKET_ZC_REQ_WEAR_EQUIP_ACK {
  1217. int16 PacketType;
  1218. uint16 index;
  1219. uint16 wearLocation;
  1220. uint16 wItemSpriteNumber;
  1221. uint8 result;
  1222. } __attribute__((packed));
  1223. DEFINE_PACKET_HEADER(ZC_REQ_WEAR_EQUIP_ACK, 0x00aa)
  1224. #else // PACKETVER_MAIN_NUM >= 20121205 || PACKETVER_RE_NUM >= 20121107 || defined(PACKETVER_ZERO)
  1225. struct PACKET_ZC_REQ_WEAR_EQUIP_ACK {
  1226. int16 PacketType;
  1227. uint16 index;
  1228. uint16 wearLocation;
  1229. uint8 result;
  1230. } __attribute__((packed));
  1231. DEFINE_PACKET_HEADER(ZC_REQ_WEAR_EQUIP_ACK, 0x00aa)
  1232. #endif // PACKETVER_MAIN_NUM >= 20121205 || PACKETVER_RE_NUM >= 20121107 || defined(PACKETVER_ZERO)
  1233. struct packet_unequipitem_ack {
  1234. int16 PacketType;
  1235. uint16 index;
  1236. #if PACKETVER >= 20120925
  1237. uint32 wearLocation;
  1238. #else
  1239. uint16 wearLocation;
  1240. #endif
  1241. uint8 result;
  1242. } __attribute__((packed));
  1243. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  1244. struct PACKET_ZC_EQUIPWIN_MICROSCOPE {
  1245. int16 PacketType;
  1246. int16 PacketLength;
  1247. char characterName[NAME_LENGTH];
  1248. int16 job;
  1249. int16 head;
  1250. int16 accessory;
  1251. int16 accessory2;
  1252. int16 accessory3;
  1253. int16 robe;
  1254. int16 headpalette;
  1255. int16 bodypalette;
  1256. int16 body2;
  1257. uint8 sex;
  1258. struct EQUIPITEM_INFO list[];
  1259. } __attribute__((packed));
  1260. DEFINE_PACKET_HEADER(ZC_EQUIPWIN_MICROSCOPE, 0x0b37);
  1261. #elif PACKETVER_MAIN_NUM >= 20180801 || PACKETVER_RE_NUM >= 20180801 || PACKETVER_ZERO_NUM >= 20180808
  1262. struct PACKET_ZC_EQUIPWIN_MICROSCOPE {
  1263. int16 PacketType;
  1264. int16 PacketLength;
  1265. char characterName[NAME_LENGTH];
  1266. int16 job;
  1267. int16 head;
  1268. int16 accessory;
  1269. int16 accessory2;
  1270. int16 accessory3;
  1271. int16 robe;
  1272. int16 headpalette;
  1273. int16 bodypalette;
  1274. int16 body2;
  1275. uint8 sex;
  1276. struct EQUIPITEM_INFO list[];
  1277. } __attribute__((packed));
  1278. DEFINE_PACKET_HEADER(ZC_EQUIPWIN_MICROSCOPE, 0x0b03);
  1279. #elif PACKETVER >= 20140820
  1280. struct PACKET_ZC_EQUIPWIN_MICROSCOPE {
  1281. int16 PacketType;
  1282. int16 PacketLength;
  1283. char characterName[NAME_LENGTH];
  1284. int16 job;
  1285. int16 head;
  1286. int16 accessory;
  1287. int16 accessory2;
  1288. int16 accessory3;
  1289. int16 robe;
  1290. int16 headpalette;
  1291. int16 bodypalette;
  1292. uint8 sex;
  1293. struct EQUIPITEM_INFO list[];
  1294. } __attribute__((packed));
  1295. DEFINE_PACKET_HEADER(ZC_EQUIPWIN_MICROSCOPE, 0x0a2d);
  1296. #elif PACKETVER_MAIN_NUM >= 20121205 || PACKETVER_RE_NUM >= 20121107
  1297. struct PACKET_ZC_EQUIPWIN_MICROSCOPE {
  1298. int16 PacketType;
  1299. int16 PacketLength;
  1300. char characterName[NAME_LENGTH];
  1301. int16 job;
  1302. int16 head;
  1303. int16 accessory;
  1304. int16 accessory2;
  1305. int16 accessory3;
  1306. int16 robe;
  1307. int16 headpalette;
  1308. int16 bodypalette;
  1309. uint8 sex;
  1310. struct EQUIPITEM_INFO list[];
  1311. } __attribute__((packed));
  1312. DEFINE_PACKET_HEADER(ZC_EQUIPWIN_MICROSCOPE, 0x0997);
  1313. #elif PACKETVER_MAIN_NUM >= 20111207 || PACKETVER_RE_NUM >= 20111122
  1314. struct PACKET_ZC_EQUIPWIN_MICROSCOPE {
  1315. int16 PacketType;
  1316. int16 PacketLength;
  1317. char characterName[NAME_LENGTH];
  1318. int16 job;
  1319. int16 head;
  1320. int16 accessory;
  1321. int16 accessory2;
  1322. int16 accessory3;
  1323. int16 robe;
  1324. int16 headpalette;
  1325. int16 bodypalette;
  1326. uint8 sex;
  1327. struct EQUIPITEM_INFO list[];
  1328. } __attribute__((packed));
  1329. DEFINE_PACKET_HEADER(ZC_EQUIPWIN_MICROSCOPE, 0x0906);
  1330. #elif PACKETVER >= 20101123
  1331. struct PACKET_ZC_EQUIPWIN_MICROSCOPE {
  1332. int16 PacketType;
  1333. int16 PacketLength;
  1334. char characterName[NAME_LENGTH];
  1335. int16 job;
  1336. int16 head;
  1337. int16 accessory;
  1338. int16 accessory2;
  1339. int16 accessory3;
  1340. int16 robe;
  1341. int16 headpalette;
  1342. int16 bodypalette;
  1343. uint8 sex;
  1344. struct EQUIPITEM_INFO list[];
  1345. } __attribute__((packed));
  1346. DEFINE_PACKET_HEADER(ZC_EQUIPWIN_MICROSCOPE, 0x0859);
  1347. #elif PACKETVER_AD_NUM >= 20071211 || PACKETVER_SAK_NUM >= 20071127 || PACKETVER_MAIN_NUM >= 20071211 || defined(PACKETVER_RE)
  1348. struct PACKET_ZC_EQUIPWIN_MICROSCOPE {
  1349. int16 PacketType;
  1350. int16 PacketLength;
  1351. char characterName[NAME_LENGTH];
  1352. int16 job;
  1353. int16 head;
  1354. int16 accessory;
  1355. int16 accessory2;
  1356. int16 accessory3;
  1357. int16 headpalette;
  1358. int16 bodypalette;
  1359. uint8 sex;
  1360. struct EQUIPITEM_INFO list[];
  1361. } __attribute__((packed));
  1362. DEFINE_PACKET_HEADER(ZC_EQUIPWIN_MICROSCOPE, 0x02d7);
  1363. #endif
  1364. struct packet_notify_bounditem {
  1365. int16 PacketType;
  1366. uint16 index;
  1367. } __attribute__((packed));
  1368. struct packet_skill_entry {
  1369. int16 PacketType;
  1370. #if PACKETVER >= 20110718
  1371. int16 PacketLength;
  1372. #endif
  1373. uint32 AID;
  1374. uint32 creatorAID;
  1375. int16 xPos;
  1376. int16 yPos;
  1377. #if PACKETVER >= 20121212
  1378. int32 job;
  1379. #else
  1380. uint8 job;
  1381. #endif
  1382. #if PACKETVER >= 20110718
  1383. int8 RadiusRange;
  1384. #endif
  1385. uint8 isVisible;
  1386. #if PACKETVER >= 20130731
  1387. uint8 level;
  1388. #endif
  1389. } __attribute__((packed));
  1390. struct packet_graffiti_entry {
  1391. int16 PacketType;
  1392. uint32 AID;
  1393. uint32 creatorAID;
  1394. int16 xPos;
  1395. int16 yPos;
  1396. uint8 job;
  1397. uint8 isVisible;
  1398. uint8 isContens;
  1399. char msg[80];
  1400. } __attribute__((packed));
  1401. struct packet_damage {
  1402. int16 PacketType;
  1403. uint32 GID;
  1404. uint32 targetGID;
  1405. uint32 startTime;
  1406. int32 attackMT;
  1407. int32 attackedMT;
  1408. #if PACKETVER < 20071113
  1409. int16 damage;
  1410. #else
  1411. int32 damage;
  1412. #endif
  1413. #if PACKETVER >= 20131223
  1414. uint8 is_sp_damaged;
  1415. #endif
  1416. int16 count;
  1417. uint8 action;
  1418. #if PACKETVER < 20071113
  1419. int16 leftDamage;
  1420. #else
  1421. int32 leftDamage;
  1422. #endif
  1423. } __attribute__((packed));
  1424. struct packet_gm_monster_item {
  1425. int16 PacketType;
  1426. #if PACKETVER >= 20131218
  1427. char str[100];
  1428. #else
  1429. char str[24];
  1430. #endif
  1431. } __attribute__((packed));
  1432. #if PACKETVER_MAIN_NUM >= 20130911 || PACKETVER_RE_NUM >= 20130911 || defined(PACKETVER_ZERO)
  1433. struct PACKET_CZ_NPC_MARKET_PURCHASE_sub {
  1434. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1435. uint32 ITID;
  1436. #else
  1437. uint16 ITID;
  1438. #endif
  1439. int32 qty;
  1440. } __attribute__((packed));
  1441. struct PACKET_CZ_NPC_MARKET_PURCHASE {
  1442. int16 PacketType;
  1443. int16 PacketLength;
  1444. struct PACKET_CZ_NPC_MARKET_PURCHASE_sub list[];
  1445. } __attribute__((packed));
  1446. DEFINE_PACKET_HEADER(CZ_NPC_MARKET_PURCHASE, 0x09d6)
  1447. #endif
  1448. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  1449. struct PACKET_ZC_NPC_MARKET_OPEN_sub {
  1450. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1451. uint32 nameid;
  1452. #else
  1453. uint16 nameid;
  1454. #endif
  1455. uint8 type;
  1456. uint32 price;
  1457. uint32 qty;
  1458. uint16 weight;
  1459. uint32 location;
  1460. } __attribute__((packed));
  1461. struct PACKET_ZC_NPC_MARKET_OPEN {
  1462. int16 packetType;
  1463. int16 packetLength;
  1464. struct PACKET_ZC_NPC_MARKET_OPEN_sub list[];
  1465. } __attribute__((packed));
  1466. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_OPEN, 0x0b7a);
  1467. #elif PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
  1468. /* inner struct figured by Ind after some annoying hour of debugging (data Thanks to Yommy) */
  1469. struct PACKET_ZC_NPC_MARKET_OPEN_sub {
  1470. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1471. uint32 nameid;
  1472. #else
  1473. uint16 nameid;
  1474. #endif
  1475. uint8 type;
  1476. uint32 price;
  1477. uint32 qty;
  1478. uint16 weight;
  1479. } __attribute__((packed));
  1480. struct PACKET_ZC_NPC_MARKET_OPEN {
  1481. int16 packetType;
  1482. int16 packetLength;
  1483. struct PACKET_ZC_NPC_MARKET_OPEN_sub list[];
  1484. } __attribute__((packed));
  1485. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_OPEN, 0x09d5);
  1486. #endif
  1487. struct packet_wis_end {
  1488. int16 PacketType;
  1489. int8 result;
  1490. #if PACKETVER >= 20131223
  1491. uint32 AID;
  1492. #endif
  1493. } __attribute__((packed));
  1494. struct packet_party_leader_changed {
  1495. int16 PacketType;
  1496. uint32 prev_leader_aid;
  1497. uint32 new_leader_aid;
  1498. } __attribute__((packed));
  1499. #ifdef HOTKEY_SAVING
  1500. struct hotkey_data {
  1501. int8 isSkill; // 0: Item, 1:Skill
  1502. uint32 id; // Item/Skill ID
  1503. int16 count; // Item Quantity/Skill Level
  1504. } __attribute__((packed));
  1505. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
  1506. #define MAX_HOTKEYS_PACKET 38
  1507. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1508. int16 packetType;
  1509. int8 rotate;
  1510. int16 tab;
  1511. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1512. } __attribute__((packed));
  1513. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x0b20);
  1514. #elif PACKETVER_MAIN_NUM >= 20141022 || PACKETVER_RE_NUM >= 20141015 || defined(PACKETVER_ZERO)
  1515. #define MAX_HOTKEYS_PACKET 38
  1516. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1517. int16 packetType;
  1518. int8 rotate;
  1519. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1520. } __attribute__((packed));
  1521. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x0a00);
  1522. #elif PACKETVER_MAIN_NUM >= 20090617 || PACKETVER_RE_NUM >= 20090617 || PACKETVER_SAK_NUM >= 20090617
  1523. #define MAX_HOTKEYS_PACKET 38
  1524. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1525. int16 packetType;
  1526. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1527. } __attribute__((packed));
  1528. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x07d9);
  1529. #elif PACKETVER_MAIN_NUM >= 20090603 || PACKETVER_RE_NUM >= 20090603 || PACKETVER_SAK_NUM >= 20090603
  1530. #define MAX_HOTKEYS_PACKET 36
  1531. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1532. int16 packetType;
  1533. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1534. } __attribute__((packed));
  1535. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x07d9);
  1536. #elif PACKETVER_MAIN_NUM >= 20070711 || PACKETVER_RE_NUM >= 20080827 || PACKETVER_AD_NUM >= 20070711 || PACKETVER_SAK_NUM >= 20070628
  1537. #define MAX_HOTKEYS_PACKET 27
  1538. struct PACKET_ZC_SHORTCUT_KEY_LIST {
  1539. int16 packetType;
  1540. struct hotkey_data hotkey[MAX_HOTKEYS_PACKET];
  1541. } __attribute__((packed));
  1542. DEFINE_PACKET_HEADER(ZC_SHORTCUT_KEY_LIST, 0x02b9);
  1543. #endif
  1544. #if PACKETVER_MAIN_NUM >= 20070618 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_AD_NUM >= 20070618 || PACKETVER_SAK_NUM >= 20070618
  1545. struct PACKET_CZ_SHORTCUT_KEY_CHANGE1 {
  1546. int16 packetType;
  1547. uint16 index;
  1548. struct hotkey_data hotkey;
  1549. } __attribute__((packed));
  1550. DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE1, 0x02ba);
  1551. #endif
  1552. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
  1553. struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 {
  1554. int16 packetType;
  1555. uint16 tab;
  1556. uint16 index;
  1557. struct hotkey_data hotkey;
  1558. } __attribute__((packed));
  1559. DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE2, 0x0b21);
  1560. #endif
  1561. #if PACKETVER_MAIN_NUM >= 20140129 || PACKETVER_RE_NUM >= 20140129 || defined(PACKETVER_ZERO)
  1562. struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE1 {
  1563. int16 packetType;
  1564. uint8 rowshift;
  1565. } __attribute__((packed));
  1566. DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE1, 0x0a01);
  1567. #endif
  1568. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
  1569. struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 {
  1570. int16 packetType;
  1571. uint16 tab;
  1572. uint8 rowshift;
  1573. } __attribute__((packed));
  1574. DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE2, 0x0b22);
  1575. #endif
  1576. #endif // HOTKEY_SAVING
  1577. /**
  1578. * MISSION_HUNT_INFO (PACKETVER >= 20141022)
  1579. * MISSION_HUNT_INFO_EX (PACKETVER >= 20150513)
  1580. */
  1581. struct packet_mission_info_sub {
  1582. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  1583. uint32 huntIdent;
  1584. uint32 huntIdent2;
  1585. uint32 mobType;
  1586. #elif PACKETVER >= 20150513
  1587. uint32 huntIdent;
  1588. uint32 mobType;
  1589. #endif
  1590. uint32 mob_id;
  1591. #if PACKETVER >= 20150513
  1592. int16 levelMin;
  1593. int16 levelMax;
  1594. #endif
  1595. int16 huntCount;
  1596. int16 maxCount;
  1597. char mobName[NAME_LENGTH];
  1598. } __attribute__((packed));
  1599. /**
  1600. * PACKET_ZC_ALL_QUEST_LIST2_INFO (PACKETVER >= 20141022)
  1601. * PACKET_ZC_ALL_QUEST_LIST3_INFO (PACKETVER >= 20150513)
  1602. */
  1603. struct packet_quest_list_info {
  1604. int32 questID;
  1605. int8 active;
  1606. #if PACKETVER >= 20141022
  1607. int32 quest_svrTime;
  1608. int32 quest_endTime;
  1609. int16 hunting_count;
  1610. struct packet_mission_info_sub objectives[]; // Note: This will be < MAX_QUEST_OBJECTIVES
  1611. #endif // PACKETVER >= 20141022
  1612. } __attribute__((packed));
  1613. /**
  1614. * Header for:
  1615. * PACKET_ZC_ALL_QUEST_LIST (PACKETVER < 20141022)
  1616. * PACKET_ZC_ALL_QUEST_LIST2 (PACKETVER >= 20141022)
  1617. * PACKET_ZC_ALL_QUEST_LIST3 (PACKETVER >= 20150513)
  1618. *
  1619. * @remark
  1620. * Contains (is followed by) a variable-length array of packet_quest_list_info
  1621. */
  1622. struct packet_quest_list_header {
  1623. uint16 PacketType;
  1624. uint16 PacketLength;
  1625. int32 questCount;
  1626. //struct packet_quest_list_info list[]; // Variable-length
  1627. } __attribute__((packed));
  1628. struct packet_chat_message {
  1629. uint16 packet_id;
  1630. int16 packet_len;
  1631. char message[];
  1632. } __attribute__((packed));
  1633. struct packet_whisper_message {
  1634. uint16 packet_id;
  1635. int16 packet_len;
  1636. char name[NAME_LENGTH];
  1637. char message[];
  1638. } __attribute__((packed));
  1639. /* RoDEX */
  1640. struct PACKET_CZ_ADD_ITEM_TO_MAIL {
  1641. int16 PacketType;
  1642. int16 index;
  1643. int16 count;
  1644. } __attribute__((packed));
  1645. // [4144] this packet exists from
  1646. // PACKETVER_MAIN_NUM >= 20141112 || PACKETVER_RE_NUM >= 20140924 || defined(PACKETVER_ZERO)
  1647. // but used only packet versions with known struct
  1648. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  1649. struct PACKET_ZC_ACK_ADD_ITEM_RODEX {
  1650. int16 PacketType;
  1651. int8 result;
  1652. int16 index;
  1653. int16 count;
  1654. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1655. uint32 itemId;
  1656. #else
  1657. uint16 itemId;
  1658. #endif
  1659. int8 type;
  1660. int8 IsIdentified;
  1661. int8 IsDamaged;
  1662. struct EQUIPSLOTINFO slot;
  1663. struct ItemOptions optionData[MAX_ITEM_OPTIONS];
  1664. int16 weight;
  1665. uint8 favorite;
  1666. uint32 location;
  1667. int8 refiningLevel;
  1668. int8 grade;
  1669. } __attribute__((packed));
  1670. DEFINE_PACKET_HEADER(ZC_ACK_ADD_ITEM_RODEX, 0x0b3f);
  1671. #elif PACKETVER >= 20141119
  1672. struct PACKET_ZC_ACK_ADD_ITEM_RODEX {
  1673. int16 PacketType;
  1674. int8 result;
  1675. int16 index;
  1676. int16 count;
  1677. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1678. uint32 itemId;
  1679. #else
  1680. uint16 itemId;
  1681. #endif
  1682. int8 type;
  1683. int8 IsIdentified;
  1684. int8 IsDamaged;
  1685. int8 refiningLevel;
  1686. struct EQUIPSLOTINFO slot;
  1687. struct ItemOptions optionData[MAX_ITEM_OPTIONS];
  1688. int16 weight;
  1689. uint8 favorite;
  1690. uint32 location;
  1691. } __attribute__((packed));
  1692. DEFINE_PACKET_HEADER(ZC_ACK_ADD_ITEM_RODEX, 0x0a05);
  1693. #endif // PACKETVER >= 20141119
  1694. struct PACKET_CZ_REQ_OPEN_WRITE_MAIL {
  1695. int16 PacketType;
  1696. char receiveName[NAME_LENGTH];
  1697. } __attribute__((packed));
  1698. struct PACKET_ZC_ACK_OPEN_WRITE_MAIL {
  1699. int16 PacketType;
  1700. char receiveName[NAME_LENGTH];
  1701. int8 result;
  1702. } __attribute__((packed));
  1703. struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL {
  1704. int16 PacketType;
  1705. int16 index;
  1706. uint16 cnt;
  1707. } __attribute__((packed));
  1708. struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL {
  1709. int16 PacketType;
  1710. int8 result;
  1711. int16 index;
  1712. uint16 cnt;
  1713. int16 weight;
  1714. } __attribute__((packed));
  1715. struct PACKET_CZ_SEND_MAIL {
  1716. int16 PacketType;
  1717. int16 PacketLength;
  1718. char receiveName[24];
  1719. char senderName[24];
  1720. int64 zeny;
  1721. int16 Titlelength;
  1722. int16 TextcontentsLength;
  1723. #if PACKETVER > 20160600
  1724. int32 receiver_char_id;
  1725. #endif // PACKETVER > 20160600
  1726. char string[];
  1727. } __attribute__((packed));
  1728. struct PACKET_ZC_WRITE_MAIL_RESULT {
  1729. int16 PacketType;
  1730. int8 result;
  1731. } __attribute__((packed));
  1732. #if PACKETVER >= 20140423
  1733. struct PACKET_CZ_CHECKNAME1 {
  1734. int16 PacketType;
  1735. char Name[24];
  1736. } __attribute__((packed));
  1737. DEFINE_PACKET_HEADER(CZ_CHECKNAME1, 0x0a13)
  1738. #endif // PACKETVER >= 20140423
  1739. #if PACKETVER_MAIN_NUM >= 20201104 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20201118
  1740. struct PACKET_CZ_CHECKNAME2 {
  1741. int16 PacketType;
  1742. char Name[24];
  1743. char own_char;
  1744. } __attribute__((packed));
  1745. DEFINE_PACKET_HEADER(CZ_CHECKNAME2, 0x0b97)
  1746. #endif // PACKETVER_MAIN_NUM >= 20201104 || PACKETVER_ZERO_NUM >= 20201118
  1747. #if PACKETVER >= 20160302
  1748. struct PACKET_ZC_CHECKNAME {
  1749. int16 PacketType;
  1750. int32 CharId;
  1751. int16 Class;
  1752. int16 BaseLevel;
  1753. char Name[24];
  1754. } __attribute__((packed));
  1755. DEFINE_PACKET_HEADER(ZC_CHECKNAME, 0x0a51)
  1756. #elif PACKETVER >= 20141119
  1757. struct PACKET_ZC_CHECKNAME {
  1758. int16 PacketType;
  1759. int32 CharId;
  1760. int16 Class;
  1761. int16 BaseLevel;
  1762. } __attribute__((packed));
  1763. DEFINE_PACKET_HEADER(ZC_CHECKNAME, 0x0a14)
  1764. #endif
  1765. struct PACKET_ZC_NOTIFY_UNREADMAIL {
  1766. int16 PacketType;
  1767. char result;
  1768. } __attribute__((packed));
  1769. struct maillistinfo {
  1770. #if PACKETVER >= 20170419
  1771. uint8 openType;
  1772. #endif
  1773. int64 MailID;
  1774. int8 Isread;
  1775. uint8 type;
  1776. char SenderName[24];
  1777. #if PACKETVER < 20170419
  1778. int32 regDateTime;
  1779. #endif
  1780. int32 expireDateTime;
  1781. int16 Titlelength;
  1782. char title[];
  1783. } __attribute__((packed));
  1784. struct PACKET_ZC_MAIL_LIST {
  1785. int16 PacketType;
  1786. int16 PacketLength;
  1787. #if PACKETVER < 20170419
  1788. int8 opentype;
  1789. int8 cnt;
  1790. #endif
  1791. int8 IsEnd;
  1792. } __attribute__((packed));
  1793. struct PACKET_CZ_REQ_NEXT_MAIL_LIST {
  1794. int16 PacketType;
  1795. int8 opentype;
  1796. int64 Lower_MailID;
  1797. } __attribute__((packed));
  1798. struct PACKET_CZ_REQ_OPEN_MAIL {
  1799. int16 PacketType;
  1800. #if PACKETVER >= 20170419
  1801. int64 char_Upper_MailID;
  1802. int64 return_Upper_MailID;
  1803. int64 account_Upper_MailID;
  1804. #else
  1805. int8 opentype;
  1806. int64 Upper_MailID;
  1807. #endif
  1808. } __attribute__((packed));
  1809. struct PACKET_CZ_REQ_READ_MAIL {
  1810. int16 PacketType;
  1811. int8 opentype;
  1812. int64 MailID;
  1813. } __attribute__((packed));
  1814. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  1815. struct PACKET_ZC_ACK_READ_RODEX_SUB {
  1816. int16 count;
  1817. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1818. uint32 ITID;
  1819. #else
  1820. uint16 ITID;
  1821. #endif
  1822. int8 IsIdentified;
  1823. int8 IsDamaged;
  1824. struct EQUIPSLOTINFO slot;
  1825. uint32 location;
  1826. uint8 type;
  1827. uint16 viewSprite;
  1828. uint16 bindOnEquip;
  1829. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  1830. int8 refiningLevel;
  1831. int8 grade;
  1832. } __attribute__((packed));
  1833. struct PACKET_ZC_ACK_READ_RODEX {
  1834. int16 PacketType;
  1835. int16 PacketLength;
  1836. int8 opentype;
  1837. int64 MailID;
  1838. int16 TextcontentsLength;
  1839. int64 zeny;
  1840. int8 ItemCnt;
  1841. char Textcontent[];
  1842. } __attribute__((packed));
  1843. DEFINE_PACKET_HEADER(ZC_ACK_READ_RODEX, 0x0b63);
  1844. // [4144] date unconfirmed
  1845. #elif PACKETVER >= 20140115
  1846. struct PACKET_ZC_ACK_READ_RODEX_SUB {
  1847. int16 count;
  1848. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  1849. uint32 ITID;
  1850. #else
  1851. uint16 ITID;
  1852. #endif
  1853. int8 IsIdentified;
  1854. int8 IsDamaged;
  1855. int8 refiningLevel;
  1856. struct EQUIPSLOTINFO slot;
  1857. uint32 location;
  1858. uint8 type;
  1859. uint16 viewSprite;
  1860. uint16 bindOnEquip;
  1861. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  1862. } __attribute__((packed));
  1863. struct PACKET_ZC_ACK_READ_RODEX {
  1864. int16 PacketType;
  1865. int16 PacketLength;
  1866. int8 opentype;
  1867. int64 MailID;
  1868. int16 TextcontentsLength;
  1869. int64 zeny;
  1870. int8 ItemCnt;
  1871. char Textcontent[];
  1872. } __attribute__((packed));
  1873. DEFINE_PACKET_HEADER(ZC_ACK_READ_RODEX, 0x09eb);
  1874. #endif // PACKETVER >= 20140115
  1875. struct PACKET_CZ_REQ_DELETE_MAIL {
  1876. int16 PacketType;
  1877. int8 opentype;
  1878. int64 MailID;
  1879. } __attribute__((packed));
  1880. struct PACKET_ZC_ACK_DELETE_MAIL {
  1881. int16 PacketType;
  1882. int8 opentype;
  1883. int64 MailID;
  1884. } __attribute__((packed));
  1885. struct PACKET_CZ_REQ_REFRESH_MAIL_LIST {
  1886. int16 PacketType;
  1887. #if PACKETVER >= 20170419
  1888. int64 Upper_MailID;
  1889. int8 unknown[16];
  1890. #else
  1891. int8 opentype;
  1892. int64 Upper_MailID;
  1893. #endif
  1894. } __attribute__((packed));
  1895. struct PACKET_CZ_REQ_ZENY_FROM_MAIL {
  1896. int16 PacketType;
  1897. int64 MailID;
  1898. int8 opentype;
  1899. } __attribute__((packed));
  1900. struct PACKET_ZC_ACK_ZENY_FROM_MAIL {
  1901. int16 PacketType;
  1902. int64 MailID;
  1903. int8 opentype;
  1904. int8 result;
  1905. } __attribute__((packed));
  1906. struct PACKET_CZ_REQ_ITEM_FROM_MAIL {
  1907. int16 PacketType;
  1908. int64 MailID;
  1909. int8 opentype;
  1910. } __attribute__((packed));
  1911. struct PACKET_ZC_ACK_ITEM_FROM_MAIL {
  1912. int16 PacketType;
  1913. int64 MailID;
  1914. int8 opentype;
  1915. int8 result;
  1916. } __attribute__((packed));
  1917. struct PACKET_ZC_SKILL_SCALE {
  1918. int16 PacketType;
  1919. uint32 AID;
  1920. int16 skill_id;
  1921. int16 skill_lv;
  1922. int16 x;
  1923. int16 y;
  1924. uint32 casttime;
  1925. } __attribute__((packed));
  1926. struct ZC_PROGRESS_ACTOR {
  1927. int16 PacketType;
  1928. int32 GID;
  1929. int32 color;
  1930. uint32 time;
  1931. } __attribute__((packed));
  1932. struct PACKET_ZC_ADD_MEMBER_TO_GROUP {
  1933. int16 packetType;
  1934. uint32 AID;
  1935. #if PACKETVER >= 20171207
  1936. uint32 GID;
  1937. #endif
  1938. uint32 leader;
  1939. #if PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
  1940. int16 class_;
  1941. int16 baseLevel;
  1942. #endif
  1943. int16 x;
  1944. int16 y;
  1945. uint8 offline;
  1946. char partyName[NAME_LENGTH];
  1947. char playerName[NAME_LENGTH];
  1948. char mapName[MAP_NAME_LENGTH_EXT];
  1949. int8 sharePickup;
  1950. int8 shareLoot;
  1951. } __attribute__((packed));
  1952. struct PACKET_ZC_GROUP_LIST_SUB {
  1953. uint32 AID;
  1954. #if PACKETVER >= 20171207
  1955. uint32 GID;
  1956. #endif
  1957. char playerName[NAME_LENGTH];
  1958. char mapName[MAP_NAME_LENGTH_EXT];
  1959. uint8 leader;
  1960. uint8 offline;
  1961. #if PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
  1962. int16 class_;
  1963. int16 baseLevel;
  1964. #endif
  1965. } __attribute__((packed));
  1966. struct PACKET_ZC_GROUP_LIST {
  1967. int16 packetType;
  1968. int16 packetLen;
  1969. char partyName[NAME_LENGTH];
  1970. struct PACKET_ZC_GROUP_LIST_SUB members[];
  1971. } __attribute__((packed));
  1972. #if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
  1973. struct PACKET_ZC_CLANINFO {
  1974. int16 PacketType;
  1975. int16 PacketLength;
  1976. uint32 ClanID;
  1977. char ClanName[NAME_LENGTH];
  1978. char MasterName[NAME_LENGTH];
  1979. char Map[MAP_NAME_LENGTH_EXT];
  1980. uint8 AllyCount;
  1981. uint8 AntagonistCount;
  1982. } __attribute__((packed));
  1983. DEFINE_PACKET_HEADER(ZC_CLANINFO, 0x098a);
  1984. #endif
  1985. struct PACKET_ZC_NOTIFY_CLAN_CONNECTINFO {
  1986. int16 PacketType;
  1987. int16 NumConnect;
  1988. int16 NumTotal;
  1989. } __attribute__((packed));
  1990. struct PACKET_ZC_ACK_CLAN_LEAVE {
  1991. int16 PacketType;
  1992. } __attribute__((packed));
  1993. struct PACKET_ZC_NOTIFY_CLAN_CHAT {
  1994. int16 PacketType;
  1995. int16 PacketLength;
  1996. char MemberName[NAME_LENGTH];
  1997. char Message[];
  1998. } __attribute__((packed));
  1999. /**
  2000. * PACKET_ZC_MISSION_HUNT (PACKETVER < 20150513)
  2001. * PACKET_ZC_MISSION_HUNT_EX (PACKETVER >= 20150513)
  2002. */
  2003. struct packet_quest_hunt_sub {
  2004. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  2005. uint32 huntIdent;
  2006. uint32 huntIdent2;
  2007. uint32 mobType;
  2008. #elif PACKETVER >= 20150513
  2009. uint32 huntIdent;
  2010. uint32 mobType;
  2011. #endif
  2012. uint32 mob_id;
  2013. #if PACKETVER >= 20150513
  2014. int16 levelMin;
  2015. int16 levelMax;
  2016. #endif
  2017. int16 huntCount;
  2018. char mobName[NAME_LENGTH];
  2019. } __attribute__((packed));
  2020. /**
  2021. * Header for:
  2022. * PACKET_ZC_ADD_QUEST (PACKETVER < 20150513)
  2023. * PACKET_ZC_ADD_QUEST_EX (PACKETVER >= 20150513)
  2024. */
  2025. struct packet_quest_add_header {
  2026. uint16 PacketType;
  2027. uint32 questID;
  2028. uint8 active;
  2029. int32 quest_svrTime;
  2030. int32 quest_endTime;
  2031. int16 count;
  2032. struct packet_quest_hunt_sub objectives[];
  2033. } __attribute__((packed));
  2034. /**
  2035. * PACKET_MOB_HUNTING (PACKETVER < 20150513)
  2036. * PACKET_MOB_HUNTING_EX (PACKETVER >= 20150513)
  2037. */
  2038. struct packet_quest_update_hunt {
  2039. uint32 questID;
  2040. #if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
  2041. uint32 huntIdent;
  2042. uint32 huntIdent2;
  2043. #elif PACKETVER >= 20150513
  2044. uint32 huntIdent;
  2045. #else
  2046. uint32 mob_id;
  2047. #endif // PACKETVER < 20150513
  2048. int16 maxCount;
  2049. int16 count;
  2050. } __attribute__((packed));
  2051. /**
  2052. * Header for:
  2053. * PACKET_ZC_UPDATE_MISSION_HUNT (PACKETVER < 20150513)
  2054. * PACKET_ZC_UPDATE_MISSION_HUNT_EX (PACKETVER >= 20150513)
  2055. */
  2056. struct packet_quest_update_header {
  2057. uint16 PacketType;
  2058. uint16 PacketLength;
  2059. int16 count;
  2060. struct packet_quest_update_hunt objectives[];
  2061. } __attribute__((packed));
  2062. /**
  2063. * Header for:
  2064. * PACKET_MOB_HUNTING (PACKETVER >= 20150513)
  2065. */
  2066. struct packet_quest_hunt_info_sub {
  2067. uint32 questID;
  2068. uint32 mob_id;
  2069. int16 maxCount;
  2070. int16 count;
  2071. } __attribute__((packed));
  2072. /**
  2073. * Header for:
  2074. * ZC_HUNTING_QUEST_INFO (PACKETVER >= 20150513)
  2075. */
  2076. struct packet_quest_hunt_info {
  2077. uint16 PacketType;
  2078. uint16 PacketLength;
  2079. struct packet_quest_hunt_info_sub info[];
  2080. } __attribute__((packed));
  2081. struct PACKET_ZC_FORMATSTRING_MSG {
  2082. uint16 PacketType;
  2083. uint16 PacketLength;
  2084. uint16 MessageId;
  2085. char MessageString[];
  2086. } __attribute__((packed));
  2087. struct PACKET_ZC_FORMATSTRING_MSG_COLOR {
  2088. uint16 PacketType;
  2089. uint16 PacketLength;
  2090. uint16 messageId;
  2091. #if PACKETVER >= 20160406
  2092. uint32 color;
  2093. #endif
  2094. char messageString[];
  2095. } __attribute__((packed));
  2096. struct PACKET_ZC_MSG_COLOR {
  2097. uint16 PacketType;
  2098. uint16 MessageId;
  2099. uint32 MessageColor;
  2100. } __attribute__((packed));
  2101. struct PACKET_CZ_OPEN_UI {
  2102. int16 PacketType;
  2103. int8 UIType;
  2104. } __attribute__((packed));
  2105. #if PACKETVER >= 20171122
  2106. struct PACKET_ZC_UI_OPEN {
  2107. int16 PacketType;
  2108. int8 UIType;
  2109. int32 data;
  2110. } __attribute__((packed));
  2111. DEFINE_PACKET_HEADER(ZC_UI_OPEN, 0x0ae2);
  2112. #elif PACKETVER >= 20151202
  2113. struct PACKET_ZC_UI_OPEN {
  2114. int16 PacketType;
  2115. int8 UIType;
  2116. } __attribute__((packed));
  2117. DEFINE_PACKET_HEADER(ZC_UI_OPEN, 0x0a38);
  2118. #endif
  2119. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  2120. struct PACKET_ZC_UI_OPEN2 {
  2121. int16 PacketType;
  2122. int8 UIType;
  2123. int64 data;
  2124. } __attribute__((packed));
  2125. DEFINE_PACKET_HEADER(ZC_UI_OPEN2, 0x0b9a);
  2126. #endif // PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  2127. struct PACKET_ZC_UI_ACTION {
  2128. int16 PacketType;
  2129. int32 UIType;
  2130. int32 data;
  2131. } __attribute__((packed));
  2132. struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST {
  2133. int16 PacketType;
  2134. char mapName[MAP_NAME_LENGTH_EXT];
  2135. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2136. uint32 ItemID;
  2137. #else
  2138. uint16 ItemID;
  2139. #endif
  2140. } __attribute__((packed));
  2141. struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE {
  2142. int16 PacketType;
  2143. uint32 flag;
  2144. } __attribute__((packed));
  2145. struct PACKET_CZ_REQ_STYLE_CHANGE {
  2146. int16 PacketType;
  2147. int16 HeadPalette;
  2148. int16 HeadStyle;
  2149. int16 BodyPalette;
  2150. int16 TopAccessory;
  2151. int16 MidAccessory;
  2152. int16 BottomAccessory;
  2153. } __attribute__((packed));
  2154. struct PACKET_CZ_REQ_STYLE_CHANGE2 {
  2155. int16 PacketType;
  2156. int16 HeadPalette;
  2157. int16 HeadStyle;
  2158. int16 BodyPalette;
  2159. int16 TopAccessory;
  2160. int16 MidAccessory;
  2161. int16 BottomAccessory;
  2162. int16 BodyStyle;
  2163. } __attribute__((packed));
  2164. struct PACKET_ZC_STYLE_CHANGE_RES {
  2165. int16 PacketType;
  2166. int8 flag;
  2167. } __attribute__((packed));
  2168. struct pet_evolution_items {
  2169. int16 index;
  2170. int16 amount;
  2171. } __attribute__((packed));
  2172. struct PACKET_CZ_PET_EVOLUTION {
  2173. int16 PacketType;
  2174. uint16 PacketLength;
  2175. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2176. uint32 EvolvedPetEggID;
  2177. #else
  2178. uint16 EvolvedPetEggID;
  2179. #endif
  2180. // struct pet_evolution_items items[];
  2181. } __attribute__((packed));
  2182. struct packet_ZC_REFUSE_LOGIN {
  2183. int16 PacketType;
  2184. #if PACKETVER >= 20101123
  2185. uint32 error_code;
  2186. #else
  2187. uint8 error_code;
  2188. #endif
  2189. char block_date[20];
  2190. } __attribute__((packed));
  2191. struct PACKET_ZC_NOTIFY_CHAT {
  2192. int16 PacketType;
  2193. int16 PacketLength;
  2194. uint32 GID;
  2195. char Message[];
  2196. } __attribute__((packed));
  2197. struct PACKET_ZC_NOTIFY_PLAYERCHAT {
  2198. int16 PacketType;
  2199. int16 PacketLength;
  2200. char Message[];
  2201. } __attribute__((packed));
  2202. struct PACKET_ZC_ITEM_ENTRY {
  2203. int16 packetType;
  2204. uint32 AID;
  2205. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2206. uint32 itemId;
  2207. #else
  2208. uint16 itemId;
  2209. #endif
  2210. uint8 identify;
  2211. uint16 x;
  2212. uint16 y;
  2213. uint16 amount;
  2214. uint8 subX;
  2215. uint8 subY;
  2216. } __attribute__((packed));
  2217. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2218. struct PACKET_ZC_ADD_ITEM_TO_STORE {
  2219. int16 packetType;
  2220. int16 index;
  2221. int32 amount;
  2222. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2223. uint32 itemId;
  2224. #else
  2225. uint16 itemId;
  2226. #endif
  2227. uint8 itemType;
  2228. uint8 identified;
  2229. uint8 damaged;
  2230. struct EQUIPSLOTINFO slot;
  2231. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2232. uint8 refine;
  2233. uint8 grade;
  2234. } __attribute__((packed));
  2235. DEFINE_PACKET_HEADER(ZC_ADD_ITEM_TO_STORE, 0x0b44)
  2236. #elif PACKETVER_MAIN_NUM >= 20140813 || PACKETVER_RE_NUM >= 20140402 || defined(PACKETVER_ZERO)
  2237. struct PACKET_ZC_ADD_ITEM_TO_STORE {
  2238. int16 packetType;
  2239. int16 index;
  2240. int32 amount;
  2241. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2242. uint32 itemId;
  2243. #else
  2244. uint16 itemId;
  2245. #endif
  2246. uint8 itemType;
  2247. uint8 identified;
  2248. uint8 damaged;
  2249. uint8 refine;
  2250. struct EQUIPSLOTINFO slot;
  2251. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2252. } __attribute__((packed));
  2253. DEFINE_PACKET_HEADER(ZC_ADD_ITEM_TO_STORE, 0x0a0a)
  2254. // [4144] this version unconfirmed
  2255. #elif PACKETVER >= 5
  2256. struct PACKET_ZC_ADD_ITEM_TO_STORE {
  2257. int16 packetType;
  2258. int16 index;
  2259. int32 amount;
  2260. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2261. uint32 itemId;
  2262. #else
  2263. uint16 itemId;
  2264. #endif
  2265. uint8 itemType;
  2266. uint8 identified;
  2267. uint8 damaged;
  2268. uint8 refine;
  2269. struct EQUIPSLOTINFO slot;
  2270. } __attribute__((packed));
  2271. DEFINE_PACKET_HEADER(ZC_ADD_ITEM_TO_STORE, 0x01c4)
  2272. #else
  2273. struct PACKET_ZC_ADD_ITEM_TO_STORE {
  2274. int16 packetType;
  2275. int16 index;
  2276. int32 amount;
  2277. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2278. uint32 itemId;
  2279. #else
  2280. uint16 itemId;
  2281. #endif
  2282. uint8 identified;
  2283. uint8 damaged;
  2284. uint8 refine;
  2285. struct EQUIPSLOTINFO slot;
  2286. } __attribute__((packed));
  2287. DEFINE_PACKET_HEADER(ZC_ADD_ITEM_TO_STORE, 0x00f4)
  2288. #endif
  2289. struct PACKET_ZC_MVP_GETTING_ITEM {
  2290. int16 packetType;
  2291. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2292. uint32 itemId;
  2293. #else
  2294. uint16 itemId;
  2295. #endif
  2296. } __attribute__((packed));
  2297. struct PACKET_ZC_ACK_TOUSESKILL {
  2298. int16 packetType;
  2299. uint16 skillId;
  2300. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2301. int32 btype;
  2302. uint32 itemId;
  2303. #else
  2304. int16 btype;
  2305. uint16 itemId;
  2306. #endif
  2307. uint8 flag;
  2308. uint8 cause;
  2309. } __attribute__((packed));
  2310. DEFINE_PACKET_HEADER(ZC_ACK_TOUSESKILL, 0x0110)
  2311. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2312. struct PACKET_ZC_ADD_ITEM_TO_CART {
  2313. int16 packetType;
  2314. int16 index;
  2315. int32 amount;
  2316. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2317. uint32 itemId;
  2318. #else
  2319. uint16 itemId;
  2320. #endif
  2321. uint8 itemType;
  2322. uint8 identified;
  2323. uint8 damaged;
  2324. struct EQUIPSLOTINFO slot;
  2325. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2326. uint8 refine;
  2327. uint8 grade;
  2328. } __attribute__((packed));
  2329. DEFINE_PACKET_HEADER(ZC_ADD_ITEM_TO_CART, 0x0b45);
  2330. #elif PACKETVER_MAIN_NUM >= 20140813 || PACKETVER_RE_NUM >= 20140402 || defined(PACKETVER_ZERO)
  2331. struct PACKET_ZC_ADD_ITEM_TO_CART {
  2332. int16 packetType;
  2333. int16 index;
  2334. int32 amount;
  2335. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2336. uint32 itemId;
  2337. #else
  2338. uint16 itemId;
  2339. #endif
  2340. uint8 itemType;
  2341. uint8 identified;
  2342. uint8 damaged;
  2343. uint8 refine;
  2344. struct EQUIPSLOTINFO slot;
  2345. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2346. } __attribute__((packed));
  2347. DEFINE_PACKET_HEADER(ZC_ADD_ITEM_TO_CART, 0x0a0b);
  2348. // [4144] this version unconfirmed
  2349. #elif PACKETVER >= 5
  2350. struct PACKET_ZC_ADD_ITEM_TO_CART {
  2351. int16 packetType;
  2352. int16 index;
  2353. int32 amount;
  2354. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2355. uint32 itemId;
  2356. #else
  2357. uint16 itemId;
  2358. #endif
  2359. uint8 itemType;
  2360. uint8 identified;
  2361. uint8 damaged;
  2362. uint8 refine;
  2363. struct EQUIPSLOTINFO slot;
  2364. } __attribute__((packed));
  2365. DEFINE_PACKET_HEADER(ZC_ADD_ITEM_TO_CART, 0x01c5);
  2366. #else
  2367. struct PACKET_ZC_ADD_ITEM_TO_CART {
  2368. int16 packetType;
  2369. int16 index;
  2370. int32 amount;
  2371. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2372. uint32 itemId;
  2373. #else
  2374. uint16 itemId;
  2375. #endif
  2376. uint8 identified;
  2377. uint8 damaged;
  2378. uint8 refine;
  2379. struct EQUIPSLOTINFO slot;
  2380. } __attribute__((packed));
  2381. DEFINE_PACKET_HEADER(ZC_ADD_ITEM_TO_CART, 0x0124);
  2382. #endif
  2383. struct PACKET_CZ_REQMAKINGITEM {
  2384. int16 packetType;
  2385. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2386. uint32 itemId;
  2387. uint32 material[3];
  2388. #else
  2389. uint16 itemId;
  2390. uint16 material[3];
  2391. #endif
  2392. } __attribute__((packed));
  2393. struct PACKET_ZC_ACK_REQMAKINGITEM {
  2394. int16 packetType;
  2395. int16 result;
  2396. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2397. uint32 itemId;
  2398. #else
  2399. uint16 itemId;
  2400. #endif
  2401. } __attribute__((packed));
  2402. struct PACKET_ZC_FEED_PET {
  2403. int16 packetType;
  2404. uint8 result;
  2405. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2406. uint32 itemId;
  2407. #else
  2408. uint16 itemId;
  2409. #endif
  2410. } __attribute__((packed));
  2411. struct PACKET_ZC_FEED_MER {
  2412. int16 packetType;
  2413. uint8 result;
  2414. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2415. uint32 itemId;
  2416. #else
  2417. uint16 itemId;
  2418. #endif
  2419. } __attribute__((packed));
  2420. struct PACKET_ZC_USE_ITEM_ACK {
  2421. int16 packetType;
  2422. int16 index;
  2423. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2424. uint32 itemId;
  2425. uint32 AID;
  2426. #elif PACKETVER >= 3
  2427. uint16 itemId;
  2428. uint32 AID;
  2429. #endif
  2430. int16 amount;
  2431. uint8 result;
  2432. } __attribute__((packed));
  2433. struct PACKET_ZC_SPRITE_CHANGE {
  2434. int16 packetType;
  2435. uint32 AID;
  2436. uint8 type;
  2437. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2438. uint32 val;
  2439. uint32 val2;
  2440. #elif PACKETVER >= 4
  2441. uint16 val;
  2442. uint16 val2;
  2443. #else
  2444. uint8 val;
  2445. #endif
  2446. } __attribute__((packed));
  2447. // TODO put struct under #ifdef/#elif
  2448. // [4144] dates unconfirmed
  2449. struct PACKET_ZC_ADD_EXCHANGE_ITEM {
  2450. int16 packetType;
  2451. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2452. uint32 itemId;
  2453. uint8 itemType;
  2454. int32 amount;
  2455. #elif PACKETVER >= 20100223
  2456. uint16 itemId;
  2457. uint8 itemType;
  2458. int32 amount;
  2459. #else
  2460. int32 amount;
  2461. uint16 itemId;
  2462. #endif
  2463. uint8 identified;
  2464. uint8 damaged;
  2465. #if !(PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024)
  2466. uint8 refine;
  2467. #endif // !(PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024)
  2468. struct EQUIPSLOTINFO slot;
  2469. #if PACKETVER >= 20150226
  2470. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2471. #endif
  2472. #if PACKETVER_MAIN_NUM >= 20161102 || PACKETVER_RE_NUM >= 20161026 || defined(PACKETVER_ZERO)
  2473. uint32 location;
  2474. uint16 look;
  2475. #endif // PACKETVER_MAIN_NUM >= 20161102 || PACKETVER_RE_NUM >= 20161026 || defined(PACKETVER_ZERO)
  2476. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2477. uint8 refine;
  2478. uint8 grade;
  2479. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2480. } __attribute__((packed));
  2481. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2482. DEFINE_PACKET_HEADER(ZC_ADD_EXCHANGE_ITEM, 0x0b42);
  2483. #elif PACKETVER_MAIN_NUM >= 20161102 || PACKETVER_RE_NUM >= 20161026 || defined(PACKETVER_ZERO)
  2484. DEFINE_PACKET_HEADER(ZC_ADD_EXCHANGE_ITEM, 0x0a96);
  2485. #elif PACKETVER >= 20150226
  2486. DEFINE_PACKET_HEADER(ZC_ADD_EXCHANGE_ITEM, 0x0a09);
  2487. #elif PACKETVER >= 20100223
  2488. DEFINE_PACKET_HEADER(ZC_ADD_EXCHANGE_ITEM, 0x080f);
  2489. #else
  2490. DEFINE_PACKET_HEADER(ZC_ADD_EXCHANGE_ITEM, 0x00e9);
  2491. #endif
  2492. struct PACKET_ZC_CASH_TIME_COUNTER {
  2493. int16 packetType;
  2494. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2495. uint32 itemId;
  2496. #else
  2497. uint16 itemId;
  2498. #endif
  2499. uint32 seconds;
  2500. } __attribute__((packed));
  2501. struct PACKET_ZC_CASH_ITEM_DELETE {
  2502. int16 packetType;
  2503. uint16 index;
  2504. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2505. uint32 itemId;
  2506. #else
  2507. uint16 itemId;
  2508. #endif
  2509. } __attribute__((packed));
  2510. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2511. struct PACKET_ZC_ITEM_PICKUP_PARTY {
  2512. int16 packetType;
  2513. uint32 AID;
  2514. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2515. uint32 itemId;
  2516. #else
  2517. uint16 itemId;
  2518. #endif
  2519. uint8 identified;
  2520. uint8 damaged;
  2521. struct EQUIPSLOTINFO slot;
  2522. uint16 location;
  2523. uint8 itemType;
  2524. uint8 refine;
  2525. uint8 grade;
  2526. } __attribute__((packed));
  2527. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_PARTY, 0x0b67);
  2528. #elif PACKETVER >= 20070731
  2529. struct PACKET_ZC_ITEM_PICKUP_PARTY {
  2530. int16 packetType;
  2531. uint32 AID;
  2532. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2533. uint32 itemId;
  2534. #else
  2535. uint16 itemId;
  2536. #endif
  2537. uint8 identified;
  2538. uint8 damaged;
  2539. uint8 refine;
  2540. struct EQUIPSLOTINFO slot;
  2541. uint16 location;
  2542. uint8 itemType;
  2543. } __attribute__((packed));
  2544. DEFINE_PACKET_HEADER(ZC_ITEM_PICKUP_PARTY, 0x02b8);
  2545. #endif
  2546. struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE {
  2547. int16 packetType;
  2548. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2549. uint32 itemId;
  2550. #else
  2551. uint16 itemId;
  2552. #endif
  2553. uint16 amount;
  2554. #if PACKETVER >= 20141016
  2555. uint32 zeny;
  2556. uint32 zenyLimit;
  2557. uint32 charId;
  2558. uint32 updateTime;
  2559. #else
  2560. uint32 zenyLimit;
  2561. #endif
  2562. } __attribute__((packed));
  2563. struct PACKET_ZC_ACK_WEAPONREFINE {
  2564. int16 packetType;
  2565. int32 result;
  2566. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2567. uint32 itemId;
  2568. #else
  2569. uint16 itemId;
  2570. #endif
  2571. } __attribute__((packed));
  2572. #if PACKETVER_MAIN_NUM >= 20210303 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  2573. // PACKET_ZC_PROPERTY_HOMUN4
  2574. struct PACKET_ZC_PROPERTY_HOMUN {
  2575. int16 packetType;
  2576. char name[NAME_LENGTH];
  2577. // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
  2578. uint8 flags;
  2579. uint16 level;
  2580. uint16 hunger;
  2581. uint16 intimacy;
  2582. uint16 atk2;
  2583. uint16 matk;
  2584. uint16 hit;
  2585. uint16 crit;
  2586. uint16 def;
  2587. uint16 mdef;
  2588. uint16 flee;
  2589. uint16 amotion;
  2590. uint32 hp;
  2591. uint32 maxHp;
  2592. uint32 sp;
  2593. uint32 maxSp;
  2594. int64 exp;
  2595. int64 expNext;
  2596. uint16 skillPoints;
  2597. uint16 range;
  2598. } __attribute__((packed));
  2599. DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x0ba4);
  2600. #elif PACKETVER_MAIN_NUM >= 20200819 || PACKETVER_RE_NUM >= 20200723
  2601. // PACKET_ZC_PROPERTY_HOMUN3
  2602. struct PACKET_ZC_PROPERTY_HOMUN {
  2603. int16 packetType;
  2604. char name[NAME_LENGTH];
  2605. // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
  2606. uint8 flags;
  2607. uint16 level;
  2608. uint16 hunger;
  2609. uint16 intimacy;
  2610. uint16 atk2;
  2611. uint16 matk;
  2612. uint16 hit;
  2613. uint16 crit;
  2614. uint16 def;
  2615. uint16 mdef;
  2616. uint16 flee;
  2617. uint16 amotion;
  2618. uint32 hp;
  2619. uint32 maxHp;
  2620. uint32 sp;
  2621. uint32 maxSp;
  2622. uint32 exp;
  2623. uint32 expNext;
  2624. uint16 skillPoints;
  2625. uint16 range;
  2626. } __attribute__((packed));
  2627. DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x0b76);
  2628. #elif PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626
  2629. // PACKET_ZC_PROPERTY_HOMUN3
  2630. struct PACKET_ZC_PROPERTY_HOMUN {
  2631. int16 packetType;
  2632. char name[NAME_LENGTH];
  2633. // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
  2634. uint8 flags;
  2635. uint16 level;
  2636. uint16 hunger;
  2637. uint16 intimacy;
  2638. uint16 atk2;
  2639. uint16 matk;
  2640. uint16 hit;
  2641. uint16 crit;
  2642. uint16 def;
  2643. uint16 mdef;
  2644. uint16 flee;
  2645. uint16 amotion;
  2646. uint32 hp;
  2647. uint32 maxHp;
  2648. uint16 sp;
  2649. uint16 maxSp;
  2650. uint32 exp;
  2651. uint32 expNext;
  2652. uint16 skillPoints;
  2653. uint16 range;
  2654. } __attribute__((packed));
  2655. DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x0b2f);
  2656. #elif PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
  2657. // PACKET_ZC_PROPERTY_HOMUN2
  2658. struct PACKET_ZC_PROPERTY_HOMUN {
  2659. int16 packetType;
  2660. char name[NAME_LENGTH];
  2661. // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
  2662. uint8 flags;
  2663. uint16 level;
  2664. uint16 hunger;
  2665. uint16 intimacy;
  2666. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2667. uint32 itemId;
  2668. #else
  2669. uint16 itemId;
  2670. #endif
  2671. uint16 atk2;
  2672. uint16 matk;
  2673. uint16 hit;
  2674. uint16 crit;
  2675. uint16 def;
  2676. uint16 mdef;
  2677. uint16 flee;
  2678. uint16 amotion;
  2679. uint32 hp;
  2680. uint32 maxHp;
  2681. uint16 sp;
  2682. uint16 maxSp;
  2683. uint32 exp;
  2684. uint32 expNext;
  2685. uint16 skillPoints;
  2686. uint16 range;
  2687. } __attribute__((packed));
  2688. DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x09f7);
  2689. #elif PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
  2690. // PACKET_ZC_PROPERTY_HOMUN1
  2691. struct PACKET_ZC_PROPERTY_HOMUN {
  2692. int16 packetType;
  2693. char name[NAME_LENGTH];
  2694. // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
  2695. uint8 flags;
  2696. uint16 level;
  2697. uint16 hunger;
  2698. uint16 intimacy;
  2699. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2700. uint32 itemId;
  2701. #else
  2702. uint16 itemId;
  2703. #endif
  2704. uint16 atk2;
  2705. uint16 matk;
  2706. uint16 hit;
  2707. uint16 crit;
  2708. uint16 def;
  2709. uint16 mdef;
  2710. uint16 flee;
  2711. uint16 amotion;
  2712. uint16 hp;
  2713. uint16 maxHp;
  2714. uint16 sp;
  2715. uint16 maxSp;
  2716. uint32 exp;
  2717. uint32 expNext;
  2718. uint16 skillPoints;
  2719. uint16 range;
  2720. } __attribute__((packed));
  2721. DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x022e);
  2722. #endif
  2723. struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER {
  2724. int16 packetType;
  2725. uint16 result;
  2726. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2727. uint32 itemId;
  2728. #else
  2729. uint16 itemId;
  2730. #endif
  2731. } __attribute__((packed));
  2732. #if PACKETVER >= 20191224
  2733. struct REPAIRITEM_INFO2 {
  2734. int16 index;
  2735. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2736. uint32 itemId;
  2737. #else
  2738. uint16 itemId;
  2739. #endif
  2740. struct EQUIPSLOTINFO slot; // unused?
  2741. uint8 refine; // unused?
  2742. uint8 grade; // unused?
  2743. } __attribute__((packed));
  2744. #elif PACKETVER >= 20191106
  2745. struct REPAIRITEM_INFO2 {
  2746. int16 index;
  2747. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2748. uint32 itemId;
  2749. #else
  2750. uint16 itemId;
  2751. #endif
  2752. uint8 refine; // unused?
  2753. struct EQUIPSLOTINFO slot; // unused?
  2754. } __attribute__((packed));
  2755. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2756. struct REPAIRITEM_INFO1 {
  2757. int16 index;
  2758. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2759. uint32 itemId;
  2760. #else
  2761. uint16 itemId;
  2762. #endif
  2763. uint8 refine; // unused?
  2764. struct EQUIPSLOTINFO slot; // unused?
  2765. } __attribute__((packed));
  2766. #if PACKETVER >= 20191224
  2767. struct PACKET_CZ_REQ_ITEMREPAIR2 {
  2768. int16 packetType;
  2769. struct REPAIRITEM_INFO2 item;
  2770. } __attribute__((packed));
  2771. DEFINE_PACKET_HEADER(CZ_REQ_ITEMREPAIR2, 0x0b66);
  2772. #endif // PACKETVER >= 20191224
  2773. struct PACKET_CZ_REQ_ITEMREPAIR1 {
  2774. int16 packetType;
  2775. struct REPAIRITEM_INFO1 item;
  2776. } __attribute__((packed));
  2777. DEFINE_PACKET_HEADER(CZ_REQ_ITEMREPAIR1, 0x01fd);
  2778. struct PACKET_CZ_REQ_MAKINGITEM {
  2779. int16 packetType;
  2780. int16 type;
  2781. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2782. uint32 itemId;
  2783. #else
  2784. uint16 itemId;
  2785. #endif
  2786. } __attribute__((packed));
  2787. struct PACKET_CZ_SSILIST_ITEM_CLICK {
  2788. int16 packetType;
  2789. uint32 AID;
  2790. uint32 storeId;
  2791. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2792. uint32 itemId;
  2793. #else
  2794. uint16 itemId;
  2795. #endif
  2796. } __attribute__((packed));
  2797. struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub {
  2798. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2799. uint32 itemId;
  2800. #else
  2801. uint16 itemId;
  2802. #endif
  2803. uint32 price;
  2804. #ifdef ENABLE_CASHSHOP_PREVIEW_PATCH
  2805. uint16 viewSprite;
  2806. uint32 location;
  2807. #endif // ENABLE_CASHSHOP_PREVIEW_PATCH
  2808. } __attribute__((packed));
  2809. struct PACKET_ZC_ACK_SCHEDULER_CASHITEM {
  2810. int16 packetType;
  2811. int16 packetLength;
  2812. int16 count;
  2813. int16 tabNum;
  2814. struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub items[];
  2815. } __attribute__((packed));
  2816. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2817. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub {
  2818. uint32 price;
  2819. int16 index;
  2820. int16 amount;
  2821. uint8 itemType;
  2822. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2823. uint32 itemId;
  2824. #else
  2825. uint16 itemId;
  2826. #endif
  2827. uint8 identified;
  2828. uint8 damaged;
  2829. struct EQUIPSLOTINFO slot;
  2830. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2831. uint8 refine;
  2832. uint8 grade;
  2833. } __attribute__((packed));
  2834. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST {
  2835. int16 packetType;
  2836. int16 packetLength;
  2837. uint32 AID;
  2838. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub items[];
  2839. } __attribute__((packed));
  2840. DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_MYITEMLIST, 0x0b40);
  2841. #else // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2842. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub {
  2843. uint32 price;
  2844. int16 index;
  2845. int16 amount;
  2846. uint8 itemType;
  2847. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2848. uint32 itemId;
  2849. #else
  2850. uint16 itemId;
  2851. #endif
  2852. uint8 identified;
  2853. uint8 damaged;
  2854. uint8 refine;
  2855. struct EQUIPSLOTINFO slot;
  2856. #if PACKETVER >= 20150226
  2857. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2858. #endif
  2859. } __attribute__((packed));
  2860. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST {
  2861. int16 packetType;
  2862. int16 packetLength;
  2863. uint32 AID;
  2864. struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub items[];
  2865. } __attribute__((packed));
  2866. DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_MYITEMLIST, 0x0136);
  2867. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2868. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  2869. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub {
  2870. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2871. uint32 itemId;
  2872. #else
  2873. uint16 itemId;
  2874. #endif
  2875. uint32 price;
  2876. uint32 discountPrice;
  2877. uint8 itemType;
  2878. uint16 viewSprite;
  2879. uint32 location;
  2880. } __attribute__((packed));
  2881. struct PACKET_ZC_PC_PURCHASE_ITEMLIST {
  2882. int16 packetType;
  2883. int16 packetLength;
  2884. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub items[];
  2885. } __attribute__((packed));
  2886. DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_ITEMLIST, 0x0b77)
  2887. #else // PACKETVER_MAIN_NUM >= 20210203
  2888. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub {
  2889. uint32 price;
  2890. uint32 discountPrice;
  2891. uint8 itemType;
  2892. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2893. uint32 itemId;
  2894. #else
  2895. uint16 itemId;
  2896. #endif
  2897. } __attribute__((packed));
  2898. struct PACKET_ZC_PC_PURCHASE_ITEMLIST {
  2899. int16 packetType;
  2900. int16 packetLength;
  2901. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub items[];
  2902. } __attribute__((packed));
  2903. DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_ITEMLIST, 0x00c6)
  2904. #endif // PACKETVER_MAIN_NUM >= 20210203
  2905. struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub {
  2906. uint16 amount;
  2907. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2908. uint32 itemId;
  2909. #else
  2910. uint16 itemId;
  2911. #endif
  2912. } __attribute__((packed));
  2913. struct PACKET_CZ_PC_PURCHASE_ITEMLIST {
  2914. int16 packetType;
  2915. int16 packetLength;
  2916. struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub items[];
  2917. } __attribute__((packed));
  2918. struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub {
  2919. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2920. uint32 itemId;
  2921. #else
  2922. uint16 itemId;
  2923. #endif
  2924. uint16 amount;
  2925. uint32 price;
  2926. } __attribute__((packed));
  2927. struct PACKET_CZ_REQ_OPEN_BUYING_STORE {
  2928. int16 packetType;
  2929. int16 packetLength;
  2930. uint32 zenyLimit;
  2931. uint8 result;
  2932. char storeName[MESSAGE_SIZE];
  2933. struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub items[];
  2934. } __attribute__((packed));
  2935. struct PACKET_ZC_MYITEMLIST_BUYING_STORE_sub {
  2936. uint32 price;
  2937. uint16 amount;
  2938. uint8 itemType;
  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. } __attribute__((packed));
  2945. struct PACKET_ZC_MYITEMLIST_BUYING_STORE {
  2946. int16 packetType;
  2947. int16 packetLength;
  2948. uint32 AID;
  2949. uint32 zenyLimit;
  2950. struct PACKET_ZC_MYITEMLIST_BUYING_STORE_sub items[];
  2951. } __attribute__((packed));
  2952. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  2953. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub {
  2954. uint32 price;
  2955. uint16 amount;
  2956. int16 index;
  2957. uint8 itemType;
  2958. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2959. uint32 itemId;
  2960. #else
  2961. uint16 itemId;
  2962. #endif
  2963. uint8 identified;
  2964. uint8 damaged;
  2965. struct EQUIPSLOTINFO slot;
  2966. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2967. uint32 location;
  2968. uint16 viewSprite;
  2969. uint8 refine;
  2970. uint8 grade;
  2971. } __attribute__((packed));
  2972. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC {
  2973. int16 packetType;
  2974. int16 packetLength;
  2975. uint32 AID;
  2976. uint32 venderId;
  2977. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub items[];
  2978. } __attribute__((packed));
  2979. DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_ITEMLIST_FROMMC, 0x0b3d)
  2980. #elif PACKETVER >= 20100105
  2981. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub {
  2982. uint32 price;
  2983. uint16 amount;
  2984. int16 index;
  2985. uint8 itemType;
  2986. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  2987. uint32 itemId;
  2988. #else
  2989. uint16 itemId;
  2990. #endif
  2991. uint8 identified;
  2992. uint8 damaged;
  2993. #if !(PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024)
  2994. uint8 refine;
  2995. #endif
  2996. struct EQUIPSLOTINFO slot;
  2997. #if PACKETVER >= 20150226
  2998. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  2999. #endif
  3000. // [4144] date 20160921 not confirmed. Can be bigger or smaller
  3001. #if PACKETVER >= 20160921
  3002. uint32 location;
  3003. uint16 viewSprite;
  3004. #endif
  3005. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  3006. uint8 refine;
  3007. uint8 grade;
  3008. #endif
  3009. } __attribute__((packed));
  3010. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC {
  3011. int16 packetType;
  3012. int16 packetLength;
  3013. uint32 AID;
  3014. // [4144] unconfirmed field
  3015. uint32 venderId;
  3016. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub items[];
  3017. } __attribute__((packed));
  3018. DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_ITEMLIST_FROMMC, 0x0800)
  3019. #else
  3020. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub {
  3021. uint32 price;
  3022. uint16 amount;
  3023. int16 index;
  3024. uint8 itemType;
  3025. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3026. uint32 itemId;
  3027. #else
  3028. uint16 itemId;
  3029. #endif
  3030. uint8 identified;
  3031. uint8 damaged;
  3032. uint8 refine;
  3033. struct EQUIPSLOTINFO slot;
  3034. } __attribute__((packed));
  3035. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC {
  3036. int16 packetType;
  3037. int16 packetLength;
  3038. uint32 AID;
  3039. struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub items[];
  3040. } __attribute__((packed));
  3041. DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_ITEMLIST_FROMMC, 0x0133)
  3042. #endif
  3043. struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE_sub {
  3044. uint32 price;
  3045. uint16 amount;
  3046. uint8 itemType;
  3047. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3048. uint32 itemId;
  3049. #else
  3050. uint16 itemId;
  3051. #endif
  3052. } __attribute__((packed));
  3053. struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE {
  3054. int16 packetType;
  3055. int16 packetLength;
  3056. uint32 AID;
  3057. uint32 storeId;
  3058. uint32 zenyLimit;
  3059. struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE_sub items[];
  3060. } __attribute__((packed));
  3061. struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub {
  3062. int16 index;
  3063. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3064. uint32 itemId;
  3065. #else
  3066. uint16 itemId;
  3067. #endif
  3068. uint16 amount;
  3069. } __attribute__((packed));
  3070. struct PACKET_CZ_REQ_TRADE_BUYING_STORE {
  3071. int16 packetType;
  3072. int16 packetLength;
  3073. uint32 AID;
  3074. uint32 storeId;
  3075. struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub items[];
  3076. } __attribute__((packed));
  3077. struct PACKET_ZC_MAKABLEITEMLIST_sub {
  3078. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3079. uint32 itemId;
  3080. uint32 material[3];
  3081. #else
  3082. uint16 itemId;
  3083. uint16 material[3];
  3084. #endif
  3085. } __attribute__((packed));
  3086. struct PACKET_ZC_MAKABLEITEMLIST {
  3087. int16 packetType;
  3088. int16 packetLength;
  3089. struct PACKET_ZC_MAKABLEITEMLIST_sub items[];
  3090. } __attribute__((packed));
  3091. struct PACKET_ZC_MAKINGARROW_LIST_sub {
  3092. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3093. uint32 itemId;
  3094. #else
  3095. uint16 itemId;
  3096. #endif
  3097. } __attribute__((packed));
  3098. struct PACKET_ZC_MAKINGARROW_LIST {
  3099. int16 packetType;
  3100. int16 packetLength;
  3101. struct PACKET_ZC_MAKINGARROW_LIST_sub items[];
  3102. } __attribute__((packed));
  3103. DEFINE_PACKET_HEADER(ZC_MAKINGARROW_LIST, 0x01ad);
  3104. struct PACKET_ZC_SKILL_SELECT_REQUEST {
  3105. int16 packetType;
  3106. int16 packetLength;
  3107. int32 flag; //< 0 = old code compatibility; 1 = Auto Shadow Spell; same value is received in CZ_SKILL_SELECT_RESPONSE
  3108. int16 skillIds[];
  3109. } __attribute__((packed));
  3110. DEFINE_PACKET_HEADER(ZC_SKILL_SELECT_REQUEST, 0x0442);
  3111. struct PACKET_CZ_SKILL_SELECT_RESPONSE {
  3112. int16 packetType;
  3113. int32 flag; //< currently unused, matches ZC_SKILL_SELECT_REQUEST.flag
  3114. int16 selectedSkillId;
  3115. } __attribute__((packed));
  3116. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  3117. #define REPAIRITEM_INFO REPAIRITEM_INFO2
  3118. struct PACKET_ZC_REPAIRITEMLIST {
  3119. int16 packetType;
  3120. int16 packetLength;
  3121. struct REPAIRITEM_INFO items[];
  3122. } __attribute__((packed));
  3123. DEFINE_PACKET_HEADER(ZC_REPAIRITEMLIST, 0x0b65);
  3124. #else // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  3125. #define REPAIRITEM_INFO REPAIRITEM_INFO1
  3126. struct PACKET_ZC_REPAIRITEMLIST {
  3127. int16 packetType;
  3128. int16 packetLength;
  3129. struct REPAIRITEM_INFO items[];
  3130. } __attribute__((packed));
  3131. DEFINE_PACKET_HEADER(ZC_REPAIRITEMLIST, 0x01fc);
  3132. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  3133. struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub {
  3134. int16 index;
  3135. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3136. uint32 itemId;
  3137. #else
  3138. uint16 itemId;
  3139. #endif
  3140. uint8 refine; // unused?
  3141. struct EQUIPSLOTINFO slot; // unused?
  3142. } __attribute__((packed));
  3143. struct PACKET_ZC_NOTIFY_WEAPONITEMLIST {
  3144. int16 packetType;
  3145. int16 packetLength;
  3146. struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub items[];
  3147. } __attribute__((packed));
  3148. struct PACKET_ZC_MAKINGITEM_LIST_sub {
  3149. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3150. uint32 itemId;
  3151. #else
  3152. uint16 itemId;
  3153. #endif
  3154. } __attribute__((packed));
  3155. struct PACKET_ZC_MAKINGITEM_LIST {
  3156. int16 packetType;
  3157. int16 packetLength;
  3158. uint16 makeItem;
  3159. struct PACKET_ZC_MAKINGITEM_LIST_sub items[];
  3160. } __attribute__((packed));
  3161. DEFINE_PACKET_HEADER(ZC_MAKINGITEM_LIST, 0x025a);
  3162. struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub {
  3163. uint32 price;
  3164. uint32 discountPrice;
  3165. uint8 itemType;
  3166. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3167. uint32 itemId;
  3168. #else
  3169. uint16 itemId;
  3170. #endif
  3171. #ifdef ENABLE_OLD_CASHSHOP_PREVIEW_PATCH
  3172. uint16 viewSprite;
  3173. uint32 location;
  3174. uint8 unused[6];
  3175. #endif // ENABLE_OLD_CASHSHOP_PREVIEW_PATCH
  3176. } __attribute__((packed));
  3177. struct PACKET_ZC_PC_CASH_POINT_ITEMLIST {
  3178. int16 packetType;
  3179. int16 packetLength;
  3180. uint32 cashPoints;
  3181. #if PACKETVER >= 20070711
  3182. uint32 kafraPoints;
  3183. #endif
  3184. struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub items[];
  3185. } __attribute__((packed));
  3186. struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub {
  3187. uint16 amount;
  3188. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3189. uint32 itemId;
  3190. #else
  3191. uint16 itemId;
  3192. #endif
  3193. } __attribute__((packed));
  3194. struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM {
  3195. int16 packetType;
  3196. #if PACKETVER >= 20101116
  3197. int16 packetLength;
  3198. uint32 kafraPoints;
  3199. uint16 count;
  3200. struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub items[];
  3201. #else
  3202. uint16 itemId;
  3203. uint16 amount;
  3204. #if PACKETVER >= 20070711
  3205. uint32 kafraPoints;
  3206. #endif
  3207. #endif
  3208. } __attribute__((packed));
  3209. struct PACKET_CZ_SEARCH_STORE_INFO_item {
  3210. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3211. uint32 itemId;
  3212. #else
  3213. uint16 itemId;
  3214. #endif
  3215. } __attribute__((packed));
  3216. struct PACKET_CZ_SEARCH_STORE_INFO {
  3217. int16 packetType;
  3218. int16 packetLength;
  3219. uint8 searchType;
  3220. uint32 maxPrice;
  3221. uint32 minPrice;
  3222. uint8 itemsCount;
  3223. uint8 cardsCount;
  3224. struct PACKET_CZ_SEARCH_STORE_INFO_item items[]; // items[itemCount]
  3225. /*
  3226. struct PACKET_CZ_SEARCH_STORE_INFO_item cards[cardCount];
  3227. */
  3228. } __attribute__((packed));
  3229. struct PACKET_ZC_SEARCH_STORE_INFO_FAILED {
  3230. int16 packetType;
  3231. uint8 reason;
  3232. } __attribute__((packed));
  3233. DEFINE_PACKET_HEADER(ZC_SEARCH_STORE_INFO_FAILED, 0x837);
  3234. struct PACKET_ZC_OPEN_SEARCH_STORE_INFO {
  3235. int16 packetType;
  3236. uint16 effect;
  3237. #if PACKETVER_MAIN_NUM >= 20100701 || PACKETVER_RE_NUM >= 20100701 || defined(PACKETVER_ZERO)
  3238. uint8 remainingUses;
  3239. #endif
  3240. } __attribute__((packed));
  3241. DEFINE_PACKET_HEADER(ZC_OPEN_SEARCH_STORE_INFO, 0x83a);
  3242. struct PACKET_ZC_SSILIST_ITEM_CLICK_ACK {
  3243. int16 packetType;
  3244. int16 x;
  3245. int16 y;
  3246. } __attribute__((packed));
  3247. DEFINE_PACKET_HEADER(ZC_SSILIST_ITEM_CLICK_ACK, 0x83d);
  3248. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  3249. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub {
  3250. uint32 storeId;
  3251. uint32 AID;
  3252. char shopName[MESSAGE_SIZE];
  3253. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3254. uint32 itemId;
  3255. #else
  3256. uint16 itemId;
  3257. #endif
  3258. uint8 itemType;
  3259. uint32 price;
  3260. uint16 amount;
  3261. struct EQUIPSLOTINFO slot;
  3262. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3263. uint8 refine;
  3264. uint8 grade;
  3265. } __attribute__((packed));
  3266. struct PACKET_ZC_SEARCH_STORE_INFO_ACK {
  3267. int16 packetType;
  3268. int16 packetLength;
  3269. uint8 firstPage;
  3270. uint8 nextPage;
  3271. uint8 usesCount;
  3272. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub items[];
  3273. } __attribute__((packed));
  3274. DEFINE_PACKET_HEADER(ZC_SEARCH_STORE_INFO_ACK, 0x0b64);
  3275. #elif PACKETVER_MAIN_NUM >= 20100817 || PACKETVER_RE_NUM >= 20100706 || defined(PACKETVER_ZERO)
  3276. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub {
  3277. uint32 storeId;
  3278. uint32 AID;
  3279. char shopName[MESSAGE_SIZE];
  3280. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3281. uint32 itemId;
  3282. #else
  3283. uint16 itemId;
  3284. #endif
  3285. uint8 itemType;
  3286. uint32 price;
  3287. uint16 amount;
  3288. uint8 refine;
  3289. struct EQUIPSLOTINFO slot;
  3290. #if PACKETVER >= 20150226
  3291. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3292. #endif
  3293. } __attribute__((packed));
  3294. struct PACKET_ZC_SEARCH_STORE_INFO_ACK {
  3295. int16 packetType;
  3296. int16 packetLength;
  3297. uint8 firstPage;
  3298. uint8 nextPage;
  3299. uint8 usesCount;
  3300. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub items[];
  3301. } __attribute__((packed));
  3302. DEFINE_PACKET_HEADER(ZC_SEARCH_STORE_INFO_ACK, 0x0836);
  3303. #endif // PACKETVER_MAIN_NUM >= 20100817 || PACKETVER_RE_NUM >= 20100706 || defined(PACKETVER_ZERO)
  3304. /* Achievement System */
  3305. struct ach_list_info {
  3306. uint32 ach_id;
  3307. uint8 completed;
  3308. uint32 objective[MAX_ACHIEVEMENT_OBJECTIVES];
  3309. uint32 completed_at;
  3310. uint8 reward;
  3311. } __attribute__((packed));
  3312. struct packet_achievement_list {
  3313. uint16 packet_id;
  3314. uint16 packet_len;
  3315. uint32 total_achievements;
  3316. uint32 total_points;
  3317. uint16 rank;
  3318. uint32 current_rank_points;
  3319. uint32 next_rank_points;
  3320. struct ach_list_info ach[MAX_ACHIEVEMENT_DB];
  3321. } __attribute__((packed));
  3322. struct packet_achievement_update {
  3323. uint16 packet_id;
  3324. uint32 total_points;
  3325. uint16 rank;
  3326. uint32 current_rank_points;
  3327. uint32 next_rank_points;
  3328. struct ach_list_info ach;
  3329. } __attribute__((packed));
  3330. struct packet_achievement_reward_ack {
  3331. uint16 packet_id;
  3332. uint8 failed;
  3333. uint32 ach_id;
  3334. } __attribute__((packed));
  3335. // Name Packet ZC_ACK_REQNAME
  3336. struct packet_reqname_ack {
  3337. uint16 packet_id;
  3338. int32 gid;
  3339. char name[NAME_LENGTH];
  3340. } __attribute__((packed));
  3341. // ZC_ACK_REQNAMEALL / ZC_ACK_REQNAMEALL2
  3342. #if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
  3343. struct PACKET_ZC_ACK_REQNAMEALL {
  3344. uint16 packet_id;
  3345. int32 gid;
  3346. char name[NAME_LENGTH];
  3347. char party_name[NAME_LENGTH];
  3348. char guild_name[NAME_LENGTH];
  3349. char position_name[NAME_LENGTH];
  3350. int32 title_id;
  3351. } __attribute__((packed));
  3352. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0a30);
  3353. #else
  3354. struct PACKET_ZC_ACK_REQNAMEALL {
  3355. uint16 packet_id;
  3356. int32 gid;
  3357. char name[NAME_LENGTH];
  3358. char party_name[NAME_LENGTH];
  3359. char guild_name[NAME_LENGTH];
  3360. char position_name[NAME_LENGTH];
  3361. } __attribute__((packed));
  3362. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0195);
  3363. #endif
  3364. #if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
  3365. struct PACKET_ZC_ACK_REQNAMEALL_NPC {
  3366. uint16 packet_id;
  3367. int32 gid;
  3368. int32 groupId;
  3369. char name[NAME_LENGTH];
  3370. char title[NAME_LENGTH];
  3371. } __attribute__((packed));
  3372. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL_NPC, 0x0adf);
  3373. #else
  3374. struct PACKET_ZC_ACK_REQNAMEALL_NPC {
  3375. uint16 packet_id;
  3376. int32 gid;
  3377. char name[NAME_LENGTH];
  3378. } __attribute__((packed));
  3379. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL_NPC, 0x0095);
  3380. #endif
  3381. struct PACKET_ZC_OVERWEIGHT_PERCENT {
  3382. int16 packetType;
  3383. uint32 percent;
  3384. } __attribute__((packed));
  3385. struct PACKET_ZC_WARPLIST_sub {
  3386. char map[MAP_NAME_LENGTH_EXT];
  3387. } __attribute__((packed));
  3388. struct PACKET_ZC_WARPLIST {
  3389. int16 packetType;
  3390. #if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
  3391. int16 packetLength;
  3392. uint16 skillId;
  3393. struct PACKET_ZC_WARPLIST_sub maps[];
  3394. #else
  3395. uint16 skillId;
  3396. struct PACKET_ZC_WARPLIST_sub maps[4];
  3397. #endif
  3398. } __attribute__((packed));
  3399. struct PACKET_ZC_GROUP_ISALIVE {
  3400. int16 packetType;
  3401. uint32 AID;
  3402. uint8 isDead;
  3403. } __attribute__((packed));
  3404. struct PACKET_ZC_GUILD_POSITION {
  3405. int16 packetType;
  3406. int16 packetLength;
  3407. uint32 AID;
  3408. char position[];
  3409. } __attribute__((packed));
  3410. #if PACKETVER_MAIN_NUM >= 20161214 || PACKETVER_RE_NUM >= 20161130 || defined(PACKETVER_ZERO)
  3411. struct PACKET_ZC_MOVE_ITEM_FAILED {
  3412. int16 packetType;
  3413. int16 itemIndex;
  3414. int16 itemCount;
  3415. } __attribute__((packed));
  3416. DEFINE_PACKET_HEADER(ZC_MOVE_ITEM_FAILED, 0x0aa7);
  3417. #endif // PACKETVER_MAIN_NUM >= 20161214 || PACKETVER_RE_NUM >= 20161130 || defined(PACKETVER_ZERO)
  3418. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  3419. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD3
  3420. #elif PACKETVER >= 20100803
  3421. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD2
  3422. #else
  3423. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD1
  3424. #endif
  3425. struct PACKET_ZC_ACK_BAN_GUILD1 {
  3426. int16 packetType;
  3427. char name[NAME_LENGTH];
  3428. char reason[40];
  3429. char account_name[NAME_LENGTH];
  3430. } __attribute__((packed));
  3431. struct PACKET_ZC_ACK_BAN_GUILD2 {
  3432. int16 packetType;
  3433. char name[NAME_LENGTH];
  3434. char reason[40];
  3435. } __attribute__((packed));
  3436. struct PACKET_ZC_ACK_BAN_GUILD3 {
  3437. int16 packetType;
  3438. char reason[40];
  3439. uint32 GID;
  3440. } __attribute__((packed));
  3441. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  3442. #define PACKET_ZC_ACK_LEAVE_GUILD PACKET_ZC_ACK_LEAVE_GUILD2
  3443. #else
  3444. #define PACKET_ZC_ACK_LEAVE_GUILD PACKET_ZC_ACK_LEAVE_GUILD1
  3445. #endif
  3446. struct PACKET_ZC_ACK_LEAVE_GUILD1 {
  3447. int16 packetType;
  3448. char name[NAME_LENGTH];
  3449. char reason[40];
  3450. } __attribute__((packed));
  3451. struct PACKET_ZC_ACK_LEAVE_GUILD2 {
  3452. int16 packetType;
  3453. uint32 GID;
  3454. char reason[40];
  3455. } __attribute__((packed));
  3456. struct PACKET_CZ_MEMORIALDUNGEON_COMMAND {
  3457. int16 packetType;
  3458. int32 command;
  3459. } __attribute__((packed));
  3460. struct PACKET_ZC_REMOVE_EFFECT {
  3461. int16 packetType;
  3462. uint32 aid;
  3463. uint32 effectId;
  3464. } __attribute__((packed));
  3465. #if PACKETVER >= 20160525
  3466. struct PACKET_ZC_VIEW_CAMERAINFO {
  3467. int16 packetType;
  3468. int8 action;
  3469. float range;
  3470. float rotation;
  3471. float latitude;
  3472. } __attribute__((packed));
  3473. DEFINE_PACKET_HEADER(ZC_VIEW_CAMERAINFO, 0x0a78);
  3474. #endif
  3475. #if PACKETVER >= 20160525
  3476. struct PACKET_CZ_VIEW_CAMERAINFO {
  3477. int16 packetType;
  3478. int8 action;
  3479. float range;
  3480. float rotation;
  3481. float latitude;
  3482. } __attribute__((packed));
  3483. DEFINE_PACKET_HEADER(CZ_VIEW_CAMERAINFO, 0x0a77);
  3484. #endif
  3485. #if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
  3486. // PACKET_ZC_AUTOSPELLLIST2
  3487. struct PACKET_ZC_AUTOSPELLLIST {
  3488. int16 packetType;
  3489. int16 packetLength;
  3490. int skills[];
  3491. } __attribute__((packed));
  3492. DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x0afb);
  3493. #elif PACKETVER_MAIN_NUM >= 20090406 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_SAK_NUM >= 20080618
  3494. // PACKET_ZC_AUTOSPELLLIST1
  3495. struct PACKET_ZC_AUTOSPELLLIST {
  3496. int16 packetType;
  3497. int skills[7];
  3498. } __attribute__((packed));
  3499. DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x01cd);
  3500. #endif
  3501. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  3502. struct PACKET_ZC_CHANGE_ITEM_OPTION {
  3503. int16 packetType;
  3504. int16 index;
  3505. int8 isDamaged;
  3506. struct EQUIPSLOTINFO slot;
  3507. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3508. uint8 refiningLevel;
  3509. uint8 grade;
  3510. } __attribute__((packed));
  3511. DEFINE_PACKET_HEADER(ZC_CHANGE_ITEM_OPTION, 0x0b43);
  3512. #elif PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
  3513. struct PACKET_ZC_CHANGE_ITEM_OPTION {
  3514. int16 packetType;
  3515. int16 index;
  3516. int8 isDamaged;
  3517. int16 refiningLevel;
  3518. struct EQUIPSLOTINFO slot;
  3519. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3520. } __attribute__((packed));
  3521. DEFINE_PACKET_HEADER(ZC_CHANGE_ITEM_OPTION, 0x0b13);
  3522. #elif PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  3523. struct PACKET_ZC_CHANGE_ITEM_OPTION {
  3524. int16 packetType;
  3525. int16 index;
  3526. int16 refiningLevel;
  3527. struct EQUIPSLOTINFO slot;
  3528. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3529. } __attribute__((packed));
  3530. DEFINE_PACKET_HEADER(ZC_CHANGE_ITEM_OPTION, 0x0ab9);
  3531. #endif // PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
  3532. #if PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
  3533. struct PACKET_ZC_UPDATE_CARDSLOT {
  3534. int16 packetType;
  3535. int16 wearState;
  3536. int16 cardSlot;
  3537. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3538. int32 itemId;
  3539. #else
  3540. int16 itemId;
  3541. #endif
  3542. int8 equipFlag;
  3543. } __attribute__((packed));
  3544. DEFINE_PACKET_HEADER(ZC_UPDATE_CARDSLOT, 0x0a3f);
  3545. #endif // PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
  3546. #if PACKETVER_MAIN_NUM >= 20170830 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
  3547. struct PACKET_ZC_DEBUGMSG {
  3548. int16 packetType;
  3549. int16 packetLength;
  3550. int32 color;
  3551. char message[];
  3552. } __attribute__((packed));
  3553. DEFINE_PACKET_HEADER(ZC_DEBUGMSG, 0x0adb);
  3554. #endif
  3555. #if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
  3556. struct PACKET_CZ_USE_SKILL_START {
  3557. int16 packetType;
  3558. int16 skillId;
  3559. int16 skillLv;
  3560. uint32 targetId;
  3561. } __attribute__((packed));
  3562. DEFINE_PACKET_HEADER(CZ_USE_SKILL_START, 0x0b10);
  3563. struct PACKET_CZ_USE_SKILL_END {
  3564. int16 packetType;
  3565. int16 skillId;
  3566. } __attribute__((packed));
  3567. DEFINE_PACKET_HEADER(CZ_USE_SKILL_END, 0x0b11);
  3568. #endif
  3569. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  3570. struct PACKET_ZC_EXTEND_BODYITEM_SIZE {
  3571. int16 packetType;
  3572. int16 expansionSize;
  3573. } __attribute__((packed));
  3574. DEFINE_PACKET_HEADER(ZC_EXTEND_BODYITEM_SIZE, 0x0b18);
  3575. #endif
  3576. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  3577. struct PACKET_ZC_ACK_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE {
  3578. int16 packetType;
  3579. uint8 result;
  3580. uint32 itemId;
  3581. } __attribute__((packed));
  3582. DEFINE_PACKET_HEADER(ZC_ACK_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE, 0x0b15);
  3583. #endif
  3584. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  3585. struct PACKET_ZC_ACK_EXTEND_BODYITEM_SIZE {
  3586. int16 packetType;
  3587. uint8 result;
  3588. } __attribute__((packed));
  3589. DEFINE_PACKET_HEADER(ZC_ACK_EXTEND_BODYITEM_SIZE, 0x0b17);
  3590. #endif
  3591. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  3592. struct PACKET_CZ_REQ_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE {
  3593. int16 packetType;
  3594. } __attribute__((packed));
  3595. DEFINE_PACKET_HEADER(CZ_REQ_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE, 0x0b14);
  3596. #endif
  3597. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  3598. struct PACKET_CZ_REQ_EXTEND_BODYITEM_SIZE {
  3599. int16 packetType;
  3600. } __attribute__((packed));
  3601. DEFINE_PACKET_HEADER(CZ_REQ_EXTEND_BODYITEM_SIZE, 0x0b16);
  3602. #endif
  3603. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  3604. struct PACKET_CZ_CLOSE_MSGBOX_EXTEND_BODYITEM_SIZE {
  3605. int16 packetType;
  3606. } __attribute__((packed));
  3607. DEFINE_PACKET_HEADER(CZ_CLOSE_MSGBOX_EXTEND_BODYITEM_SIZE, 0x0b19);
  3608. #endif
  3609. struct PACKET_CZ_REQ_REMAINTIME {
  3610. int16 packetType;
  3611. } __attribute__((packed));
  3612. DEFINE_PACKET_HEADER(CZ_REQ_REMAINTIME, 0x01c0);
  3613. struct PACKET_CZ_PARTY_CONFIG {
  3614. int16 packetType;
  3615. uint8 refuseInvite;
  3616. } __attribute__((packed));
  3617. DEFINE_PACKET_HEADER(CZ_PARTY_CONFIG, 0x02c8);
  3618. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  3619. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO_sub {
  3620. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3621. uint32 nameid;
  3622. #else
  3623. uint16 nameid;
  3624. #endif
  3625. uint8 type;
  3626. uint32 amount;
  3627. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3628. uint32 currencyNameid;
  3629. #else
  3630. uint16 currencyNameid;
  3631. #endif
  3632. uint32 currencyAmount;
  3633. uint32 weight;
  3634. uint32 index;
  3635. uint16 viewSprite;
  3636. uint32 location;
  3637. } __attribute__((packed));
  3638. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO {
  3639. int16 packetType;
  3640. int16 packetLength;
  3641. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO_sub list[];
  3642. } __attribute__((packed));
  3643. DEFINE_PACKET_HEADER(ZC_NPC_BARTER_MARKET_ITEMINFO, 0x0b78);
  3644. #elif PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  3645. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO_sub {
  3646. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3647. uint32 nameid;
  3648. #else
  3649. uint16 nameid;
  3650. #endif
  3651. uint8 type;
  3652. uint32 amount;
  3653. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3654. uint32 currencyNameid;
  3655. #else
  3656. uint16 currencyNameid;
  3657. #endif
  3658. uint32 currencyAmount;
  3659. uint32 weight;
  3660. uint32 index;
  3661. } __attribute__((packed));
  3662. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO {
  3663. int16 packetType;
  3664. int16 packetLength;
  3665. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO_sub list[];
  3666. } __attribute__((packed));
  3667. DEFINE_PACKET_HEADER(ZC_NPC_BARTER_MARKET_ITEMINFO, 0x0b0e);
  3668. #endif
  3669. #if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  3670. struct PACKET_CZ_NPC_BARTER_MARKET_CLOSE {
  3671. int16 packetType;
  3672. } __attribute__((packed));
  3673. DEFINE_PACKET_HEADER(CZ_NPC_BARTER_MARKET_CLOSE, 0x0b12);
  3674. #endif
  3675. #if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  3676. struct PACKET_CZ_NPC_BARTER_MARKET_PURCHASE_sub {
  3677. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3678. uint32 itemId;
  3679. #else
  3680. uint16 itemId;
  3681. #endif
  3682. uint32 amount;
  3683. uint16 invIndex;
  3684. uint32 shopIndex;
  3685. } __attribute__((packed));
  3686. struct PACKET_CZ_NPC_BARTER_MARKET_PURCHASE {
  3687. int16 packetType;
  3688. int16 packetLength;
  3689. struct PACKET_CZ_NPC_BARTER_MARKET_PURCHASE_sub list[];
  3690. } __attribute__((packed));
  3691. DEFINE_PACKET_HEADER(CZ_NPC_BARTER_MARKET_PURCHASE, 0x0b0f);
  3692. #endif
  3693. #if PACKETVER_MAIN_NUM >= 20181212 || PACKETVER_RE_NUM >= 20181212 || PACKETVER_ZERO_NUM >= 20190130
  3694. struct PACKET_ZC_USESKILL_ACK {
  3695. int16 packetType;
  3696. uint32 srcId;
  3697. uint32 dstId;
  3698. uint16 x;
  3699. uint16 y;
  3700. uint16 skillId;
  3701. uint32 element;
  3702. uint32 delayTime;
  3703. uint8 disposable;
  3704. uint32 attackMT;
  3705. } __attribute__((packed));
  3706. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x0b1a);
  3707. #elif PACKETVER_MAIN_NUM >= 20091124 || PACKETVER_RE_NUM >= 20091124 || defined(PACKETVER_ZERO)
  3708. struct PACKET_ZC_USESKILL_ACK {
  3709. int16 packetType;
  3710. uint32 srcId;
  3711. uint32 dstId;
  3712. uint16 x;
  3713. uint16 y;
  3714. uint16 skillId;
  3715. uint32 element;
  3716. uint32 delayTime;
  3717. uint8 disposable;
  3718. } __attribute__((packed));
  3719. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x07fb);
  3720. #elif PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_SAK_NUM >= 20080618 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
  3721. struct PACKET_ZC_USESKILL_ACK {
  3722. int16 packetType;
  3723. uint32 srcId;
  3724. uint32 dstId;
  3725. uint16 x;
  3726. uint16 y;
  3727. uint16 skillId;
  3728. uint32 element;
  3729. uint32 delayTime;
  3730. } __attribute__((packed));
  3731. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x013e);
  3732. #endif
  3733. #if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
  3734. struct PACKET_CZ_CLIENT_VERSION {
  3735. int16 packetType;
  3736. uint32 clientVersion;
  3737. } __attribute__((packed));
  3738. DEFINE_PACKET_HEADER(CZ_CLIENT_VERSION, 0x044a);
  3739. #endif
  3740. #if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
  3741. struct PACKET_CZ_PING_LIVE {
  3742. int16 packetType;
  3743. } __attribute__((packed));
  3744. DEFINE_PACKET_HEADER(CZ_PING_LIVE, 0x0b1c);
  3745. #endif
  3746. #if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
  3747. struct PACKET_ZC_PING_LIVE {
  3748. int16 packetType;
  3749. } __attribute__((packed));
  3750. DEFINE_PACKET_HEADER(ZC_PING_LIVE, 0x0b1d);
  3751. #endif
  3752. #if PACKETVER >= 20160622
  3753. struct PACKET_CZ_CMD_RESETCOOLTIME {
  3754. int16 packetType;
  3755. } __attribute__((packed));
  3756. DEFINE_PACKET_HEADER(CZ_CMD_RESETCOOLTIME, 0x0a88);
  3757. #endif
  3758. #if PACKETVER >= 20151104
  3759. struct PACKET_CZ_CLOSE_UI_STYLINGSHOP {
  3760. int16 packetType;
  3761. } __attribute__((packed));
  3762. DEFINE_PACKET_HEADER(CZ_CLOSE_UI_STYLINGSHOP, 0x0a48);
  3763. #endif
  3764. #if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320 || PACKETVER_ZERO_NUM >= 20190410
  3765. struct PACKET_ZC_NOTIFY_ACTORINIT {
  3766. int16 packetType;
  3767. } __attribute__((packed));
  3768. DEFINE_PACKET_HEADER(ZC_NOTIFY_ACTORINIT, 0x0b1b);
  3769. #endif
  3770. #if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO)
  3771. struct PACKET_ZC_PARTY_CONFIG {
  3772. int16 packetType;
  3773. uint8 denyPartyInvites;
  3774. } __attribute__((packed));
  3775. DEFINE_PACKET_HEADER(ZC_PARTY_CONFIG, 0x02c9);
  3776. #endif
  3777. struct PACKET_ZC_ROLE_CHANGE {
  3778. int16 packetType;
  3779. int32 flag;
  3780. char name[NAME_LENGTH];
  3781. } __attribute__((packed));
  3782. DEFINE_PACKET_HEADER(ZC_ROLE_CHANGE, 0x00e1);
  3783. #if PACKETVER >= 20200902
  3784. struct PACKET_ZC_BAN_LIST_sub {
  3785. int char_id;
  3786. char message[40];
  3787. char char_name[NAME_LENGTH];
  3788. } __attribute__((packed));
  3789. struct PACKET_ZC_BAN_LIST {
  3790. int16 packetType;
  3791. uint16 packetLen;
  3792. struct PACKET_ZC_BAN_LIST_sub chars[];
  3793. } __attribute__((packed));
  3794. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0b7c);
  3795. #elif PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  3796. struct PACKET_ZC_BAN_LIST_sub {
  3797. int char_id;
  3798. char message[40];
  3799. } __attribute__((packed));
  3800. struct PACKET_ZC_BAN_LIST {
  3801. int16 packetType;
  3802. uint16 packetLen;
  3803. struct PACKET_ZC_BAN_LIST_sub chars[];
  3804. } __attribute__((packed));
  3805. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0a87);
  3806. // version unconfirmed
  3807. #elif PACKETVER >= 20100803
  3808. struct PACKET_ZC_BAN_LIST_sub {
  3809. char char_name[NAME_LENGTH];
  3810. char message[40];
  3811. } __attribute__((packed));
  3812. struct PACKET_ZC_BAN_LIST {
  3813. int16 packetType;
  3814. uint16 packetLen;
  3815. struct PACKET_ZC_BAN_LIST_sub chars[];
  3816. } __attribute__((packed));
  3817. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
  3818. #else
  3819. struct PACKET_ZC_BAN_LIST_sub {
  3820. char char_name[NAME_LENGTH];
  3821. char account_name[NAME_LENGTH];
  3822. char message[40];
  3823. } __attribute__((packed));
  3824. struct PACKET_ZC_BAN_LIST {
  3825. int16 packetType;
  3826. uint16 packetLen;
  3827. struct PACKET_ZC_BAN_LIST_sub chars[];
  3828. } __attribute__((packed));
  3829. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
  3830. #endif
  3831. #if PACKETVER_MAIN_NUM >= 20141008 || PACKETVER_RE_NUM >= 20140903 || defined(PACKETVER_ZERO)
  3832. struct PACKET_ZC_ACK_CLOSE_ROULETTE {
  3833. int16 packetType;
  3834. uint8 result;
  3835. } __attribute__((packed));
  3836. DEFINE_PACKET_HEADER(ZC_ACK_CLOSE_ROULETTE, 0x0a1e);
  3837. #endif
  3838. #if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
  3839. struct PACKET_ZC_ACK_MERGE_ITEM {
  3840. int16 packetType;
  3841. int16 index;
  3842. int16 amount;
  3843. uint8 reason;
  3844. } __attribute__((packed));
  3845. DEFINE_PACKET_HEADER(ZC_ACK_MERGE_ITEM, 0x096f);
  3846. #endif
  3847. #if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
  3848. struct PACKET_ZC_MERGE_ITEM_OPEN_sub {
  3849. int16 index;
  3850. } __attribute__((packed));
  3851. struct PACKET_ZC_MERGE_ITEM_OPEN {
  3852. int16 packetType;
  3853. uint16 packetLen;
  3854. struct PACKET_ZC_MERGE_ITEM_OPEN_sub items[];
  3855. } __attribute__((packed));
  3856. DEFINE_PACKET_HEADER(ZC_MERGE_ITEM_OPEN, 0x096d);
  3857. #endif
  3858. #if PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
  3859. struct PACKET_ZC_SE_PC_BUY_CASHITEM_RESULT {
  3860. int16 packetType;
  3861. uint32 itemId; // unused
  3862. uint16 result;
  3863. uint32 cashPoints;
  3864. uint32 kafraPoints;
  3865. } __attribute__((packed));
  3866. DEFINE_PACKET_HEADER(ZC_SE_PC_BUY_CASHITEM_RESULT, 0x0849);
  3867. #endif
  3868. #if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
  3869. struct PACKET_ZC_OPEN_REFINING_UI {
  3870. int16 packetType;
  3871. } __attribute__((packed));
  3872. DEFINE_PACKET_HEADER(ZC_OPEN_REFINING_UI, 0x0aa0);
  3873. #endif
  3874. #if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
  3875. struct PACKET_CZ_REFINING_SELECT_ITEM {
  3876. int16 packetType;
  3877. int16 index;
  3878. };
  3879. DEFINE_PACKET_HEADER(CZ_REFINING_SELECT_ITEM, 0x0aa1);
  3880. #endif
  3881. #if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
  3882. struct PACKET_ZC_REFINING_MATERIAL_LIST_SUB {
  3883. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3884. uint32 itemId;
  3885. #else
  3886. uint16 itemId;
  3887. #endif
  3888. int8 chance;
  3889. int32 zeny;
  3890. } __attribute__((packed));
  3891. struct PACKET_ZC_REFINING_MATERIAL_LIST {
  3892. int16 packetType;
  3893. int16 packetLength;
  3894. int16 itemIndex;
  3895. int8 blacksmithBlessing;
  3896. struct PACKET_ZC_REFINING_MATERIAL_LIST_SUB req[];
  3897. } __attribute__((packed));
  3898. DEFINE_PACKET_HEADER(ZC_REFINING_MATERIAL_LIST, 0x0aa2);
  3899. #endif
  3900. #if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
  3901. struct PACKET_CZ_REQ_REFINING {
  3902. int16 packetType;
  3903. int16 index;
  3904. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3905. uint32 itemId;
  3906. #else
  3907. uint16 itemId;
  3908. #endif
  3909. int8 blacksmithBlessing;
  3910. } __attribute__((packed));
  3911. DEFINE_PACKET_HEADER(CZ_REQ_REFINING, 0x0aa3);
  3912. struct PACKET_CZ_CLOSE_REFINING_UI {
  3913. int16 packetType;
  3914. } __attribute__((packed));
  3915. DEFINE_PACKET_HEADER(CZ_CLOSE_REFINING_UI, 0x0aa4);
  3916. #endif
  3917. #if PACKETVER_MAIN_NUM >= 20170906 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
  3918. struct PACKET_ZC_BROADCAST_ITEMREFINING_RESULT {
  3919. int16 packetType;
  3920. char name[NAME_LENGTH];
  3921. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3922. uint32 itemId;
  3923. #else
  3924. uint16 itemId;
  3925. #endif
  3926. int8 refine_level;
  3927. int8 status;
  3928. } __attribute__((packed));
  3929. DEFINE_PACKET_HEADER(ZC_BROADCAST_ITEMREFINING_RESULT, 0x0ada);
  3930. #endif
  3931. struct PACKET_ZC_STATUS_CHANGE_ACK {
  3932. int16 packetType;
  3933. uint16 sp;
  3934. uint8 ok;
  3935. uint8 value;
  3936. } __attribute__((packed));
  3937. DEFINE_PACKET_HEADER(ZC_STATUS_CHANGE_ACK, 0x00bc);
  3938. #if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
  3939. struct PACKET_ZC_EQUIPMENT_EFFECT {
  3940. int16 packetType;
  3941. int16 packetLength;
  3942. uint32 aid;
  3943. int8 status;
  3944. uint16 effects[];
  3945. } __attribute__((packed));
  3946. DEFINE_PACKET_HEADER(ZC_EQUIPMENT_EFFECT, 0x0a3b);
  3947. #endif
  3948. // [4144] this struct updated not in all packets in client
  3949. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3950. struct SKILLDATA {
  3951. uint16 id;
  3952. int inf;
  3953. uint16 level;
  3954. uint16 sp;
  3955. uint16 range2;
  3956. uint8 upFlag;
  3957. uint16 level2;
  3958. } __attribute__((packed));
  3959. #else
  3960. struct SKILLDATA {
  3961. uint16 id;
  3962. int inf;
  3963. uint16 level;
  3964. uint16 sp;
  3965. uint16 range2;
  3966. char name[NAME_LENGTH];
  3967. uint8 upFlag;
  3968. } __attribute__((packed));
  3969. #endif
  3970. struct PACKET_ZC_ADD_SKILL {
  3971. int16 packetType;
  3972. struct SKILLDATA skill;
  3973. } __attribute__((packed));
  3974. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3975. DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0b31);
  3976. #else
  3977. DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0111);
  3978. #endif
  3979. struct PACKET_ZC_SKILLINFO_LIST {
  3980. int16 packetType;
  3981. int16 packetLength;
  3982. struct SKILLDATA skills[];
  3983. } __attribute__((packed));
  3984. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3985. DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x0b32);
  3986. #else
  3987. DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x010f);
  3988. #endif
  3989. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3990. struct PACKET_ZC_SKILLINFO_UPDATE2 {
  3991. int16 packetType;
  3992. uint16 id;
  3993. int32 inf;
  3994. uint16 level;
  3995. uint16 sp;
  3996. uint16 range2;
  3997. uint8 upFlag;
  3998. uint16 level2;
  3999. } __attribute__((packed));
  4000. DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x0b33);
  4001. #else
  4002. struct PACKET_ZC_SKILLINFO_UPDATE2 {
  4003. int16 packetType;
  4004. uint16 id;
  4005. int32 inf;
  4006. uint16 level;
  4007. uint16 sp;
  4008. uint16 range2;
  4009. uint8 upFlag;
  4010. } __attribute__((packed));
  4011. DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x07e1);
  4012. #endif
  4013. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub {
  4014. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4015. uint32 ITID;
  4016. #else
  4017. uint16 ITID;
  4018. #endif
  4019. uint16 qty;
  4020. uint32 price;
  4021. } __attribute__((packed));
  4022. #if PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
  4023. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT {
  4024. int16 PacketType;
  4025. int16 PacketLength;
  4026. uint16 result;
  4027. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[];
  4028. } __attribute__((packed));
  4029. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x0b4e);
  4030. #elif PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20130911 || defined(PACKETVER_ZERO)
  4031. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT {
  4032. int16 PacketType;
  4033. int16 PacketLength;
  4034. uint8 result;
  4035. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[];
  4036. } __attribute__((packed));
  4037. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x09d7);
  4038. #endif
  4039. struct PACKET_ZC_TALKBOX_CHATCONTENTS {
  4040. int16 PacketType;
  4041. uint32 aid;
  4042. char message[TALKBOX_MESSAGE_SIZE];
  4043. } __attribute__((packed));
  4044. DEFINE_PACKET_HEADER(ZC_TALKBOX_CHATCONTENTS, 0x0191);
  4045. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  4046. struct PACKET_ZC_GUILD_AGIT_INFO {
  4047. int16 packetType;
  4048. int16 packetLength;
  4049. int8 castle_list[];
  4050. } __attribute__((packed));
  4051. DEFINE_PACKET_HEADER(ZC_GUILD_AGIT_INFO, 0x0b27);
  4052. #endif
  4053. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190522 || PACKETVER_ZERO_NUM >= 20190515
  4054. struct PACKET_CZ_REQ_MOVE_GUILD_AGIT {
  4055. int16 packetType;
  4056. int8 castle_id;
  4057. } __attribute__((packed));
  4058. DEFINE_PACKET_HEADER(CZ_REQ_MOVE_GUILD_AGIT, 0x0b28);
  4059. #endif
  4060. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  4061. struct PACKET_ZC_REQ_ACK_MOVE_GUILD_AGIT {
  4062. int16 packetType;
  4063. int16 result;
  4064. } __attribute__((packed));
  4065. DEFINE_PACKET_HEADER(ZC_REQ_ACK_MOVE_GUILD_AGIT, 0x0b2e);
  4066. #endif
  4067. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  4068. struct PACKET_ZC_REQ_ACK_AGIT_INVESTMENT {
  4069. int16 packetType;
  4070. int8 castle_id;
  4071. int32 economy;
  4072. int32 defense;
  4073. } __attribute__((packed));
  4074. DEFINE_PACKET_HEADER(ZC_REQ_ACK_AGIT_INVESTMENT, 0x0b2d);
  4075. #endif
  4076. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190522 || PACKETVER_ZERO_NUM >= 20190515
  4077. struct PACKET_CZ_REQ_AGIT_INVESTMENT {
  4078. int16 packetType;
  4079. int8 castle_id;
  4080. } __attribute__((packed));
  4081. DEFINE_PACKET_HEADER(CZ_REQ_AGIT_INVESTMENT, 0x0b2c);
  4082. #endif
  4083. #if PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  4084. struct PACKET_ZC_RANDOM_COMBINE_ITEM_UI_OPEN {
  4085. int16 packetType;
  4086. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4087. int32 itemId;
  4088. #else
  4089. int16 itemId;
  4090. #endif
  4091. } __attribute__((packed));
  4092. DEFINE_PACKET_HEADER(ZC_RANDOM_COMBINE_ITEM_UI_OPEN, 0x0a4e);
  4093. #endif // PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  4094. #if PACKETVER_MAIN_NUM >= 20160504 || PACKETVER_RE_NUM >= 20160504 || defined(PACKETVER_ZERO)
  4095. struct PACKET_CZ_RANDOM_COMBINE_ITEM_UI_CLOSE {
  4096. int16 packetType;
  4097. } __attribute__((packed));
  4098. DEFINE_PACKET_HEADER(CZ_RANDOM_COMBINE_ITEM_UI_CLOSE, 0x0a70);
  4099. #endif // PACKETVER_MAIN_NUM >= 20160504 || PACKETVER_RE_NUM >= 20160504 || defined(PACKETVER_ZERO)
  4100. #if PACKETVER >= 20160302
  4101. struct PACKET_CZ_REQ_RANDOM_COMBINE_ITEM_sub {
  4102. int16 index;
  4103. int16 count;
  4104. } __attribute__((packed));
  4105. struct PACKET_CZ_REQ_RANDOM_COMBINE_ITEM {
  4106. int16 packetType;
  4107. int16 packetLength;
  4108. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4109. int32 itemId;
  4110. #else
  4111. int16 itemId;
  4112. #endif
  4113. struct PACKET_CZ_REQ_RANDOM_COMBINE_ITEM_sub items[];
  4114. } __attribute__((packed));
  4115. DEFINE_PACKET_HEADER(CZ_REQ_RANDOM_COMBINE_ITEM, 0x0a4f);
  4116. #endif // PACKETVER >= 20160302
  4117. #if PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  4118. struct PACKET_ZC_ACK_RANDOM_COMBINE_ITEM {
  4119. int16 packetType;
  4120. int16 result;
  4121. } __attribute__((packed));
  4122. DEFINE_PACKET_HEADER(ZC_ACK_RANDOM_COMBINE_ITEM, 0x0a50);
  4123. #endif // PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  4124. #if PACKETVER_MAIN_NUM >= 20190703 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190709
  4125. struct PACKET_CZ_UNINSTALLATION {
  4126. int16 PacketType;
  4127. uint8 InstallationKind;
  4128. } __attribute__((packed));
  4129. DEFINE_PACKET_HEADER(CZ_UNINSTALLATION, 0x0b35);
  4130. #endif
  4131. // in 3 clients from same version
  4132. #if PACKETVER >= 20191127
  4133. struct PACKET_ZC_NOTIFY_EFFECT3 {
  4134. int16 packetType;
  4135. uint32 aid;
  4136. uint32 effectId;
  4137. uint64 num;
  4138. } __attribute__((packed));
  4139. DEFINE_PACKET_HEADER(ZC_NOTIFY_EFFECT3, 0x0b69);
  4140. #elif PACKETVER_MAIN_NUM >= 20060911 || PACKETVER_AD_NUM >= 20060911 || PACKETVER_SAK_NUM >= 20060911 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO)
  4141. struct PACKET_ZC_NOTIFY_EFFECT3 {
  4142. int16 packetType;
  4143. uint32 aid;
  4144. uint32 effectId;
  4145. uint32 num;
  4146. } __attribute__((packed));
  4147. DEFINE_PACKET_HEADER(ZC_NOTIFY_EFFECT3, 0x0284);
  4148. #endif
  4149. #if PACKETVER >= 20100824
  4150. struct PACKET_CZ_SE_CASHSHOP_OPEN1 {
  4151. int16 packetType;
  4152. } __attribute__((packed));
  4153. DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN1, 0x0844);
  4154. #endif
  4155. #if PACKETVER >= 20191224
  4156. struct PACKET_CZ_SE_CASHSHOP_OPEN2 {
  4157. int16 packetType;
  4158. uint32 tab;
  4159. } __attribute__((packed));
  4160. DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN2, 0x0b6d);
  4161. #endif
  4162. #if PACKETVER >= 20190724
  4163. struct PACKET_CZ_GET_ACCOUNT_LIMTIED_SALE_LIST {
  4164. int16 packetType;
  4165. } __attribute__((packed));
  4166. DEFINE_PACKET_HEADER(CZ_GET_ACCOUNT_LIMTIED_SALE_LIST, 0x0b4c);
  4167. #endif
  4168. #if PACKETVER_MAIN_NUM >= 20200129 || PACKETVER_RE_NUM >= 20200205 || PACKETVER_ZERO_NUM >= 20191224
  4169. struct PACKET_ZC_SE_CASHSHOP_OPEN {
  4170. int16 packetType;
  4171. uint32 cashPoints;
  4172. uint32 kafraPoints;
  4173. uint32 tab;
  4174. } __attribute__((packed));
  4175. DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0b6e);
  4176. #elif PACKETVER >= 20140730
  4177. struct PACKET_ZC_SE_CASHSHOP_OPEN {
  4178. int16 packetType;
  4179. uint32 cashPoints;
  4180. uint32 kafraPoints;
  4181. uint32 tab;
  4182. } __attribute__((packed));
  4183. DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0a2b);
  4184. #elif PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
  4185. struct PACKET_ZC_SE_CASHSHOP_OPEN {
  4186. int16 packetType;
  4187. uint32 cashPoints;
  4188. uint32 kafraPoints;
  4189. } __attribute__((packed));
  4190. DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0845);
  4191. #endif
  4192. #if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
  4193. struct PACKET_CZ_NPC_EXPANDED_BARTER_MARKET_CLOSE {
  4194. int16 packetType;
  4195. } __attribute__((packed));
  4196. DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_MARKET_CLOSE, 0x0b58);
  4197. #endif
  4198. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4199. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub2 {
  4200. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4201. uint32 nameid;
  4202. #else
  4203. uint16 nameid;
  4204. #endif
  4205. uint16 refine_level;
  4206. uint32 amount;
  4207. uint16 type;
  4208. } __attribute__((packed));
  4209. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub {
  4210. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4211. uint32 nameid;
  4212. #else
  4213. uint16 nameid;
  4214. #endif
  4215. uint16 type;
  4216. uint32 amount;
  4217. uint32 weight;
  4218. uint32 index;
  4219. uint32 zeny;
  4220. uint16 viewSprite;
  4221. uint32 location;
  4222. uint32 currency_count;
  4223. // Workaround: this should be currencies[], but compilers do not support multiple layers of incomplete types. See error C2233
  4224. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub2 currencies[1];
  4225. } __attribute__((packed));
  4226. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO {
  4227. int16 packetType;
  4228. int16 packetLength;
  4229. int32 items_count;
  4230. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub items[];
  4231. } __attribute__((packed));
  4232. DEFINE_PACKET_HEADER(ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO, 0x0b79);
  4233. #elif PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127
  4234. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub2 {
  4235. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4236. uint32 nameid;
  4237. #else
  4238. uint16 nameid;
  4239. #endif
  4240. uint16 refine_level;
  4241. uint32 amount;
  4242. uint16 type;
  4243. } __attribute__((packed));
  4244. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub {
  4245. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4246. uint32 nameid;
  4247. #else
  4248. uint16 nameid;
  4249. #endif
  4250. uint16 type;
  4251. uint32 amount;
  4252. uint32 weight;
  4253. uint32 index;
  4254. uint32 zeny;
  4255. uint32 currency_count;
  4256. // Workaround: this should be currencies[], but compilers do not support multiple layers of incomplete types. See error C2233
  4257. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub2 currencies[1];
  4258. } __attribute__((packed));
  4259. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO {
  4260. int16 packetType;
  4261. int16 packetLength;
  4262. int32 items_count;
  4263. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub items[];
  4264. } __attribute__((packed));
  4265. DEFINE_PACKET_HEADER(ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO, 0x0b56);
  4266. #endif // PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127
  4267. #if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
  4268. struct PACKET_CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE_sub {
  4269. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4270. uint32 itemId;
  4271. #else
  4272. uint16 itemId;
  4273. #endif
  4274. uint32 shopIndex;
  4275. uint32 amount;
  4276. } __attribute__((packed));
  4277. struct PACKET_CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE {
  4278. int16 packetType;
  4279. int16 packetLength;
  4280. struct PACKET_CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE_sub list[];
  4281. } __attribute__((packed));
  4282. DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE, 0x0b57);
  4283. #endif
  4284. #if PACKETVER >= 7
  4285. struct PACKET_ZC_STATE_CHANGE {
  4286. int16 packetType;
  4287. uint32 AID;
  4288. int16 bodyState;
  4289. int16 healthState;
  4290. int32 effectState;
  4291. int8 isPKModeON;
  4292. } __attribute__((packed));
  4293. DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0229);
  4294. #else
  4295. struct PACKET_ZC_STATE_CHANGE {
  4296. int16 PacketType;
  4297. uint32 AID;
  4298. int16 bodyState;
  4299. int16 healthState;
  4300. int16 effectState;
  4301. int8 isPKModeON;
  4302. } __attribute__((packed));
  4303. DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0119);
  4304. #endif
  4305. struct PACKET_ZC_AUTORUN_SKILL {
  4306. int16 packetType;
  4307. uint16 skill_id;
  4308. uint32 skill_type;
  4309. uint16 skill_lv;
  4310. uint16 skill_sp;
  4311. uint16 skill_range;
  4312. char skill_name[NAME_LENGTH];
  4313. char up_flag;
  4314. } __attribute__((packed));
  4315. DEFINE_PACKET_HEADER(ZC_AUTORUN_SKILL, 0x0147);
  4316. #if PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  4317. struct PACKET_ZC_RANDOM_UPGRADE_ITEM_UI_OPEN {
  4318. int16 packetType;
  4319. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4320. uint32 itemId;
  4321. #else
  4322. uint16 itemId;
  4323. #endif
  4324. } __attribute__((packed));
  4325. DEFINE_PACKET_HEADER(ZC_RANDOM_UPGRADE_ITEM_UI_OPEN, 0x0ab4);
  4326. struct PACKET_ZC_ACK_RANDOM_UPGRADE_ITEM {
  4327. int16 packetType;
  4328. uint16 result;
  4329. } __attribute__((packed));
  4330. DEFINE_PACKET_HEADER(ZC_ACK_RANDOM_UPGRADE_ITEM, 0x0ab7);
  4331. #endif // PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  4332. #if PACKETVER_MAIN_NUM >= 20170111 || PACKETVER_RE_NUM >= 20170111 || defined(PACKETVER_ZERO)
  4333. struct PACKET_CZ_RANDOM_UPGRADE_ITEM_UI_CLOSE {
  4334. int16 packetType;
  4335. } __attribute__((packed));
  4336. DEFINE_PACKET_HEADER(CZ_RANDOM_UPGRADE_ITEM_UI_CLOSE, 0x0ab5);
  4337. struct PACKET_CZ_REQ_RANDOM_UPGRADE_ITEM {
  4338. int16 packetType;
  4339. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4340. uint32 itemId;
  4341. #else
  4342. uint16 itemId;
  4343. #endif
  4344. uint16 index;
  4345. } __attribute__((packed));
  4346. DEFINE_PACKET_HEADER(CZ_REQ_RANDOM_UPGRADE_ITEM, 0x0ab6);
  4347. #endif // PACKETVER_MAIN_NUM >= 20170111 || PACKETVER_RE_NUM >= 20170111 || defined(PACKETVER_ZERO)
  4348. #if PACKETVER_MAIN_NUM >= 20120503 || PACKETVER_RE_NUM >= 20120502 || defined(PACKETVER_ZERO)
  4349. struct PACKET_ZC_PERSONAL_INFOMATION_SUB {
  4350. int8 type;
  4351. int32 exp;
  4352. int32 death;
  4353. int32 drop;
  4354. } __attribute__((packed));
  4355. struct PACKET_ZC_PERSONAL_INFOMATION {
  4356. int16 packetType;
  4357. int16 length;
  4358. int32 total_exp;
  4359. int32 total_death;
  4360. int32 total_drop;
  4361. struct PACKET_ZC_PERSONAL_INFOMATION_SUB details[];
  4362. } __attribute__((packed));
  4363. DEFINE_PACKET_HEADER(ZC_PERSONAL_INFOMATION, 0x097b);
  4364. #elif PACKETVER_MAIN_NUM >= 20110627 || PACKETVER_RE_NUM >= 20110628
  4365. struct PACKET_ZC_PERSONAL_INFOMATION_SUB {
  4366. int8 type;
  4367. int16 exp;
  4368. int16 death;
  4369. int16 drop;
  4370. } __attribute__((packed));
  4371. struct PACKET_ZC_PERSONAL_INFOMATION {
  4372. int16 packetType;
  4373. int16 length;
  4374. int16 total_exp;
  4375. int16 total_death;
  4376. int16 total_drop;
  4377. struct PACKET_ZC_PERSONAL_INFOMATION_SUB details[];
  4378. } __attribute__((packed));
  4379. DEFINE_PACKET_HEADER(ZC_PERSONAL_INFOMATION, 0x08cb);
  4380. #endif // PACKETVER_MAIN_NUM >= 20110627 || PACKETVER_RE_NUM >= 20110628
  4381. struct PACKET_CZ_REQUEST_ACTNPC {
  4382. int16 packetType;
  4383. uint32 GID;
  4384. uint32 targetGID;
  4385. int8 action;
  4386. } __attribute__((packed));
  4387. #if PACKETVER < 3
  4388. struct PACKET_ZC_NOTIFY_SKILL {
  4389. int16 PacketType;
  4390. uint16 SKID;
  4391. uint32 AID;
  4392. uint32 targetID;
  4393. uint32 startTime;
  4394. int32 attackMT;
  4395. int32 attackedMT;
  4396. int16 damage;
  4397. int16 level;
  4398. int16 count;
  4399. int8 action;
  4400. } __attribute__((packed));
  4401. DEFINE_PACKET_HEADER(ZC_NOTIFY_SKILL, 0x0114);
  4402. #else
  4403. struct PACKET_ZC_NOTIFY_SKILL {
  4404. int16 PacketType;
  4405. uint16 SKID;
  4406. uint32 AID;
  4407. uint32 targetID;
  4408. uint32 startTime;
  4409. int32 attackMT;
  4410. int32 attackedMT;
  4411. int32 damage;
  4412. int16 level;
  4413. int16 count;
  4414. int8 action;
  4415. } __attribute__((packed));
  4416. DEFINE_PACKET_HEADER(ZC_NOTIFY_SKILL, 0x01de);
  4417. #endif
  4418. #if PACKETVER_MAIN_NUM >= 20130731 || PACKETVER_RE_NUM >= 20130724 || defined(PACKETVER_ZERO)
  4419. struct PACKET_ZC_USE_SKILL {
  4420. int16 PacketType;
  4421. uint16 SKID;
  4422. int32 level;
  4423. uint32 targetAID;
  4424. uint32 srcAID;
  4425. int8 result;
  4426. } __attribute__((packed));
  4427. DEFINE_PACKET_HEADER(ZC_USE_SKILL, 0x09cb);
  4428. #else
  4429. struct PACKET_ZC_USE_SKILL {
  4430. int16 PacketType;
  4431. uint16 SKID;
  4432. int16 level;
  4433. uint32 targetAID;
  4434. uint32 srcAID;
  4435. int8 result;
  4436. } __attribute__((packed));
  4437. DEFINE_PACKET_HEADER(ZC_USE_SKILL, 0x011a);
  4438. #endif
  4439. struct PACKET_ZC_NOTIFY_GROUNDSKILL {
  4440. int16 PacketType;
  4441. uint16 SKID;
  4442. uint32 AID;
  4443. int16 level;
  4444. int16 xPos;
  4445. int16 yPos;
  4446. uint32 startTime;
  4447. } __attribute__((packed));
  4448. DEFINE_PACKET_HEADER(ZC_NOTIFY_GROUNDSKILL, 0x0117);
  4449. #if PACKETVER_MAIN_NUM >= 20081112 || PACKETVER_RE_NUM >= 20081111 || defined(PACKETVER_ZERO)
  4450. struct PACKET_ZC_SKILL_POSTDELAY {
  4451. int16 PacketType;
  4452. uint16 SKID;
  4453. uint32 DelayTM;
  4454. } __attribute__((packed));
  4455. DEFINE_PACKET_HEADER(ZC_SKILL_POSTDELAY, 0x043d);
  4456. #endif
  4457. struct PACKET_ZC_NOTIFY_SKILL_POSITION {
  4458. int16 PacketType;
  4459. uint16 SKID;
  4460. uint32 AID;
  4461. uint32 targetID;
  4462. uint32 startTime;
  4463. int32 attackMT;
  4464. int32 attackedMT;
  4465. int16 xPos;
  4466. int16 yPos;
  4467. int16 damage;
  4468. int16 level;
  4469. int16 count;
  4470. int8 action;
  4471. };
  4472. DEFINE_PACKET_HEADER(ZC_NOTIFY_SKILL_POSITION, 0x0115);
  4473. #if PACKETVER_MAIN_NUM >= 20130731 || PACKETVER_RE_NUM >= 20130707 || defined(PACKETVER_ZERO)
  4474. struct PACKET_ZC_C_MARKERINFO {
  4475. int16 PacketType;
  4476. uint32 AID;
  4477. int16 xPos;
  4478. int16 yPos;
  4479. } __attribute__((packed));
  4480. DEFINE_PACKET_HEADER(ZC_C_MARKERINFO, 0x09c1);
  4481. #endif
  4482. #if PACKETVER >= 20200902
  4483. struct GUILD_MEMBER_INFO {
  4484. uint32 AID;
  4485. uint32 GID;
  4486. int16 head;
  4487. int16 headPalette;
  4488. int16 sex;
  4489. int16 job;
  4490. int16 level;
  4491. int32 contributionExp;
  4492. int32 currentState;
  4493. int32 positionID;
  4494. uint32 lastLoginTime;
  4495. char char_name[NAME_LENGTH];
  4496. } __attribute__((packed));
  4497. struct PACKET_ZC_MEMBERMGR_INFO {
  4498. int16 PacketType;
  4499. int16 packetLength;
  4500. struct GUILD_MEMBER_INFO guildMemberInfo[];
  4501. } __attribute__((packed));
  4502. DEFINE_PACKET_HEADER(ZC_MEMBERMGR_INFO, 0x0b7d);
  4503. #elif PACKETVER_MAIN_NUM >= 20161214 || PACKETVER_RE_NUM >= 20161130 || defined(PACKETVER_ZERO)
  4504. struct GUILD_MEMBER_INFO {
  4505. uint32 AID;
  4506. uint32 GID;
  4507. int16 head;
  4508. int16 headPalette;
  4509. int16 sex;
  4510. int16 job;
  4511. int16 level;
  4512. int32 contributionExp;
  4513. int32 currentState;
  4514. int32 positionID;
  4515. uint32 lastLoginTime;
  4516. } __attribute__((packed));
  4517. struct PACKET_ZC_MEMBERMGR_INFO {
  4518. int16 PacketType;
  4519. int16 packetLength;
  4520. struct GUILD_MEMBER_INFO guildMemberInfo[];
  4521. } __attribute__((packed));
  4522. DEFINE_PACKET_HEADER(ZC_MEMBERMGR_INFO, 0x0aa5);
  4523. #else // false: PACKETVER_MAIN_NUM >= 20161214 || PACKETVER_RE_NUM >= 20161130 || defined(PACKETVER_ZERO)
  4524. struct GUILD_MEMBER_INFO {
  4525. uint32 AID;
  4526. uint32 GID;
  4527. int16 head;
  4528. int16 headPalette;
  4529. int16 sex;
  4530. int16 job;
  4531. int16 level;
  4532. int32 contributionExp;
  4533. int32 currentState;
  4534. int32 positionID;
  4535. char intro[50];
  4536. char char_name[NAME_LENGTH];
  4537. } __attribute__((packed));
  4538. struct PACKET_ZC_MEMBERMGR_INFO {
  4539. int16 PacketType;
  4540. int16 packetLength;
  4541. struct GUILD_MEMBER_INFO guildMemberInfo[];
  4542. } __attribute__((packed));
  4543. DEFINE_PACKET_HEADER(ZC_MEMBERMGR_INFO, 0x0154);
  4544. #endif
  4545. #if PACKETVER >= 20200902
  4546. struct PACKET_ZC_GUILD_INFO {
  4547. int16 PacketType;
  4548. int GDID;
  4549. int level;
  4550. int userNum;
  4551. int maxUserNum;
  4552. int userAverageLevel;
  4553. int exp;
  4554. int maxExp;
  4555. int point;
  4556. int honor;
  4557. int virtue;
  4558. int emblemVersion;
  4559. char guildname[NAME_LENGTH];
  4560. char manageLand[MAP_NAME_LENGTH_EXT];
  4561. int zeny;
  4562. int masterGID;
  4563. char masterName[NAME_LENGTH];
  4564. } __attribute__((packed));
  4565. DEFINE_PACKET_HEADER(ZC_GUILD_INFO, 0x0b7b);
  4566. #elif PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  4567. struct PACKET_ZC_GUILD_INFO {
  4568. int16 PacketType;
  4569. int GDID;
  4570. int level;
  4571. int userNum;
  4572. int maxUserNum;
  4573. int userAverageLevel;
  4574. int exp;
  4575. int maxExp;
  4576. int point;
  4577. int honor;
  4578. int virtue;
  4579. int emblemVersion;
  4580. char guildname[NAME_LENGTH];
  4581. char manageLand[MAP_NAME_LENGTH_EXT];
  4582. int zeny;
  4583. int masterGID;
  4584. } __attribute__((packed));
  4585. DEFINE_PACKET_HEADER(ZC_GUILD_INFO, 0x0a84);
  4586. #else
  4587. struct PACKET_ZC_GUILD_INFO {
  4588. int16 PacketType;
  4589. int GDID;
  4590. int level;
  4591. int userNum;
  4592. int maxUserNum;
  4593. int userAverageLevel;
  4594. int exp;
  4595. int maxExp;
  4596. int point;
  4597. int honor;
  4598. int virtue;
  4599. int emblemVersion;
  4600. char guildname[NAME_LENGTH];
  4601. char masterName[NAME_LENGTH];
  4602. char manageLand[MAP_NAME_LENGTH_EXT];
  4603. int zeny;
  4604. } __attribute__((packed));
  4605. //0x150; [4144] this is packet for older versions?
  4606. DEFINE_PACKET_HEADER(ZC_GUILD_INFO, 0x01b6);
  4607. #endif
  4608. struct PACKET_ZC_POSITION_ID_NAME_INFO {
  4609. int16 PacketType;
  4610. int16 PacketLength;
  4611. struct {
  4612. int positionID;
  4613. char posName[NAME_LENGTH];
  4614. } posInfo[MAX_GUILDPOSITION];
  4615. } __attribute__((packed));
  4616. DEFINE_PACKET_HEADER(ZC_POSITION_ID_NAME_INFO, 0x0166);
  4617. struct PACKET_ZC_POSITION_INFO_sub {
  4618. int positionID;
  4619. int right;
  4620. int ranking;
  4621. int payRate;
  4622. } __attribute__((packed));
  4623. struct PACKET_ZC_POSITION_INFO {
  4624. int16 PacketType;
  4625. int16 PacketLength;
  4626. struct PACKET_ZC_POSITION_INFO_sub posInfo[];
  4627. } __attribute__((packed));
  4628. DEFINE_PACKET_HEADER(ZC_POSITION_INFO, 0x0160);
  4629. struct GUILD_SKILLDATA {
  4630. uint16 id;
  4631. int inf;
  4632. uint16 level;
  4633. uint16 sp;
  4634. uint16 range2;
  4635. char name[NAME_LENGTH];
  4636. uint8 upFlag;
  4637. } __attribute__((packed));
  4638. struct PACKET_ZC_GUILD_SKILLINFO {
  4639. int16 PacketType;
  4640. int16 PacketLength;
  4641. int16 skillPoint;
  4642. struct GUILD_SKILLDATA skillInfo[];
  4643. } __attribute__((packed));
  4644. DEFINE_PACKET_HEADER(ZC_GUILD_SKILLINFO, 0x0162);
  4645. struct RELATED_GUILD_INFO {
  4646. int relation;
  4647. int GDID;
  4648. char guildname[NAME_LENGTH];
  4649. } __attribute__((packed));
  4650. struct PACKET_ZC_MYGUILD_BASIC_INFO {
  4651. int16 PacketType;
  4652. int16 PacketLength;
  4653. struct RELATED_GUILD_INFO rgInfo[];
  4654. } __attribute__((packed));
  4655. DEFINE_PACKET_HEADER(ZC_MYGUILD_BASIC_INFO, 0x014c);
  4656. #if PACKETVER >= 20160316
  4657. struct PACKET_CZ_REQ_UPLOAD_MACRO_DETECTOR {
  4658. int16 PacketType;
  4659. char answer[16];
  4660. uint16 imageSize;
  4661. } __attribute__((packed));
  4662. DEFINE_PACKET_HEADER(CZ_REQ_UPLOAD_MACRO_DETECTOR, 0x0a52);
  4663. #endif
  4664. #if PACKETVER >= 20160330
  4665. struct PACKET_ZC_ACK_UPLOAD_MACRO_DETECTOR {
  4666. int16 PacketType;
  4667. char captchaKey[4];
  4668. int captchaFlag;
  4669. } __attribute__((packed));
  4670. DEFINE_PACKET_HEADER(ZC_ACK_UPLOAD_MACRO_DETECTOR, 0x0a53);
  4671. #endif
  4672. #if PACKETVER >= 20160316
  4673. struct PACKET_CZ_UPLOAD_MACRO_DETECTOR_CAPTCHA {
  4674. int16 PacketType;
  4675. int16 PacketLength;
  4676. char captchaKey[4];
  4677. char imageData[];
  4678. } __attribute__((packed));
  4679. DEFINE_PACKET_HEADER(CZ_UPLOAD_MACRO_DETECTOR_CAPTCHA, 0x0a54);
  4680. #endif
  4681. #if PACKETVER >= 20160330
  4682. struct PACKET_ZC_COMPLETE_UPLOAD_MACRO_DETECTOR_CAPTCHA {
  4683. int16 PacketType;
  4684. } __attribute__((packed));
  4685. DEFINE_PACKET_HEADER(ZC_COMPLETE_UPLOAD_MACRO_DETECTOR_CAPTCHA, 0x0a55);
  4686. #endif
  4687. #if PACKETVER >= 20160316
  4688. struct PACKET_CZ_REQ_APPLY_MACRO_DETECTOR {
  4689. int16 PacketType;
  4690. uint32 AID;
  4691. } __attribute__((packed));
  4692. DEFINE_PACKET_HEADER(CZ_REQ_APPLY_MACRO_DETECTOR, 0x0a56);
  4693. #endif
  4694. #if PACKETVER >= 20160330
  4695. struct PACKET_ZC_ACK_APPLY_MACRO_DETECTOR {
  4696. int16 PacketType;
  4697. int status;
  4698. } __attribute__((packed));
  4699. DEFINE_PACKET_HEADER(ZC_ACK_APPLY_MACRO_DETECTOR, 0x0a57);
  4700. #endif
  4701. #if PACKETVER >= 20160330
  4702. struct PACKET_ZC_APPLY_MACRO_DETECTOR {
  4703. int16 PacketType;
  4704. uint16 imageSize;
  4705. char captchaKey[4];
  4706. } __attribute__((packed));
  4707. DEFINE_PACKET_HEADER(ZC_APPLY_MACRO_DETECTOR, 0x0a58);
  4708. #endif
  4709. #if PACKETVER >= 20160330
  4710. struct PACKET_ZC_APPLY_MACRO_DETECTOR_CAPTCHA {
  4711. int16 PacketType;
  4712. int16 PacketLength;
  4713. char captchaKey[4];
  4714. char imageData[];
  4715. } __attribute__((packed));
  4716. DEFINE_PACKET_HEADER(ZC_APPLY_MACRO_DETECTOR_CAPTCHA, 0x0a59);
  4717. #endif
  4718. #if PACKETVER >= 20160316
  4719. struct PACKET_CZ_COMPLETE_APPLY_MACRO_DETECTOR_CAPTCHA {
  4720. int16 PacketType;
  4721. } __attribute__((packed));
  4722. DEFINE_PACKET_HEADER(CZ_COMPLETE_APPLY_MACRO_DETECTOR_CAPTCHA, 0x0a5a);
  4723. #endif
  4724. #if PACKETVER >= 20160330
  4725. struct PACKET_ZC_REQ_ANSWER_MACRO_DETECTOR {
  4726. int16 PacketType;
  4727. uint8 retryCount;
  4728. int timeout;
  4729. } __attribute__((packed));
  4730. DEFINE_PACKET_HEADER(ZC_REQ_ANSWER_MACRO_DETECTOR, 0x0a5b);
  4731. #endif
  4732. #if PACKETVER >= 20160316
  4733. struct PACKET_CZ_ACK_ANSWER_MACRO_DETECTOR {
  4734. int16 PacketType;
  4735. char answer[16];
  4736. } __attribute__((packed));
  4737. DEFINE_PACKET_HEADER(CZ_ACK_ANSWER_MACRO_DETECTOR, 0x0a5c);
  4738. #endif
  4739. #if PACKETVER >= 20160330
  4740. struct PACKET_ZC_CLOSE_MACRO_DETECTOR {
  4741. int16 PacketType;
  4742. int status;
  4743. } __attribute__((packed));
  4744. DEFINE_PACKET_HEADER(ZC_CLOSE_MACRO_DETECTOR, 0x0a5d);
  4745. #endif
  4746. #if PACKETVER >= 20160323
  4747. struct PACKET_CZ_REQ_PREVIEW_MACRO_DETECTOR {
  4748. int16 PacketType;
  4749. int captchaID;
  4750. } __attribute__((packed));
  4751. DEFINE_PACKET_HEADER(CZ_REQ_PREVIEW_MACRO_DETECTOR, 0x0a69);
  4752. #endif
  4753. #if PACKETVER >= 20160330
  4754. struct PACKET_ZC_ACK_PREVIEW_MACRO_DETECTOR {
  4755. int16 PacketType;
  4756. int captchaFlag;
  4757. uint16 imageSize;
  4758. char captchaKey[4];
  4759. } __attribute__((packed));
  4760. DEFINE_PACKET_HEADER(ZC_ACK_PREVIEW_MACRO_DETECTOR, 0x0a6a);
  4761. #endif
  4762. #if PACKETVER >= 20160330
  4763. struct PACKET_ZC_PREVIEW_MACRO_DETECTOR_CAPTCHA {
  4764. int16 PacketType;
  4765. int16 PacketLength;
  4766. char captchaKey[4];
  4767. char imageData[];
  4768. } __attribute__((packed));
  4769. DEFINE_PACKET_HEADER(ZC_PREVIEW_MACRO_DETECTOR_CAPTCHA, 0x0a6b);
  4770. #endif
  4771. #if PACKETVER >= 20160330
  4772. struct PACKET_CZ_REQ_PLAYER_AID_IN_RANGE {
  4773. int16 PacketType;
  4774. int16 xPos;
  4775. int16 yPos;
  4776. int8 RadiusRange;
  4777. } __attribute__((packed));
  4778. DEFINE_PACKET_HEADER(CZ_REQ_PLAYER_AID_IN_RANGE, 0x0a6c);
  4779. #endif
  4780. #if PACKETVER >= 20160330
  4781. struct PACKET_ZC_ACK_PLAYER_AID_IN_RANGE {
  4782. int16 PacketType;
  4783. int16 PacketLength;
  4784. uint32 AID[];
  4785. } __attribute__((packed));
  4786. DEFINE_PACKET_HEADER(ZC_ACK_PLAYER_AID_IN_RANGE, 0x0a6d);
  4787. #endif
  4788. struct PACKET_ZC_ACK_MAKE_GROUP {
  4789. int16 PacketType;
  4790. int8 result;
  4791. } __attribute__((packed));
  4792. DEFINE_PACKET_HEADER(ZC_ACK_MAKE_GROUP, 0x00fa);
  4793. struct PACKET_ZC_PARTY_JOIN_REQ {
  4794. int16 PacketType;
  4795. int GRID;
  4796. char groupName[NAME_LENGTH];
  4797. } __attribute__((packed));
  4798. #if PACKETVER < 20070821
  4799. DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ, 0x00fe);
  4800. #else
  4801. DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ, 0x02c6);
  4802. #endif
  4803. struct PACKET_ZC_PARTY_JOIN_REQ_ACK {
  4804. int16 PacketType;
  4805. char characterName[NAME_LENGTH];
  4806. int result;
  4807. } __attribute__((packed));
  4808. #if PACKETVER < 20070821
  4809. DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ_ACK, 0x00fd);
  4810. #else
  4811. DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ_ACK, 0x02c5);
  4812. #endif
  4813. struct PACKET_ZC_NOTIFY_CHAT_PARTY {
  4814. int16 PacketType;
  4815. int16 PacketLength;
  4816. int AID;
  4817. char chatMsg[];
  4818. } __attribute__((packed));
  4819. DEFINE_PACKET_HEADER(ZC_NOTIFY_CHAT_PARTY, 0x0109);
  4820. struct PACKET_ZC_NOTIFY_POSITION_TO_GROUPM {
  4821. int16 PacketType;
  4822. int AID;
  4823. int16 xPos;
  4824. int16 yPos;
  4825. } __attribute__((packed));
  4826. DEFINE_PACKET_HEADER(ZC_NOTIFY_POSITION_TO_GROUPM, 0x0107);
  4827. #if PACKETVER_ZERO_NUM >= 20210504
  4828. struct PACKET_ZC_NOTIFY_HP_TO_GROUPM {
  4829. int16 PacketType;
  4830. uint32 AID;
  4831. int hp;
  4832. int maxhp;
  4833. int sp;
  4834. int maxsp;
  4835. } __attribute__((packed));
  4836. DEFINE_PACKET_HEADER(ZC_NOTIFY_HP_TO_GROUPM, 0x0bab);
  4837. #elif PACKETVER >= 20100119
  4838. struct PACKET_ZC_NOTIFY_HP_TO_GROUPM {
  4839. int16 PacketType;
  4840. uint32 AID;
  4841. int hp;
  4842. int maxhp;
  4843. } __attribute__((packed));
  4844. DEFINE_PACKET_HEADER(ZC_NOTIFY_HP_TO_GROUPM, 0x080e);
  4845. #else // PACKETVER >= 20100119
  4846. struct PACKET_ZC_NOTIFY_HP_TO_GROUPM {
  4847. int16 PacketType;
  4848. uint32 AID;
  4849. int16 hp;
  4850. int16 maxhp;
  4851. } __attribute__((packed));
  4852. DEFINE_PACKET_HEADER(ZC_NOTIFY_HP_TO_GROUPM, 0x0106);
  4853. #endif // PACKETVER >= 20100119
  4854. #if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
  4855. struct PACKET_ZC_NOTIFY_MEMBERINFO_TO_GROUPM {
  4856. int16 PacketType;
  4857. int AID;
  4858. int16 job;
  4859. int16 level;
  4860. } __attribute__((packed));
  4861. DEFINE_PACKET_HEADER(ZC_NOTIFY_MEMBERINFO_TO_GROUPM, 0x0abd);
  4862. #endif
  4863. struct PACKET_ZC_DELETE_MEMBER_FROM_GROUP {
  4864. int16 PacketType;
  4865. int AID;
  4866. char characterName[NAME_LENGTH];
  4867. int8 result;
  4868. } __attribute__((packed));
  4869. DEFINE_PACKET_HEADER(ZC_DELETE_MEMBER_FROM_GROUP, 0x0105);
  4870. #if PACKETVER_MAIN_NUM >= 20230906
  4871. struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL {
  4872. int16 PacketType;
  4873. uint32 location;
  4874. } __attribute__((packed));
  4875. DEFINE_PACKET_HEADER(CZ_REQ_TAKEOFF_EQUIP_ALL, 0x0bf5);
  4876. #elif PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210818
  4877. struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL {
  4878. int16 PacketType;
  4879. } __attribute__((packed));
  4880. DEFINE_PACKET_HEADER(CZ_REQ_TAKEOFF_EQUIP_ALL, 0x0bad);
  4881. #endif // PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210818
  4882. #if PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4883. struct PACKET_ZC_ACK_TAKEOFF_EQUIP_ALL {
  4884. int16 PacketType;
  4885. uint8 result;
  4886. } __attribute__((packed));
  4887. DEFINE_PACKET_HEADER(ZC_ACK_TAKEOFF_EQUIP_ALL, 0x0bae);
  4888. #endif // PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4889. #if PACKETVER_ZERO_NUM >= 20210504
  4890. struct PACKET_ZC_BATTLEFIELD_NOTIFY_HP {
  4891. int16 PacketType;
  4892. uint32 AID;
  4893. int hp;
  4894. int maxhp;
  4895. int sp;
  4896. int maxsp;
  4897. } __attribute__((packed));
  4898. DEFINE_PACKET_HEADER(ZC_BATTLEFIELD_NOTIFY_HP, 0x0baa);
  4899. #elif PACKETVER >= 20140312
  4900. struct PACKET_ZC_BATTLEFIELD_NOTIFY_HP {
  4901. int16 PacketType;
  4902. uint32 AID;
  4903. int hp;
  4904. int maxhp;
  4905. } __attribute__((packed));
  4906. DEFINE_PACKET_HEADER(ZC_BATTLEFIELD_NOTIFY_HP, 0x0a0e);
  4907. #elif PACKETVER >= 20071009
  4908. struct PACKET_ZC_BATTLEFIELD_NOTIFY_HP {
  4909. int16 PacketType;
  4910. uint32 AID;
  4911. char name[NAME_LENGTH];
  4912. int16 hp;
  4913. int16 maxhp;
  4914. } __attribute__((packed));
  4915. DEFINE_PACKET_HEADER(ZC_BATTLEFIELD_NOTIFY_HP, 0x02e0);
  4916. #endif // PACKETVER >= 20071009
  4917. #if PACKETVER_ZERO_NUM >= 20210721
  4918. struct PACKET_ZC_QUEST_DIALOG {
  4919. int16 PacketType;
  4920. int16 PacketLength;
  4921. uint32 NpcID;
  4922. char message[];
  4923. } __attribute__((packed));
  4924. DEFINE_PACKET_HEADER(ZC_QUEST_DIALOG, 0x0ba6);
  4925. #endif // PACKETVER_ZERO_NUM >= 20210721
  4926. #if PACKETVER_ZERO_NUM >= 20210721
  4927. struct PACKET_ZC_MONOLOG_DIALOG {
  4928. int16 PacketType;
  4929. int16 PacketLength;
  4930. uint32 NpcID;
  4931. char message[];
  4932. } __attribute__((packed));
  4933. DEFINE_PACKET_HEADER(ZC_MONOLOG_DIALOG, 0x0ba9);
  4934. #endif // PACKETVER_ZERO_NUM >= 20210721
  4935. #if PACKETVER_ZERO_NUM >= 20210721
  4936. struct PACKET_ZC_QUEST_DIALOG_MENU_LIST {
  4937. int16 PacketType;
  4938. int16 PacketLength;
  4939. uint32 NpcID;
  4940. char message[];
  4941. } __attribute__((packed));
  4942. DEFINE_PACKET_HEADER(ZC_QUEST_DIALOG_MENU_LIST, 0x0ba7);
  4943. #endif // PACKETVER_ZERO_NUM >= 20210721
  4944. #if PACKETVER_MAIN_NUM >= 20210317 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210317
  4945. struct PACKET_CZ_CHOOSE_MENU_ZERO {
  4946. int16 PacketType;
  4947. uint32 NpcID;
  4948. uint8 menuIndex;
  4949. } __attribute__((packed));
  4950. DEFINE_PACKET_HEADER(CZ_CHOOSE_MENU_ZERO, 0x0ba8);
  4951. #endif // PACKETVER_MAIN_NUM >= 20210317 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210317
  4952. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4953. struct PACKET_ZC_DIALOG_TEXT_ALIGN {
  4954. int16 PacketType;
  4955. uint8 align;
  4956. } __attribute__((packed));
  4957. DEFINE_PACKET_HEADER(ZC_DIALOG_TEXT_ALIGN, 0x0ba1);
  4958. #endif // PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4959. #if PACKETVER_MAIN_NUM >= 20191016 || PACKETVER_RE_NUM >= 20191016 || PACKETVER_ZERO_NUM >= 20191008
  4960. struct PACKET_CZ_GRADE_ENCHANT_SELECT_EQUIPMENT {
  4961. int16 PacketType;
  4962. int16 index;
  4963. } __attribute__((packed));
  4964. DEFINE_PACKET_HEADER(CZ_GRADE_ENCHANT_SELECT_EQUIPMENT, 0x0b59);
  4965. #endif
  4966. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  4967. struct GRADE_ENCHANT_BLESSING {
  4968. int32 id;
  4969. int32 amount;
  4970. int32 max_blessing;
  4971. int32 bonus;
  4972. } __attribute__((packed));
  4973. struct GRADE_ENCHANT_MATERIAL {
  4974. int32 nameid;
  4975. int32 amount;
  4976. int32 price;
  4977. int32 downgrade;
  4978. int8 breakable;
  4979. } __attribute__((packed));
  4980. struct PACKET_ZC_GRADE_ENCHANT_MATERIAL_LIST {
  4981. int16 PacketType;
  4982. int16 PacketLength;
  4983. int16 index;
  4984. int32 success_chance;
  4985. struct GRADE_ENCHANT_BLESSING blessing_info;
  4986. int32 protect_itemid; // used only for PACKETVER_RE_NUM >= 20200723 && PACKETVER_RE_NUM <= 20200819
  4987. int32 protect_amount; // used only for PACKETVER_RE_NUM >= 20200723 && PACKETVER_RE_NUM <= 20200819
  4988. struct GRADE_ENCHANT_MATERIAL material_info[];
  4989. } __attribute__((packed));
  4990. DEFINE_PACKET_HEADER(ZC_GRADE_ENCHANT_MATERIAL_LIST, 0x0b5a);
  4991. #endif
  4992. #if PACKETVER_MAIN_NUM >= 20191016 || PACKETVER_RE_NUM >= 20191016 || PACKETVER_ZERO_NUM >= 20191008
  4993. struct PACKET_CZ_GRADE_ENCHANT_REQUEST {
  4994. int16 PacketType;
  4995. int16 index;
  4996. int material_index;
  4997. int8 blessing_flag;
  4998. int blessing_amount;
  4999. int8 protect_flag; // used only for PACKETVER_RE_NUM >= 20200723 && PACKETVER_RE_NUM <= 20200819
  5000. } __attribute__((packed));
  5001. DEFINE_PACKET_HEADER(CZ_GRADE_ENCHANT_REQUEST, 0x0b5b);
  5002. #endif
  5003. #if PACKETVER_MAIN_NUM >= 20191016 || PACKETVER_RE_NUM >= 20191016 || PACKETVER_ZERO_NUM >= 20191008
  5004. struct PACKET_CZ_GRADE_ENCHANT_CLOSE_UI {
  5005. int16 PacketType;
  5006. } __attribute__((packed));
  5007. DEFINE_PACKET_HEADER(CZ_GRADE_ENCHANT_CLOSE_UI, 0x0b5c);
  5008. #endif
  5009. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  5010. struct PACKET_ZC_GRADE_ENCHANT_ACK {
  5011. int16 PacketType;
  5012. int16 index;
  5013. int16 grade;
  5014. int result;
  5015. } __attribute__((packed));
  5016. DEFINE_PACKET_HEADER(ZC_GRADE_ENCHANT_ACK, 0x0b5d);
  5017. #endif
  5018. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  5019. struct PACKET_ZC_GRADE_ENCHANT_BROADCAST_RESULT {
  5020. int16 packetType;
  5021. char name[NAME_LENGTH];
  5022. uint32 itemId;
  5023. int16 grade;
  5024. int8 status;
  5025. } __attribute__((packed));
  5026. DEFINE_PACKET_HEADER(ZC_GRADE_ENCHANT_BROADCAST_RESULT, 0x0b5e);
  5027. #endif
  5028. struct PACKET_ZC_SHOW_IMAGE {
  5029. int16 packetType;
  5030. char image[64];
  5031. uint8 type;
  5032. } __attribute__((packed));
  5033. DEFINE_PACKET_HEADER(ZC_SHOW_IMAGE, 0x01b3)
  5034. #if PACKETVER_MAIN_NUM >= 20131204 || PACKETVER_RE_NUM >= 20131120 || defined(PACKETVER_ZERO)
  5035. struct PACKET_ZC_WHISPER {
  5036. int16 PacketType;
  5037. int16 PacketLength;
  5038. uint32 senderGID;
  5039. char sender[NAME_LENGTH];
  5040. uint8 isAdmin;
  5041. char message[];
  5042. } __attribute__((packed));
  5043. DEFINE_PACKET_HEADER(ZC_WHISPER, 0x09de)
  5044. // [4144] unconfirmed version
  5045. #elif PACKETVER >= 20091104
  5046. struct PACKET_ZC_WHISPER {
  5047. int16 PacketType;
  5048. int16 PacketLength;
  5049. char sender[NAME_LENGTH];
  5050. int32 isAdmin;
  5051. char message[];
  5052. } __attribute__((packed));
  5053. DEFINE_PACKET_HEADER(ZC_WHISPER, 0x0097)
  5054. #else // PACKETVER_MAIN_NUM >= 20131204 || PACKETVER_RE_NUM >= 20131120 || defined(PACKETVER_ZERO)
  5055. struct PACKET_ZC_WHISPER {
  5056. int16 PacketType;
  5057. int16 PacketLength;
  5058. char sender[NAME_LENGTH];
  5059. char message[];
  5060. } __attribute__((packed));
  5061. DEFINE_PACKET_HEADER(ZC_WHISPER, 0x0097)
  5062. #endif // PACKETVER_MAIN_NUM >= 20131204 || PACKETVER_RE_NUM >= 20131120 || defined(PACKETVER_ZERO)
  5063. #if PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5064. struct PACKET_ZC_UPDATE_GDID {
  5065. int16 PacketType;
  5066. uint32 guildId;
  5067. int emblemVersion;
  5068. uint32 mode;
  5069. uint8 isMaster;
  5070. int32 interSid;
  5071. char guildName[NAME_LENGTH];
  5072. uint32 masterGID;
  5073. } __attribute__((packed));
  5074. DEFINE_PACKET_HEADER(ZC_UPDATE_GDID, 0x02f7)
  5075. #else // PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5076. struct PACKET_ZC_UPDATE_GDID {
  5077. int16 PacketType;
  5078. uint32 guildId;
  5079. int emblemVersion;
  5080. uint32 mode;
  5081. uint8 isMaster;
  5082. int32 interSid;
  5083. char guildName[NAME_LENGTH];
  5084. } __attribute__((packed));
  5085. DEFINE_PACKET_HEADER(ZC_UPDATE_GDID, 0x016c)
  5086. #endif // PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5087. #if PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5088. struct PACKET_CZ_APPROXIMATE_ACTOR {
  5089. int16 PacketType;
  5090. uint32 masterGID;
  5091. uint16 unused1;
  5092. uint8 unused2;
  5093. } __attribute__((packed));
  5094. DEFINE_PACKET_HEADER(CZ_APPROXIMATE_ACTOR, 0x0bb0)
  5095. #endif // PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5096. struct PACKET_CZ_CONTACTNPC {
  5097. int16 PacketType;
  5098. uint32 AID;
  5099. uint8 type;
  5100. } __attribute__((packed));
  5101. DEFINE_PACKET_HEADER(CZ_CONTACTNPC, 0x0090)
  5102. struct PACKET_ZC_ATTACK_FAILURE_FOR_DISTANCE {
  5103. int16 PacketType;
  5104. uint32 targetAID;
  5105. int16 targetXPos;
  5106. int16 targetYPos;
  5107. int16 xPos;
  5108. int16 yPos;
  5109. int16 currentAttRange;
  5110. } __attribute__((packed));
  5111. DEFINE_PACKET_HEADER(ZC_ATTACK_FAILURE_FOR_DISTANCE, 0x0139)
  5112. struct PACKET_ZC_START_CAPTURE {
  5113. int16 PacketType;
  5114. } __attribute__((packed));
  5115. DEFINE_PACKET_HEADER(ZC_START_CAPTURE, 0x019e)
  5116. struct PACKET_ZC_TRYCAPTURE_MONSTER {
  5117. int16 PacketType;
  5118. int8 result;
  5119. } __attribute__((packed));
  5120. DEFINE_PACKET_HEADER(ZC_TRYCAPTURE_MONSTER, 0x01a0)
  5121. struct PACKET_ZC_PROPERTY_PET {
  5122. int16 PacketType;
  5123. char szName[NAME_LENGTH];
  5124. int8 bModified;
  5125. int16 nLevel;
  5126. int16 nFullness;
  5127. int16 nRelationship;
  5128. int16 ITID;
  5129. #if PACKETVER >= 20081126
  5130. int16 job;
  5131. #endif
  5132. } __attribute__((packed));
  5133. DEFINE_PACKET_HEADER(ZC_PROPERTY_PET, 0x01a2)
  5134. struct PACKET_ZC_CHANGESTATE_PET {
  5135. int16 PacketType;
  5136. int8 type;
  5137. int GID;
  5138. int data;
  5139. } __attribute__((packed));
  5140. DEFINE_PACKET_HEADER(ZC_CHANGESTATE_PET, 0x01a4)
  5141. struct PACKET_ZC_SPIRITS {
  5142. int16 PacketType;
  5143. uint32 AID;
  5144. int16 num;
  5145. } __attribute__((packed));
  5146. DEFINE_PACKET_HEADER(ZC_SPIRITS, 0x01d0)
  5147. struct PACKET_ZC_SPIRITS2 {
  5148. int16 PacketType;
  5149. uint32 AID;
  5150. int16 num;
  5151. } __attribute__((packed));
  5152. DEFINE_PACKET_HEADER(ZC_SPIRITS2, 0x01e1)
  5153. #if PACKETVER_MAIN_NUM >= 20200414 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20200506
  5154. struct PACKET_ZC_SOULENERGY {
  5155. int16 PacketType;
  5156. uint32 AID;
  5157. uint16 num;
  5158. } __attribute__((packed));
  5159. DEFINE_PACKET_HEADER(ZC_SOULENERGY, 0x0b73)
  5160. #endif
  5161. struct PACKET_ZC_SAY_DIALOG {
  5162. int16 PacketType;
  5163. int16 PacketLength;
  5164. uint32 NpcID;
  5165. char message[];
  5166. } __attribute__((packed));
  5167. DEFINE_PACKET_HEADER(ZC_SAY_DIALOG, 0x00b4)
  5168. #if PACKETVER_MAIN_NUM >= 20220504
  5169. struct PACKET_ZC_SAY_DIALOG2 {
  5170. int16 PacketType;
  5171. int16 PacketLength;
  5172. uint32 NpcID;
  5173. uint8 type;
  5174. char message[];
  5175. } __attribute__((packed));
  5176. DEFINE_PACKET_HEADER(ZC_SAY_DIALOG2, 0x0972)
  5177. #else // PACKETVER_MAIN_NUM >= 20220504
  5178. struct PACKET_ZC_SAY_DIALOG2 {
  5179. int16 PacketType;
  5180. int16 PacketLength;
  5181. uint32 NpcID;
  5182. char message[];
  5183. } __attribute__((packed));
  5184. DEFINE_PACKET_HEADER(ZC_SAY_DIALOG2, 0x00b4)
  5185. #endif // PACKETVER_MAIN_NUM >= 20220504
  5186. struct PACKET_ZC_WAIT_DIALOG {
  5187. int16 PacketType;
  5188. uint32 NpcID;
  5189. } __attribute__((packed));
  5190. DEFINE_PACKET_HEADER(ZC_WAIT_DIALOG, 0x00b5)
  5191. #if PACKETVER_MAIN_NUM >= 20220504
  5192. struct PACKET_ZC_WAIT_DIALOG2 {
  5193. int16 PacketType;
  5194. uint32 NpcID;
  5195. uint8 type;
  5196. } __attribute__((packed));
  5197. DEFINE_PACKET_HEADER(ZC_WAIT_DIALOG2, 0x0973)
  5198. #else // PACKETVER_MAIN_NUM >= 20220504
  5199. struct PACKET_ZC_WAIT_DIALOG2 {
  5200. int16 PacketType;
  5201. uint32 NpcID;
  5202. } __attribute__((packed));
  5203. DEFINE_PACKET_HEADER(ZC_WAIT_DIALOG2, 0x00b5)
  5204. #endif // PACKETVER_MAIN_NUM >= 20220504
  5205. #if PACKETVER_MAIN_NUM >= 20220504
  5206. struct PACKET_ZC_DIALOG_WINDOW_SIZE {
  5207. int16 PacketType;
  5208. int height;
  5209. int width;
  5210. } __attribute__((packed));
  5211. DEFINE_PACKET_HEADER(ZC_DIALOG_WINDOW_SIZE, 0x0ba2)
  5212. #endif // PACKETVER_MAIN_NUM >= 20220504
  5213. #if PACKETVER_MAIN_NUM >= 20220504
  5214. struct PACKET_ZC_DIALOG_WINDOW_POS {
  5215. int16 PacketType;
  5216. int x;
  5217. int y;
  5218. } __attribute__((packed));
  5219. DEFINE_PACKET_HEADER(ZC_DIALOG_WINDOW_POS, 0x0ba3)
  5220. #endif // PACKETVER_MAIN_NUM >= 20220504
  5221. #if PACKETVER_MAIN_NUM >= 20220504
  5222. struct PACKET_ZC_DIALOG_WINDOW_POS2 {
  5223. int16 PacketType;
  5224. int x;
  5225. int y;
  5226. } __attribute__((packed));
  5227. DEFINE_PACKET_HEADER(ZC_DIALOG_WINDOW_POS2, 0x0bb5)
  5228. #endif // PACKETVER_MAIN_NUM >= 20220504
  5229. #if PACKETVER_MAIN_NUM >= 20220504
  5230. struct PACKET_ZC_PLAY_NPC_BGM {
  5231. int16 PacketType;
  5232. int16 PacketLength;
  5233. uint8 playType;
  5234. char bgm[];
  5235. } __attribute__((packed));
  5236. DEFINE_PACKET_HEADER(ZC_PLAY_NPC_BGM, 0x0b8c)
  5237. #elif PACKETVER >= 20091201
  5238. struct PACKET_ZC_PLAY_NPC_BGM {
  5239. int16 PacketType;
  5240. char bgm[NAME_LENGTH];
  5241. } __attribute__((packed));
  5242. DEFINE_PACKET_HEADER(ZC_PLAY_NPC_BGM, 0x07fe)
  5243. #endif // PACKETVER >= 20091201
  5244. struct PACKET_CZ_MOVE_ITEM_FROM_BODY_TO_CART {
  5245. int16 PacketType;
  5246. int16 index;
  5247. int count;
  5248. } __attribute__((packed));
  5249. DEFINE_PACKET_HEADER(CZ_MOVE_ITEM_FROM_BODY_TO_CART, 0x0126)
  5250. struct PACKET_ZC_SOUND {
  5251. int16 PacketType;
  5252. char name[NAME_LENGTH];
  5253. uint8 act;
  5254. uint32 term;
  5255. uint32 AID;
  5256. } __attribute__((packed));
  5257. DEFINE_PACKET_HEADER(ZC_SOUND, 0x01d3)
  5258. #if PACKETVER >= 20100420
  5259. struct PACKET_ZC_BUYING_STORE_ENTRY {
  5260. int16 packetType;
  5261. uint32 makerAID;
  5262. char storeName[MESSAGE_SIZE];
  5263. } __attribute__((packed));
  5264. DEFINE_PACKET_HEADER(ZC_BUYING_STORE_ENTRY, 0x0814);
  5265. #endif
  5266. struct PACKET_ZC_STORE_ENTRY {
  5267. int16 packetType;
  5268. uint32 makerAID;
  5269. char storeName[MESSAGE_SIZE];
  5270. } __attribute__((packed));
  5271. DEFINE_PACKET_HEADER(ZC_STORE_ENTRY, 0x0131);
  5272. struct CZ_PURCHASE_ITEM_FROMMC {
  5273. int16 count;
  5274. int16 index;
  5275. } __attribute__((packed));
  5276. struct PACKET_CZ_PC_PURCHASE_ITEMLIST_FROMMC {
  5277. int16 packetType;
  5278. int16 packetLength;
  5279. uint32 AID;
  5280. struct CZ_PURCHASE_ITEM_FROMMC list[];
  5281. } __attribute__((packed));
  5282. DEFINE_PACKET_HEADER(CZ_PC_PURCHASE_ITEMLIST_FROMMC, 0x0134);
  5283. struct PACKET_CZ_PC_PURCHASE_ITEMLIST_FROMMC2 {
  5284. int16 packetType;
  5285. int16 packetLength;
  5286. uint32 AID;
  5287. uint32 UniqueID;
  5288. struct CZ_PURCHASE_ITEM_FROMMC list[];
  5289. } __attribute__((packed));
  5290. DEFINE_PACKET_HEADER(CZ_PC_PURCHASE_ITEMLIST_FROMMC2, 0x0801);
  5291. #if PACKETVER >= 20100309
  5292. struct PACKET_ZC_DISAPPEAR_BUYING_STORE_ENTRY {
  5293. int16 packetType;
  5294. uint32 makerAID;
  5295. } __attribute__((packed));
  5296. DEFINE_PACKET_HEADER(ZC_DISAPPEAR_BUYING_STORE_ENTRY, 0x0816);
  5297. #endif
  5298. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5299. struct PACKET_ZC_OPEN_REFORM_UI {
  5300. int16 PacketType;
  5301. int32 ITID;
  5302. } __attribute__((packed));
  5303. DEFINE_PACKET_HEADER(ZC_OPEN_REFORM_UI, 0x0b8f);
  5304. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5305. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5306. struct PACKET_CZ_CLOSE_REFORM_UI {
  5307. int16 PacketType;
  5308. } __attribute__((packed));
  5309. DEFINE_PACKET_HEADER(CZ_CLOSE_REFORM_UI, 0x0b90);
  5310. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5311. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5312. struct PACKET_CZ_ITEM_REFORM {
  5313. int16 PacketType;
  5314. int32 ITID;
  5315. int16 index;
  5316. } __attribute__((packed));
  5317. DEFINE_PACKET_HEADER(CZ_ITEM_REFORM, 0x0b91);
  5318. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5319. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5320. struct PACKET_ZC_ITEM_REFORM_ACK {
  5321. int16 PacketType;
  5322. int16 index;
  5323. int8 result;
  5324. } __attribute__((packed));
  5325. DEFINE_PACKET_HEADER(ZC_ITEM_REFORM_ACK, 0x0b92);
  5326. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5327. #if PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20220316
  5328. struct PACKET_CZ_USE_PACKAGEITEM {
  5329. int16 PacketType;
  5330. uint16 index;
  5331. uint32 AID;
  5332. uint32 itemID;
  5333. uint32 BoxIndex;
  5334. } __attribute__((packed));
  5335. DEFINE_PACKET_HEADER(CZ_USE_PACKAGEITEM, 0x0baf)
  5336. #endif // PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20220316
  5337. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5338. struct PACKET_CZ_REQUEST_RANDOM_ENCHANT {
  5339. int16 PacketType;
  5340. int64 enchant_group;
  5341. int16 index;
  5342. } __attribute__((packed));
  5343. DEFINE_PACKET_HEADER(CZ_REQUEST_RANDOM_ENCHANT, 0x0b9b);
  5344. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5345. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5346. struct PACKET_CZ_REQUEST_PERFECT_ENCHANT {
  5347. int16 PacketType;
  5348. int64 enchant_group;
  5349. int16 index;
  5350. uint32 ITID;
  5351. } __attribute__((packed));
  5352. DEFINE_PACKET_HEADER(CZ_REQUEST_PERFECT_ENCHANT, 0x0b9c);
  5353. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5354. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5355. struct PACKET_CZ_REQUEST_UPGRADE_ENCHANT {
  5356. int16 PacketType;
  5357. int64 enchant_group;
  5358. int16 index;
  5359. int16 slot;
  5360. } __attribute__((packed));
  5361. DEFINE_PACKET_HEADER(CZ_REQUEST_UPGRADE_ENCHANT, 0x0b9d);
  5362. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5363. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5364. struct PACKET_CZ_REQUEST_RESET_ENCHANT {
  5365. int16 PacketType;
  5366. int64 enchant_group;
  5367. int16 index;
  5368. } __attribute__((packed));
  5369. DEFINE_PACKET_HEADER(CZ_REQUEST_RESET_ENCHANT, 0x0b9e);
  5370. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5371. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5372. struct PACKET_ZC_RESPONSE_ENCHANT {
  5373. int16 PacketType;
  5374. int32 msgId;
  5375. uint32 ITID;
  5376. } __attribute__((packed));
  5377. DEFINE_PACKET_HEADER(ZC_RESPONSE_ENCHANT, 0x0b9f);
  5378. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5379. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5380. struct PACKET_CZ_CLOSE_UI_ENCHANT {
  5381. int16 PacketType;
  5382. } __attribute__((packed));
  5383. DEFINE_PACKET_HEADER(CZ_CLOSE_UI_ENCHANT, 0x0ba0);
  5384. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5385. #if PACKETVER_MAIN_NUM >= 20221005
  5386. struct PACKET_ZC_SPECIALPOPUP {
  5387. int16 PacketType;
  5388. int32 ppId;
  5389. } __attribute__((packed));
  5390. DEFINE_PACKET_HEADER(ZC_SPECIALPOPUP, 0x0bbe);
  5391. #endif // PACKETVER_MAIN_NUM >= 20221005
  5392. #if PACKETVER >= 20140611
  5393. struct PACKET_ZC_GOLDPCCAFE_POINT {
  5394. // Note: 2014-04-30 has 1 byte less, but those packets are only functional after 2014-06-11Ragexe
  5395. uint16 PacketType;
  5396. int8 isActive; //< 1 = yes, 0 = no
  5397. int8 mode;
  5398. int32 point;
  5399. int32 playedTime;
  5400. } __attribute__((packed));
  5401. DEFINE_PACKET_HEADER(ZC_GOLDPCCAFE_POINT , 0x0a15);
  5402. #endif // PACKETVER >= 20140611
  5403. #if PACKETVER >= 20140430
  5404. struct PACKET_CZ_DYNAMICNPC_CREATE_REQUEST {
  5405. uint16 PacketType;
  5406. char name[NAME_LENGTH];
  5407. } __attribute__((packed));
  5408. DEFINE_PACKET_HEADER(CZ_DYNAMICNPC_CREATE_REQUEST, 0x0a16);
  5409. #endif // PACKETVER >= 20140430
  5410. #if PACKETVER_MAIN_NUM >= 20140430 || PACKETVER_RE_NUM >= 20140430 || defined(PACKETVER_ZERO)
  5411. struct PACKET_ZC_DYNAMICNPC_CREATE_RESULT {
  5412. uint16 PacketType;
  5413. uint32 result; // enum dynamicnpc_create_result
  5414. } __attribute__((packed));
  5415. DEFINE_PACKET_HEADER(ZC_DYNAMICNPC_CREATE_RESULT , 0x0a17);
  5416. #endif // PACKETVER_MAIN_NUM >= 20140430 || PACKETVER_RE_NUM >= 20140430 || defined(PACKETVER_ZERO)
  5417. struct PACKET_CZ_REQ_GUILD_EMBLEM_IMG1 {
  5418. int16 packetType;
  5419. int32 guild_id;
  5420. } __attribute__((packed));
  5421. DEFINE_PACKET_HEADER(CZ_REQ_GUILD_EMBLEM_IMG1, 0x0151);
  5422. #if PACKETVER >= 20190724
  5423. struct PACKET_CZ_REQ_GUILD_EMBLEM_IMG3 {
  5424. int16 packetType;
  5425. int32 guild_id;
  5426. int32 emblem_id;
  5427. } __attribute__((packed));
  5428. DEFINE_PACKET_HEADER(CZ_REQ_GUILD_EMBLEM_IMG3, 0x0b46);
  5429. #endif // PACKETVER >= 20190724
  5430. #if PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626
  5431. struct PACKET_CZ_REQ_GUILD_EMBLEM_IMG2 {
  5432. int16 packetType;
  5433. int32 guild_id;
  5434. int32 emblem_id;
  5435. int32 unused;
  5436. } __attribute__((packed));
  5437. DEFINE_PACKET_HEADER(CZ_REQ_GUILD_EMBLEM_IMG2, 0x0b1e);
  5438. #elif PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190227 || PACKETVER_ZERO_NUM >= 20190313
  5439. struct PACKET_CZ_REQ_GUILD_EMBLEM_IMG2 {
  5440. int16 packetType;
  5441. int32 guild_id;
  5442. int32 emblem_id;
  5443. } __attribute__((packed));
  5444. DEFINE_PACKET_HEADER(CZ_REQ_GUILD_EMBLEM_IMG2, 0x0b1e);
  5445. #endif // PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626
  5446. #if PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190731 || PACKETVER_ZERO_NUM >= 20190814
  5447. struct PACKET_ZC_CHANGE_GUILD {
  5448. int16 packetType;
  5449. int32 guild_id;
  5450. uint32 emblem_id;
  5451. uint32 AID;
  5452. } __attribute__((packed));
  5453. DEFINE_PACKET_HEADER(ZC_CHANGE_GUILD, 0x0b47);
  5454. // 20190619 main exists in first versions, then removed
  5455. // 20190605 re first versions with other packet size
  5456. #elif PACKETVER_MAIN_NUM >= 20190703 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190709
  5457. struct PACKET_ZC_CHANGE_GUILD {
  5458. int16 packetType;
  5459. int32 guild_id;
  5460. uint32 emblem_id;
  5461. uint32 AID;
  5462. } __attribute__((packed));
  5463. DEFINE_PACKET_HEADER(ZC_CHANGE_GUILD, 0x0b1f);
  5464. #else // PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190731 || PACKETVER_ZERO_NUM >= 20190814
  5465. struct PACKET_ZC_CHANGE_GUILD {
  5466. int16 packetType;
  5467. uint32 AID;
  5468. int32 guild_id;
  5469. uint16 emblem_id;
  5470. } __attribute__((packed));
  5471. DEFINE_PACKET_HEADER(ZC_CHANGE_GUILD, 0x01b4);
  5472. #endif // PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190731 || PACKETVER_ZERO_NUM >= 20190814
  5473. #if PACKETVER_MAIN_NUM >= 20190821 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190710
  5474. enum ZC_GUILD_EMBLEM_TYPE {
  5475. ZC_GUILD_EMBLEM_TYPE_CLEAR = 0,
  5476. ZC_GUILD_EMBLEM_TYPE_ADD = 1,
  5477. ZC_GUILD_EMBLEM_TYPE_COMPLETE = 2,
  5478. };
  5479. struct PACKET_ZC_GUILD_EMBLEM_IMG {
  5480. int16 packetType;
  5481. int16 packetLength;
  5482. uint16 result;
  5483. int32 guild_id;
  5484. uint32 emblem_id;
  5485. char emblem_data[];
  5486. } __attribute__((packed));
  5487. DEFINE_PACKET_HEADER(ZC_GUILD_EMBLEM_IMG, 0x0b36);
  5488. #else // PACKETVER_MAIN_NUM >= 20190821 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190710
  5489. struct PACKET_ZC_GUILD_EMBLEM_IMG {
  5490. int16 packetType;
  5491. int16 packetLength;
  5492. int32 guild_id;
  5493. uint32 emblem_id;
  5494. char emblem_data[];
  5495. } __attribute__((packed));
  5496. DEFINE_PACKET_HEADER(ZC_GUILD_EMBLEM_IMG, 0x0152);
  5497. #endif // PACKETVER_MAIN_NUM >= 20190821 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190710
  5498. #if PACKETVER_MAIN_NUM >= 20171213 || PACKETVER_RE_NUM >= 20171213 || PACKETVER_ZERO_NUM >= 20171214
  5499. struct PACKET_CZ_ADVENTURER_AGENCY_JOIN_REQ {
  5500. int16 packetType;
  5501. int GID;
  5502. int AID;
  5503. } __attribute__((packed));
  5504. DEFINE_PACKET_HEADER(CZ_ADVENTURER_AGENCY_JOIN_REQ, 0x0ae6);
  5505. #endif // PACKETVER_MAIN_NUM >= 20171213 || PACKETVER_RE_NUM >= 20171213 || PACKETVER_ZERO_NUM >= 20171214
  5506. #if PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5507. struct PACKET_ZC_ADVENTURER_AGENCY_JOIN_RESULT {
  5508. int16 packetType;
  5509. char player_name[NAME_LENGTH];
  5510. char party_name[NAME_LENGTH];
  5511. int AID;
  5512. int result;
  5513. } __attribute__((packed));
  5514. DEFINE_PACKET_HEADER(ZC_ADVENTURER_AGENCY_JOIN_RESULT, 0x0afa);
  5515. #endif // PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5516. #if PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5517. struct PACKET_ZC_ADVENTURER_AGENCY_JOIN_REQ {
  5518. int16 packetType;
  5519. int GRID;
  5520. int AID;
  5521. char groupName[NAME_LENGTH];
  5522. int16 level;
  5523. int16 job;
  5524. } __attribute__((packed));
  5525. DEFINE_PACKET_HEADER(ZC_ADVENTURER_AGENCY_JOIN_REQ, 0x0ae7);
  5526. #endif // PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5527. #if PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5528. struct PACKET_CZ_ADVENTURER_AGENCY_JOIN_RESULT {
  5529. int16 packetType;
  5530. int GRID;
  5531. int AID;
  5532. int8 result;
  5533. } __attribute__((packed));
  5534. DEFINE_PACKET_HEADER(CZ_ADVENTURER_AGENCY_JOIN_RESULT, 0x0af8);
  5535. #endif // PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5536. #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
  5537. #pragma pack(pop)
  5538. #endif // not NetBSD < 6 / Solaris
  5539. #endif /* MAP_PACKETS_STRUCT_HPP */