packets_struct.hpp 157 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001
  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. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  3230. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub {
  3231. uint32 storeId;
  3232. uint32 AID;
  3233. char shopName[MESSAGE_SIZE];
  3234. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3235. uint32 itemId;
  3236. #else
  3237. uint16 itemId;
  3238. #endif
  3239. uint8 itemType;
  3240. uint32 price;
  3241. uint16 amount;
  3242. struct EQUIPSLOTINFO slot;
  3243. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3244. uint8 refine;
  3245. uint8 grade;
  3246. } __attribute__((packed));
  3247. struct PACKET_ZC_SEARCH_STORE_INFO_ACK {
  3248. int16 packetType;
  3249. int16 packetLength;
  3250. uint8 firstPage;
  3251. uint8 nextPage;
  3252. uint8 usesCount;
  3253. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub items[];
  3254. } __attribute__((packed));
  3255. DEFINE_PACKET_HEADER(ZC_SEARCH_STORE_INFO_ACK, 0x0b64);
  3256. #elif PACKETVER_MAIN_NUM >= 20100817 || PACKETVER_RE_NUM >= 20100706 || defined(PACKETVER_ZERO)
  3257. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub {
  3258. uint32 storeId;
  3259. uint32 AID;
  3260. char shopName[MESSAGE_SIZE];
  3261. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3262. uint32 itemId;
  3263. #else
  3264. uint16 itemId;
  3265. #endif
  3266. uint8 itemType;
  3267. uint32 price;
  3268. uint16 amount;
  3269. uint8 refine;
  3270. struct EQUIPSLOTINFO slot;
  3271. #if PACKETVER >= 20150226
  3272. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3273. #endif
  3274. } __attribute__((packed));
  3275. struct PACKET_ZC_SEARCH_STORE_INFO_ACK {
  3276. int16 packetType;
  3277. int16 packetLength;
  3278. uint8 firstPage;
  3279. uint8 nextPage;
  3280. uint8 usesCount;
  3281. struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub items[];
  3282. } __attribute__((packed));
  3283. DEFINE_PACKET_HEADER(ZC_SEARCH_STORE_INFO_ACK, 0x0836);
  3284. #endif // PACKETVER_MAIN_NUM >= 20100817 || PACKETVER_RE_NUM >= 20100706 || defined(PACKETVER_ZERO)
  3285. /* Achievement System */
  3286. struct ach_list_info {
  3287. uint32 ach_id;
  3288. uint8 completed;
  3289. uint32 objective[MAX_ACHIEVEMENT_OBJECTIVES];
  3290. uint32 completed_at;
  3291. uint8 reward;
  3292. } __attribute__((packed));
  3293. struct packet_achievement_list {
  3294. uint16 packet_id;
  3295. uint16 packet_len;
  3296. uint32 total_achievements;
  3297. uint32 total_points;
  3298. uint16 rank;
  3299. uint32 current_rank_points;
  3300. uint32 next_rank_points;
  3301. struct ach_list_info ach[MAX_ACHIEVEMENT_DB];
  3302. } __attribute__((packed));
  3303. struct packet_achievement_update {
  3304. uint16 packet_id;
  3305. uint32 total_points;
  3306. uint16 rank;
  3307. uint32 current_rank_points;
  3308. uint32 next_rank_points;
  3309. struct ach_list_info ach;
  3310. } __attribute__((packed));
  3311. struct packet_achievement_reward_ack {
  3312. uint16 packet_id;
  3313. uint8 failed;
  3314. uint32 ach_id;
  3315. } __attribute__((packed));
  3316. // Name Packet ZC_ACK_REQNAME
  3317. struct packet_reqname_ack {
  3318. uint16 packet_id;
  3319. int32 gid;
  3320. char name[NAME_LENGTH];
  3321. } __attribute__((packed));
  3322. // ZC_ACK_REQNAMEALL / ZC_ACK_REQNAMEALL2
  3323. #if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
  3324. struct PACKET_ZC_ACK_REQNAMEALL {
  3325. uint16 packet_id;
  3326. int32 gid;
  3327. char name[NAME_LENGTH];
  3328. char party_name[NAME_LENGTH];
  3329. char guild_name[NAME_LENGTH];
  3330. char position_name[NAME_LENGTH];
  3331. int32 title_id;
  3332. } __attribute__((packed));
  3333. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0a30);
  3334. #else
  3335. struct PACKET_ZC_ACK_REQNAMEALL {
  3336. uint16 packet_id;
  3337. int32 gid;
  3338. char name[NAME_LENGTH];
  3339. char party_name[NAME_LENGTH];
  3340. char guild_name[NAME_LENGTH];
  3341. char position_name[NAME_LENGTH];
  3342. } __attribute__((packed));
  3343. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL, 0x0195);
  3344. #endif
  3345. #if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
  3346. struct PACKET_ZC_ACK_REQNAMEALL_NPC {
  3347. uint16 packet_id;
  3348. int32 gid;
  3349. int32 groupId;
  3350. char name[NAME_LENGTH];
  3351. char title[NAME_LENGTH];
  3352. } __attribute__((packed));
  3353. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL_NPC, 0x0adf);
  3354. #else
  3355. struct PACKET_ZC_ACK_REQNAMEALL_NPC {
  3356. uint16 packet_id;
  3357. int32 gid;
  3358. char name[NAME_LENGTH];
  3359. } __attribute__((packed));
  3360. DEFINE_PACKET_HEADER(ZC_ACK_REQNAMEALL_NPC, 0x0095);
  3361. #endif
  3362. struct PACKET_ZC_OVERWEIGHT_PERCENT {
  3363. int16 packetType;
  3364. uint32 percent;
  3365. } __attribute__((packed));
  3366. struct PACKET_ZC_WARPLIST_sub {
  3367. char map[MAP_NAME_LENGTH_EXT];
  3368. } __attribute__((packed));
  3369. struct PACKET_ZC_WARPLIST {
  3370. int16 packetType;
  3371. #if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
  3372. int16 packetLength;
  3373. uint16 skillId;
  3374. struct PACKET_ZC_WARPLIST_sub maps[];
  3375. #else
  3376. uint16 skillId;
  3377. struct PACKET_ZC_WARPLIST_sub maps[4];
  3378. #endif
  3379. } __attribute__((packed));
  3380. struct PACKET_ZC_GROUP_ISALIVE {
  3381. int16 packetType;
  3382. uint32 AID;
  3383. uint8 isDead;
  3384. } __attribute__((packed));
  3385. struct PACKET_ZC_GUILD_POSITION {
  3386. int16 packetType;
  3387. int16 packetLength;
  3388. uint32 AID;
  3389. char position[];
  3390. } __attribute__((packed));
  3391. #if PACKETVER_MAIN_NUM >= 20161214 || PACKETVER_RE_NUM >= 20161130 || defined(PACKETVER_ZERO)
  3392. struct PACKET_ZC_MOVE_ITEM_FAILED {
  3393. int16 packetType;
  3394. int16 itemIndex;
  3395. int16 itemCount;
  3396. } __attribute__((packed));
  3397. DEFINE_PACKET_HEADER(ZC_MOVE_ITEM_FAILED, 0x0aa7);
  3398. #endif // PACKETVER_MAIN_NUM >= 20161214 || PACKETVER_RE_NUM >= 20161130 || defined(PACKETVER_ZERO)
  3399. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  3400. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD3
  3401. #elif PACKETVER >= 20100803
  3402. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD2
  3403. #else
  3404. #define PACKET_ZC_ACK_BAN_GUILD PACKET_ZC_ACK_BAN_GUILD1
  3405. #endif
  3406. struct PACKET_ZC_ACK_BAN_GUILD1 {
  3407. int16 packetType;
  3408. char name[NAME_LENGTH];
  3409. char reason[40];
  3410. char account_name[NAME_LENGTH];
  3411. } __attribute__((packed));
  3412. struct PACKET_ZC_ACK_BAN_GUILD2 {
  3413. int16 packetType;
  3414. char name[NAME_LENGTH];
  3415. char reason[40];
  3416. } __attribute__((packed));
  3417. struct PACKET_ZC_ACK_BAN_GUILD3 {
  3418. int16 packetType;
  3419. char reason[40];
  3420. uint32 GID;
  3421. } __attribute__((packed));
  3422. #if PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  3423. #define PACKET_ZC_ACK_LEAVE_GUILD PACKET_ZC_ACK_LEAVE_GUILD2
  3424. #else
  3425. #define PACKET_ZC_ACK_LEAVE_GUILD PACKET_ZC_ACK_LEAVE_GUILD1
  3426. #endif
  3427. struct PACKET_ZC_ACK_LEAVE_GUILD1 {
  3428. int16 packetType;
  3429. char name[NAME_LENGTH];
  3430. char reason[40];
  3431. } __attribute__((packed));
  3432. struct PACKET_ZC_ACK_LEAVE_GUILD2 {
  3433. int16 packetType;
  3434. uint32 GID;
  3435. char reason[40];
  3436. } __attribute__((packed));
  3437. struct PACKET_CZ_MEMORIALDUNGEON_COMMAND {
  3438. int16 packetType;
  3439. int32 command;
  3440. } __attribute__((packed));
  3441. struct PACKET_ZC_REMOVE_EFFECT {
  3442. int16 packetType;
  3443. uint32 aid;
  3444. uint32 effectId;
  3445. } __attribute__((packed));
  3446. #if PACKETVER >= 20160525
  3447. struct PACKET_ZC_VIEW_CAMERAINFO {
  3448. int16 packetType;
  3449. int8 action;
  3450. float range;
  3451. float rotation;
  3452. float latitude;
  3453. } __attribute__((packed));
  3454. DEFINE_PACKET_HEADER(ZC_VIEW_CAMERAINFO, 0x0a78);
  3455. #endif
  3456. #if PACKETVER >= 20160525
  3457. struct PACKET_CZ_VIEW_CAMERAINFO {
  3458. int16 packetType;
  3459. int8 action;
  3460. float range;
  3461. float rotation;
  3462. float latitude;
  3463. } __attribute__((packed));
  3464. DEFINE_PACKET_HEADER(CZ_VIEW_CAMERAINFO, 0x0a77);
  3465. #endif
  3466. #if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
  3467. // PACKET_ZC_AUTOSPELLLIST2
  3468. struct PACKET_ZC_AUTOSPELLLIST {
  3469. int16 packetType;
  3470. int16 packetLength;
  3471. int skills[];
  3472. } __attribute__((packed));
  3473. DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x0afb);
  3474. #elif PACKETVER_MAIN_NUM >= 20090406 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_SAK_NUM >= 20080618
  3475. // PACKET_ZC_AUTOSPELLLIST1
  3476. struct PACKET_ZC_AUTOSPELLLIST {
  3477. int16 packetType;
  3478. int skills[7];
  3479. } __attribute__((packed));
  3480. DEFINE_PACKET_HEADER(ZC_AUTOSPELLLIST, 0x01cd);
  3481. #endif
  3482. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  3483. struct PACKET_ZC_CHANGE_ITEM_OPTION {
  3484. int16 packetType;
  3485. int16 index;
  3486. int8 isDamaged;
  3487. struct EQUIPSLOTINFO slot;
  3488. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3489. uint8 refiningLevel;
  3490. uint8 grade;
  3491. } __attribute__((packed));
  3492. DEFINE_PACKET_HEADER(ZC_CHANGE_ITEM_OPTION, 0x0b43);
  3493. #elif PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
  3494. struct PACKET_ZC_CHANGE_ITEM_OPTION {
  3495. int16 packetType;
  3496. int16 index;
  3497. int8 isDamaged;
  3498. int16 refiningLevel;
  3499. struct EQUIPSLOTINFO slot;
  3500. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3501. } __attribute__((packed));
  3502. DEFINE_PACKET_HEADER(ZC_CHANGE_ITEM_OPTION, 0x0b13);
  3503. #elif PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  3504. struct PACKET_ZC_CHANGE_ITEM_OPTION {
  3505. int16 packetType;
  3506. int16 index;
  3507. int16 refiningLevel;
  3508. struct EQUIPSLOTINFO slot;
  3509. struct ItemOptions option_data[MAX_ITEM_OPTIONS];
  3510. } __attribute__((packed));
  3511. DEFINE_PACKET_HEADER(ZC_CHANGE_ITEM_OPTION, 0x0ab9);
  3512. #endif // PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017 || PACKETVER_ZERO_NUM >= 20181024
  3513. #if PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
  3514. struct PACKET_ZC_UPDATE_CARDSLOT {
  3515. int16 packetType;
  3516. int16 wearState;
  3517. int16 cardSlot;
  3518. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3519. int32 itemId;
  3520. #else
  3521. int16 itemId;
  3522. #endif
  3523. int8 equipFlag;
  3524. } __attribute__((packed));
  3525. DEFINE_PACKET_HEADER(ZC_UPDATE_CARDSLOT, 0x0a3f);
  3526. #endif // PACKETVER_MAIN_NUM >= 20160831 || PACKETVER_RE_NUM >= 20151118 || defined(PACKETVER_ZERO)
  3527. #if PACKETVER_MAIN_NUM >= 20170830 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
  3528. struct PACKET_ZC_DEBUGMSG {
  3529. int16 packetType;
  3530. int16 packetLength;
  3531. int32 color;
  3532. char message[];
  3533. } __attribute__((packed));
  3534. DEFINE_PACKET_HEADER(ZC_DEBUGMSG, 0x0adb);
  3535. #endif
  3536. #if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
  3537. struct PACKET_CZ_USE_SKILL_START {
  3538. int16 packetType;
  3539. int16 skillId;
  3540. int16 skillLv;
  3541. uint32 targetId;
  3542. } __attribute__((packed));
  3543. DEFINE_PACKET_HEADER(CZ_USE_SKILL_START, 0x0b10);
  3544. struct PACKET_CZ_USE_SKILL_END {
  3545. int16 packetType;
  3546. int16 skillId;
  3547. } __attribute__((packed));
  3548. DEFINE_PACKET_HEADER(CZ_USE_SKILL_END, 0x0b11);
  3549. #endif
  3550. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  3551. struct PACKET_ZC_EXTEND_BODYITEM_SIZE {
  3552. int16 packetType;
  3553. int16 expansionSize;
  3554. } __attribute__((packed));
  3555. DEFINE_PACKET_HEADER(ZC_EXTEND_BODYITEM_SIZE, 0x0b18);
  3556. #endif
  3557. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  3558. struct PACKET_ZC_ACK_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE {
  3559. int16 packetType;
  3560. uint8 result;
  3561. uint32 itemId;
  3562. } __attribute__((packed));
  3563. DEFINE_PACKET_HEADER(ZC_ACK_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE, 0x0b15);
  3564. #endif
  3565. #if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
  3566. struct PACKET_ZC_ACK_EXTEND_BODYITEM_SIZE {
  3567. int16 packetType;
  3568. uint8 result;
  3569. } __attribute__((packed));
  3570. DEFINE_PACKET_HEADER(ZC_ACK_EXTEND_BODYITEM_SIZE, 0x0b17);
  3571. #endif
  3572. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  3573. struct PACKET_CZ_REQ_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE {
  3574. int16 packetType;
  3575. } __attribute__((packed));
  3576. DEFINE_PACKET_HEADER(CZ_REQ_OPEN_MSGBOX_EXTEND_BODYITEM_SIZE, 0x0b14);
  3577. #endif
  3578. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  3579. struct PACKET_CZ_REQ_EXTEND_BODYITEM_SIZE {
  3580. int16 packetType;
  3581. } __attribute__((packed));
  3582. DEFINE_PACKET_HEADER(CZ_REQ_EXTEND_BODYITEM_SIZE, 0x0b16);
  3583. #endif
  3584. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  3585. struct PACKET_CZ_CLOSE_MSGBOX_EXTEND_BODYITEM_SIZE {
  3586. int16 packetType;
  3587. } __attribute__((packed));
  3588. DEFINE_PACKET_HEADER(CZ_CLOSE_MSGBOX_EXTEND_BODYITEM_SIZE, 0x0b19);
  3589. #endif
  3590. struct PACKET_CZ_REQ_REMAINTIME {
  3591. int16 packetType;
  3592. } __attribute__((packed));
  3593. DEFINE_PACKET_HEADER(CZ_REQ_REMAINTIME, 0x01c0);
  3594. struct PACKET_CZ_PARTY_CONFIG {
  3595. int16 packetType;
  3596. uint8 refuseInvite;
  3597. } __attribute__((packed));
  3598. DEFINE_PACKET_HEADER(CZ_PARTY_CONFIG, 0x02c8);
  3599. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  3600. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO_sub {
  3601. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3602. uint32 nameid;
  3603. #else
  3604. uint16 nameid;
  3605. #endif
  3606. uint8 type;
  3607. uint32 amount;
  3608. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3609. uint32 currencyNameid;
  3610. #else
  3611. uint16 currencyNameid;
  3612. #endif
  3613. uint32 currencyAmount;
  3614. uint32 weight;
  3615. uint32 index;
  3616. uint16 viewSprite;
  3617. uint32 location;
  3618. } __attribute__((packed));
  3619. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO {
  3620. int16 packetType;
  3621. int16 packetLength;
  3622. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO_sub list[];
  3623. } __attribute__((packed));
  3624. DEFINE_PACKET_HEADER(ZC_NPC_BARTER_MARKET_ITEMINFO, 0x0b78);
  3625. #elif PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  3626. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO_sub {
  3627. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3628. uint32 nameid;
  3629. #else
  3630. uint16 nameid;
  3631. #endif
  3632. uint8 type;
  3633. uint32 amount;
  3634. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3635. uint32 currencyNameid;
  3636. #else
  3637. uint16 currencyNameid;
  3638. #endif
  3639. uint32 currencyAmount;
  3640. uint32 weight;
  3641. uint32 index;
  3642. } __attribute__((packed));
  3643. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO {
  3644. int16 packetType;
  3645. int16 packetLength;
  3646. struct PACKET_ZC_NPC_BARTER_MARKET_ITEMINFO_sub list[];
  3647. } __attribute__((packed));
  3648. DEFINE_PACKET_HEADER(ZC_NPC_BARTER_MARKET_ITEMINFO, 0x0b0e);
  3649. #endif
  3650. #if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  3651. struct PACKET_CZ_NPC_BARTER_MARKET_CLOSE {
  3652. int16 packetType;
  3653. } __attribute__((packed));
  3654. DEFINE_PACKET_HEADER(CZ_NPC_BARTER_MARKET_CLOSE, 0x0b12);
  3655. #endif
  3656. #if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
  3657. struct PACKET_CZ_NPC_BARTER_MARKET_PURCHASE_sub {
  3658. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3659. uint32 itemId;
  3660. #else
  3661. uint16 itemId;
  3662. #endif
  3663. uint32 amount;
  3664. uint16 invIndex;
  3665. uint32 shopIndex;
  3666. } __attribute__((packed));
  3667. struct PACKET_CZ_NPC_BARTER_MARKET_PURCHASE {
  3668. int16 packetType;
  3669. int16 packetLength;
  3670. struct PACKET_CZ_NPC_BARTER_MARKET_PURCHASE_sub list[];
  3671. } __attribute__((packed));
  3672. DEFINE_PACKET_HEADER(CZ_NPC_BARTER_MARKET_PURCHASE, 0x0b0f);
  3673. #endif
  3674. #if PACKETVER_MAIN_NUM >= 20181212 || PACKETVER_RE_NUM >= 20181212 || PACKETVER_ZERO_NUM >= 20190130
  3675. struct PACKET_ZC_USESKILL_ACK {
  3676. int16 packetType;
  3677. uint32 srcId;
  3678. uint32 dstId;
  3679. uint16 x;
  3680. uint16 y;
  3681. uint16 skillId;
  3682. uint32 element;
  3683. uint32 delayTime;
  3684. uint8 disposable;
  3685. uint32 attackMT;
  3686. } __attribute__((packed));
  3687. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x0b1a);
  3688. #elif PACKETVER_MAIN_NUM >= 20091124 || PACKETVER_RE_NUM >= 20091124 || defined(PACKETVER_ZERO)
  3689. struct PACKET_ZC_USESKILL_ACK {
  3690. int16 packetType;
  3691. uint32 srcId;
  3692. uint32 dstId;
  3693. uint16 x;
  3694. uint16 y;
  3695. uint16 skillId;
  3696. uint32 element;
  3697. uint32 delayTime;
  3698. uint8 disposable;
  3699. } __attribute__((packed));
  3700. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x07fb);
  3701. #elif PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_SAK_NUM >= 20080618 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
  3702. struct PACKET_ZC_USESKILL_ACK {
  3703. int16 packetType;
  3704. uint32 srcId;
  3705. uint32 dstId;
  3706. uint16 x;
  3707. uint16 y;
  3708. uint16 skillId;
  3709. uint32 element;
  3710. uint32 delayTime;
  3711. } __attribute__((packed));
  3712. DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x013e);
  3713. #endif
  3714. #if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
  3715. struct PACKET_CZ_CLIENT_VERSION {
  3716. int16 packetType;
  3717. uint32 clientVersion;
  3718. } __attribute__((packed));
  3719. DEFINE_PACKET_HEADER(CZ_CLIENT_VERSION, 0x044a);
  3720. #endif
  3721. #if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
  3722. struct PACKET_CZ_PING_LIVE {
  3723. int16 packetType;
  3724. } __attribute__((packed));
  3725. DEFINE_PACKET_HEADER(CZ_PING_LIVE, 0x0b1c);
  3726. #endif
  3727. #if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
  3728. struct PACKET_ZC_PING_LIVE {
  3729. int16 packetType;
  3730. } __attribute__((packed));
  3731. DEFINE_PACKET_HEADER(ZC_PING_LIVE, 0x0b1d);
  3732. #endif
  3733. #if PACKETVER >= 20160622
  3734. struct PACKET_CZ_CMD_RESETCOOLTIME {
  3735. int16 packetType;
  3736. } __attribute__((packed));
  3737. DEFINE_PACKET_HEADER(CZ_CMD_RESETCOOLTIME, 0x0a88);
  3738. #endif
  3739. #if PACKETVER >= 20151104
  3740. struct PACKET_CZ_CLOSE_UI_STYLINGSHOP {
  3741. int16 packetType;
  3742. } __attribute__((packed));
  3743. DEFINE_PACKET_HEADER(CZ_CLOSE_UI_STYLINGSHOP, 0x0a48);
  3744. #endif
  3745. #if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320 || PACKETVER_ZERO_NUM >= 20190410
  3746. struct PACKET_ZC_NOTIFY_ACTORINIT {
  3747. int16 packetType;
  3748. } __attribute__((packed));
  3749. DEFINE_PACKET_HEADER(ZC_NOTIFY_ACTORINIT, 0x0b1b);
  3750. #endif
  3751. #if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO)
  3752. struct PACKET_ZC_PARTY_CONFIG {
  3753. int16 packetType;
  3754. uint8 denyPartyInvites;
  3755. } __attribute__((packed));
  3756. DEFINE_PACKET_HEADER(ZC_PARTY_CONFIG, 0x02c9);
  3757. #endif
  3758. struct PACKET_ZC_ROLE_CHANGE {
  3759. int16 packetType;
  3760. int32 flag;
  3761. char name[NAME_LENGTH];
  3762. } __attribute__((packed));
  3763. DEFINE_PACKET_HEADER(ZC_ROLE_CHANGE, 0x00e1);
  3764. #if PACKETVER >= 20200902
  3765. struct PACKET_ZC_BAN_LIST_sub {
  3766. int char_id;
  3767. char message[40];
  3768. char char_name[NAME_LENGTH];
  3769. } __attribute__((packed));
  3770. struct PACKET_ZC_BAN_LIST {
  3771. int16 packetType;
  3772. uint16 packetLen;
  3773. struct PACKET_ZC_BAN_LIST_sub chars[];
  3774. } __attribute__((packed));
  3775. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0b7c);
  3776. #elif PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  3777. struct PACKET_ZC_BAN_LIST_sub {
  3778. int char_id;
  3779. char message[40];
  3780. } __attribute__((packed));
  3781. struct PACKET_ZC_BAN_LIST {
  3782. int16 packetType;
  3783. uint16 packetLen;
  3784. struct PACKET_ZC_BAN_LIST_sub chars[];
  3785. } __attribute__((packed));
  3786. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0a87);
  3787. // version unconfirmed
  3788. #elif PACKETVER >= 20100803
  3789. struct PACKET_ZC_BAN_LIST_sub {
  3790. char char_name[NAME_LENGTH];
  3791. char message[40];
  3792. } __attribute__((packed));
  3793. struct PACKET_ZC_BAN_LIST {
  3794. int16 packetType;
  3795. uint16 packetLen;
  3796. struct PACKET_ZC_BAN_LIST_sub chars[];
  3797. } __attribute__((packed));
  3798. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
  3799. #else
  3800. struct PACKET_ZC_BAN_LIST_sub {
  3801. char char_name[NAME_LENGTH];
  3802. char account_name[NAME_LENGTH];
  3803. char message[40];
  3804. } __attribute__((packed));
  3805. struct PACKET_ZC_BAN_LIST {
  3806. int16 packetType;
  3807. uint16 packetLen;
  3808. struct PACKET_ZC_BAN_LIST_sub chars[];
  3809. } __attribute__((packed));
  3810. DEFINE_PACKET_HEADER(ZC_BAN_LIST, 0x0163);
  3811. #endif
  3812. #if PACKETVER_MAIN_NUM >= 20141008 || PACKETVER_RE_NUM >= 20140903 || defined(PACKETVER_ZERO)
  3813. struct PACKET_ZC_ACK_CLOSE_ROULETTE {
  3814. int16 packetType;
  3815. uint8 result;
  3816. } __attribute__((packed));
  3817. DEFINE_PACKET_HEADER(ZC_ACK_CLOSE_ROULETTE, 0x0a1e);
  3818. #endif
  3819. #if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
  3820. struct PACKET_ZC_ACK_MERGE_ITEM {
  3821. int16 packetType;
  3822. int16 index;
  3823. int16 amount;
  3824. uint8 reason;
  3825. } __attribute__((packed));
  3826. DEFINE_PACKET_HEADER(ZC_ACK_MERGE_ITEM, 0x096f);
  3827. #endif
  3828. #if PACKETVER_MAIN_NUM >= 20120314 || PACKETVER_RE_NUM >= 20120221 || defined(PACKETVER_ZERO)
  3829. struct PACKET_ZC_MERGE_ITEM_OPEN_sub {
  3830. int16 index;
  3831. } __attribute__((packed));
  3832. struct PACKET_ZC_MERGE_ITEM_OPEN {
  3833. int16 packetType;
  3834. uint16 packetLen;
  3835. struct PACKET_ZC_MERGE_ITEM_OPEN_sub items[];
  3836. } __attribute__((packed));
  3837. DEFINE_PACKET_HEADER(ZC_MERGE_ITEM_OPEN, 0x096d);
  3838. #endif
  3839. #if PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
  3840. struct PACKET_ZC_SE_PC_BUY_CASHITEM_RESULT {
  3841. int16 packetType;
  3842. uint32 itemId; // unused
  3843. uint16 result;
  3844. uint32 cashPoints;
  3845. uint32 kafraPoints;
  3846. } __attribute__((packed));
  3847. DEFINE_PACKET_HEADER(ZC_SE_PC_BUY_CASHITEM_RESULT, 0x0849);
  3848. #endif
  3849. #if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
  3850. struct PACKET_ZC_OPEN_REFINING_UI {
  3851. int16 packetType;
  3852. } __attribute__((packed));
  3853. DEFINE_PACKET_HEADER(ZC_OPEN_REFINING_UI, 0x0aa0);
  3854. #endif
  3855. #if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
  3856. struct PACKET_CZ_REFINING_SELECT_ITEM {
  3857. int16 packetType;
  3858. int16 index;
  3859. };
  3860. DEFINE_PACKET_HEADER(CZ_REFINING_SELECT_ITEM, 0x0aa1);
  3861. #endif
  3862. #if PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)
  3863. struct PACKET_ZC_REFINING_MATERIAL_LIST_SUB {
  3864. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3865. uint32 itemId;
  3866. #else
  3867. uint16 itemId;
  3868. #endif
  3869. int8 chance;
  3870. int32 zeny;
  3871. } __attribute__((packed));
  3872. struct PACKET_ZC_REFINING_MATERIAL_LIST {
  3873. int16 packetType;
  3874. int16 packetLength;
  3875. int16 itemIndex;
  3876. int8 blacksmithBlessing;
  3877. struct PACKET_ZC_REFINING_MATERIAL_LIST_SUB req[];
  3878. } __attribute__((packed));
  3879. DEFINE_PACKET_HEADER(ZC_REFINING_MATERIAL_LIST, 0x0aa2);
  3880. #endif
  3881. #if PACKETVER_MAIN_NUM >= 20161005 || PACKETVER_RE_NUM >= 20161005 || defined(PACKETVER_ZERO)
  3882. struct PACKET_CZ_REQ_REFINING {
  3883. int16 packetType;
  3884. int16 index;
  3885. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3886. uint32 itemId;
  3887. #else
  3888. uint16 itemId;
  3889. #endif
  3890. int8 blacksmithBlessing;
  3891. } __attribute__((packed));
  3892. DEFINE_PACKET_HEADER(CZ_REQ_REFINING, 0x0aa3);
  3893. struct PACKET_CZ_CLOSE_REFINING_UI {
  3894. int16 packetType;
  3895. } __attribute__((packed));
  3896. DEFINE_PACKET_HEADER(CZ_CLOSE_REFINING_UI, 0x0aa4);
  3897. #endif
  3898. #if PACKETVER_MAIN_NUM >= 20170906 || PACKETVER_RE_NUM >= 20170830 || defined(PACKETVER_ZERO)
  3899. struct PACKET_ZC_BROADCAST_ITEMREFINING_RESULT {
  3900. int16 packetType;
  3901. char name[NAME_LENGTH];
  3902. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  3903. uint32 itemId;
  3904. #else
  3905. uint16 itemId;
  3906. #endif
  3907. int8 refine_level;
  3908. int8 status;
  3909. } __attribute__((packed));
  3910. DEFINE_PACKET_HEADER(ZC_BROADCAST_ITEMREFINING_RESULT, 0x0ada);
  3911. #endif
  3912. struct PACKET_ZC_ACK_RANKING_name {
  3913. char name[NAME_LENGTH];
  3914. } __attribute__((packed));
  3915. struct PACKET_ZC_ACK_RANKING_points {
  3916. uint32 points;
  3917. } __attribute__((packed));
  3918. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
  3919. struct PACKET_ZC_ACK_RANKING_sub {
  3920. char name[NAME_LENGTH];
  3921. uint32 points;
  3922. } __attribute__((packed));
  3923. struct PACKET_ZC_ACK_RANKING {
  3924. int16 packetType;
  3925. int16 rankType;
  3926. uint32 chars[10];
  3927. uint32 points[10];
  3928. uint32 myPoints;
  3929. } __attribute__((packed));
  3930. DEFINE_PACKET_HEADER(ZC_ACK_RANKING, 0x0af6);
  3931. #elif PACKETVER_MAIN_NUM >= 20130605 || PACKETVER_RE_NUM >= 20130529 || defined(PACKETVER_ZERO)
  3932. struct PACKET_ZC_ACK_RANKING_sub {
  3933. struct PACKET_ZC_ACK_RANKING_name names[10];
  3934. struct PACKET_ZC_ACK_RANKING_points points[10];
  3935. } __attribute__((packed));
  3936. struct PACKET_ZC_ACK_RANKING {
  3937. int16 packetType;
  3938. int16 rankType;
  3939. struct PACKET_ZC_ACK_RANKING_sub ranks;
  3940. uint32 myPoints;
  3941. } __attribute__((packed));
  3942. DEFINE_PACKET_HEADER(ZC_ACK_RANKING, 0x097d);
  3943. #else
  3944. struct PACKET_ZC_ACK_RANKING_sub {
  3945. struct PACKET_ZC_ACK_RANKING_name names[10];
  3946. struct PACKET_ZC_ACK_RANKING_points points[10];
  3947. } __attribute__((packed));
  3948. #endif
  3949. struct PACKET_ZC_STATUS_CHANGE_ACK {
  3950. int16 packetType;
  3951. uint16 sp;
  3952. uint8 ok;
  3953. uint8 value;
  3954. } __attribute__((packed));
  3955. DEFINE_PACKET_HEADER(ZC_STATUS_CHANGE_ACK, 0x00bc);
  3956. #if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
  3957. struct PACKET_ZC_EQUIPMENT_EFFECT {
  3958. int16 packetType;
  3959. int16 packetLength;
  3960. uint32 aid;
  3961. int8 status;
  3962. uint16 effects[];
  3963. } __attribute__((packed));
  3964. DEFINE_PACKET_HEADER(ZC_EQUIPMENT_EFFECT, 0x0a3b);
  3965. #endif
  3966. // [4144] this struct updated not in all packets in client
  3967. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3968. struct SKILLDATA {
  3969. uint16 id;
  3970. int inf;
  3971. uint16 level;
  3972. uint16 sp;
  3973. uint16 range2;
  3974. uint8 upFlag;
  3975. uint16 level2;
  3976. } __attribute__((packed));
  3977. #else
  3978. struct SKILLDATA {
  3979. uint16 id;
  3980. int inf;
  3981. uint16 level;
  3982. uint16 sp;
  3983. uint16 range2;
  3984. char name[NAME_LENGTH];
  3985. uint8 upFlag;
  3986. } __attribute__((packed));
  3987. #endif
  3988. struct PACKET_ZC_ADD_SKILL {
  3989. int16 packetType;
  3990. struct SKILLDATA skill;
  3991. } __attribute__((packed));
  3992. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  3993. DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0b31);
  3994. #else
  3995. DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0111);
  3996. #endif
  3997. struct PACKET_ZC_SKILLINFO_LIST {
  3998. int16 packetType;
  3999. int16 packetLength;
  4000. struct SKILLDATA skills[];
  4001. } __attribute__((packed));
  4002. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  4003. DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x0b32);
  4004. #else
  4005. DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x010f);
  4006. #endif
  4007. #if PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190918
  4008. struct PACKET_ZC_SKILLINFO_UPDATE2 {
  4009. int16 packetType;
  4010. uint16 id;
  4011. int inf;
  4012. uint16 level;
  4013. uint16 sp;
  4014. uint16 range2;
  4015. uint8 upFlag;
  4016. uint16 level2;
  4017. } __attribute__((packed));
  4018. DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x0b33);
  4019. #else
  4020. struct PACKET_ZC_SKILLINFO_UPDATE2 {
  4021. int16 packetType;
  4022. uint16 id;
  4023. int inf;
  4024. uint16 level;
  4025. uint16 sp;
  4026. uint16 range2;
  4027. uint8 upFlag;
  4028. } __attribute__((packed));
  4029. DEFINE_PACKET_HEADER(ZC_SKILLINFO_UPDATE2, 0x07e1);
  4030. #endif
  4031. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub {
  4032. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4033. uint32 ITID;
  4034. #else
  4035. uint16 ITID;
  4036. #endif
  4037. uint16 qty;
  4038. uint32 price;
  4039. } __attribute__((packed));
  4040. #if PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190814
  4041. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT {
  4042. int16 PacketType;
  4043. int16 PacketLength;
  4044. uint16 result;
  4045. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[];
  4046. } __attribute__((packed));
  4047. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x0b4e);
  4048. #elif PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20130911 || defined(PACKETVER_ZERO)
  4049. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT {
  4050. int16 PacketType;
  4051. int16 PacketLength;
  4052. uint8 result;
  4053. struct PACKET_ZC_NPC_MARKET_PURCHASE_RESULT_sub list[];
  4054. } __attribute__((packed));
  4055. DEFINE_PACKET_HEADER(ZC_NPC_MARKET_PURCHASE_RESULT, 0x09d7);
  4056. #endif
  4057. struct PACKET_ZC_TALKBOX_CHATCONTENTS {
  4058. int16 PacketType;
  4059. uint32 aid;
  4060. char message[TALKBOX_MESSAGE_SIZE];
  4061. } __attribute__((packed));
  4062. DEFINE_PACKET_HEADER(ZC_TALKBOX_CHATCONTENTS, 0x0191);
  4063. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  4064. struct PACKET_ZC_GUILD_AGIT_INFO {
  4065. int16 packetType;
  4066. int16 packetLength;
  4067. int8 castle_list[];
  4068. } __attribute__((packed));
  4069. DEFINE_PACKET_HEADER(ZC_GUILD_AGIT_INFO, 0x0b27);
  4070. #endif
  4071. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190522 || PACKETVER_ZERO_NUM >= 20190515
  4072. struct PACKET_CZ_REQ_MOVE_GUILD_AGIT {
  4073. int16 packetType;
  4074. int8 castle_id;
  4075. } __attribute__((packed));
  4076. DEFINE_PACKET_HEADER(CZ_REQ_MOVE_GUILD_AGIT, 0x0b28);
  4077. #endif
  4078. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  4079. struct PACKET_ZC_REQ_ACK_MOVE_GUILD_AGIT {
  4080. int16 packetType;
  4081. int16 result;
  4082. } __attribute__((packed));
  4083. DEFINE_PACKET_HEADER(ZC_REQ_ACK_MOVE_GUILD_AGIT, 0x0b2e);
  4084. #endif
  4085. #if PACKETVER_MAIN_NUM >= 20190731 || PACKETVER_RE_NUM >= 20190717 || PACKETVER_ZERO_NUM >= 20190814
  4086. struct PACKET_ZC_REQ_ACK_AGIT_INVESTMENT {
  4087. int16 packetType;
  4088. int8 castle_id;
  4089. int32 economy;
  4090. int32 defense;
  4091. } __attribute__((packed));
  4092. DEFINE_PACKET_HEADER(ZC_REQ_ACK_AGIT_INVESTMENT, 0x0b2d);
  4093. #endif
  4094. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190522 || PACKETVER_ZERO_NUM >= 20190515
  4095. struct PACKET_CZ_REQ_AGIT_INVESTMENT {
  4096. int16 packetType;
  4097. int8 castle_id;
  4098. } __attribute__((packed));
  4099. DEFINE_PACKET_HEADER(CZ_REQ_AGIT_INVESTMENT, 0x0b2c);
  4100. #endif
  4101. #if PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  4102. struct PACKET_ZC_RANDOM_COMBINE_ITEM_UI_OPEN {
  4103. int16 packetType;
  4104. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4105. int32 itemId;
  4106. #else
  4107. int16 itemId;
  4108. #endif
  4109. } __attribute__((packed));
  4110. DEFINE_PACKET_HEADER(ZC_RANDOM_COMBINE_ITEM_UI_OPEN, 0x0a4e);
  4111. #endif // PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  4112. #if PACKETVER_MAIN_NUM >= 20160504 || PACKETVER_RE_NUM >= 20160504 || defined(PACKETVER_ZERO)
  4113. struct PACKET_CZ_RANDOM_COMBINE_ITEM_UI_CLOSE {
  4114. int16 packetType;
  4115. } __attribute__((packed));
  4116. DEFINE_PACKET_HEADER(CZ_RANDOM_COMBINE_ITEM_UI_CLOSE, 0x0a70);
  4117. #endif // PACKETVER_MAIN_NUM >= 20160504 || PACKETVER_RE_NUM >= 20160504 || defined(PACKETVER_ZERO)
  4118. #if PACKETVER >= 20160302
  4119. struct PACKET_CZ_REQ_RANDOM_COMBINE_ITEM_sub {
  4120. int16 index;
  4121. int16 count;
  4122. } __attribute__((packed));
  4123. struct PACKET_CZ_REQ_RANDOM_COMBINE_ITEM {
  4124. int16 packetType;
  4125. int16 packetLength;
  4126. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4127. int32 itemId;
  4128. #else
  4129. int16 itemId;
  4130. #endif
  4131. struct PACKET_CZ_REQ_RANDOM_COMBINE_ITEM_sub items[];
  4132. } __attribute__((packed));
  4133. DEFINE_PACKET_HEADER(CZ_REQ_RANDOM_COMBINE_ITEM, 0x0a4f);
  4134. #endif // PACKETVER >= 20160302
  4135. #if PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  4136. struct PACKET_ZC_ACK_RANDOM_COMBINE_ITEM {
  4137. int16 packetType;
  4138. int16 result;
  4139. } __attribute__((packed));
  4140. DEFINE_PACKET_HEADER(ZC_ACK_RANDOM_COMBINE_ITEM, 0x0a50);
  4141. #endif // PACKETVER_MAIN_NUM >= 20160601 || PACKETVER_RE_NUM >= 20160525 || defined(PACKETVER_ZERO)
  4142. #if PACKETVER_MAIN_NUM >= 20190703 || PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190709
  4143. struct PACKET_CZ_UNINSTALLATION {
  4144. int16 PacketType;
  4145. uint8 InstallationKind;
  4146. } __attribute__((packed));
  4147. DEFINE_PACKET_HEADER(CZ_UNINSTALLATION, 0x0b35);
  4148. #endif
  4149. // in 3 clients from same version
  4150. #if PACKETVER >= 20191127
  4151. struct PACKET_ZC_NOTIFY_EFFECT3 {
  4152. int16 packetType;
  4153. uint32 aid;
  4154. uint32 effectId;
  4155. uint64 num;
  4156. } __attribute__((packed));
  4157. DEFINE_PACKET_HEADER(ZC_NOTIFY_EFFECT3, 0x0b69);
  4158. #elif PACKETVER_MAIN_NUM >= 20060911 || PACKETVER_AD_NUM >= 20060911 || PACKETVER_SAK_NUM >= 20060911 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO)
  4159. struct PACKET_ZC_NOTIFY_EFFECT3 {
  4160. int16 packetType;
  4161. uint32 aid;
  4162. uint32 effectId;
  4163. uint32 num;
  4164. } __attribute__((packed));
  4165. DEFINE_PACKET_HEADER(ZC_NOTIFY_EFFECT3, 0x0284);
  4166. #endif
  4167. #if PACKETVER >= 20100824
  4168. struct PACKET_CZ_SE_CASHSHOP_OPEN1 {
  4169. int16 packetType;
  4170. } __attribute__((packed));
  4171. DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN1, 0x0844);
  4172. #endif
  4173. #if PACKETVER >= 20191224
  4174. struct PACKET_CZ_SE_CASHSHOP_OPEN2 {
  4175. int16 packetType;
  4176. uint32 tab;
  4177. } __attribute__((packed));
  4178. DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN2, 0x0b6d);
  4179. #endif
  4180. #if PACKETVER >= 20190724
  4181. struct PACKET_CZ_GET_ACCOUNT_LIMTIED_SALE_LIST {
  4182. int16 packetType;
  4183. } __attribute__((packed));
  4184. DEFINE_PACKET_HEADER(CZ_GET_ACCOUNT_LIMTIED_SALE_LIST, 0x0b4c);
  4185. #endif
  4186. #if PACKETVER_MAIN_NUM >= 20200129 || PACKETVER_RE_NUM >= 20200205 || PACKETVER_ZERO_NUM >= 20191224
  4187. struct PACKET_ZC_SE_CASHSHOP_OPEN {
  4188. int16 packetType;
  4189. uint32 cashPoints;
  4190. uint32 kafraPoints;
  4191. uint32 tab;
  4192. } __attribute__((packed));
  4193. DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0b6e);
  4194. #elif PACKETVER >= 20140730
  4195. struct PACKET_ZC_SE_CASHSHOP_OPEN {
  4196. int16 packetType;
  4197. uint32 cashPoints;
  4198. uint32 kafraPoints;
  4199. uint32 tab;
  4200. } __attribute__((packed));
  4201. DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0a2b);
  4202. #elif PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || defined(PACKETVER_ZERO)
  4203. struct PACKET_ZC_SE_CASHSHOP_OPEN {
  4204. int16 packetType;
  4205. uint32 cashPoints;
  4206. uint32 kafraPoints;
  4207. } __attribute__((packed));
  4208. DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0845);
  4209. #endif
  4210. #if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
  4211. struct PACKET_CZ_NPC_EXPANDED_BARTER_MARKET_CLOSE {
  4212. int16 packetType;
  4213. } __attribute__((packed));
  4214. DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_MARKET_CLOSE, 0x0b58);
  4215. #endif
  4216. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4217. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub2 {
  4218. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4219. uint32 nameid;
  4220. #else
  4221. uint16 nameid;
  4222. #endif
  4223. uint16 refine_level;
  4224. uint32 amount;
  4225. uint16 type;
  4226. } __attribute__((packed));
  4227. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub {
  4228. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4229. uint32 nameid;
  4230. #else
  4231. uint16 nameid;
  4232. #endif
  4233. uint16 type;
  4234. uint32 amount;
  4235. uint32 weight;
  4236. uint32 index;
  4237. uint32 zeny;
  4238. uint16 viewSprite;
  4239. uint32 location;
  4240. uint32 currency_count;
  4241. // Workaround: this should be currencies[], but compilers do not support multiple layers of incomplete types. See error C2233
  4242. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub2 currencies[1];
  4243. } __attribute__((packed));
  4244. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO {
  4245. int16 packetType;
  4246. int16 packetLength;
  4247. int32 items_count;
  4248. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub items[];
  4249. } __attribute__((packed));
  4250. DEFINE_PACKET_HEADER(ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO, 0x0b79);
  4251. #elif PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127
  4252. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub2 {
  4253. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4254. uint32 nameid;
  4255. #else
  4256. uint16 nameid;
  4257. #endif
  4258. uint16 refine_level;
  4259. uint32 amount;
  4260. uint16 type;
  4261. } __attribute__((packed));
  4262. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub {
  4263. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4264. uint32 nameid;
  4265. #else
  4266. uint16 nameid;
  4267. #endif
  4268. uint16 type;
  4269. uint32 amount;
  4270. uint32 weight;
  4271. uint32 index;
  4272. uint32 zeny;
  4273. uint32 currency_count;
  4274. // Workaround: this should be currencies[], but compilers do not support multiple layers of incomplete types. See error C2233
  4275. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub2 currencies[1];
  4276. } __attribute__((packed));
  4277. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO {
  4278. int16 packetType;
  4279. int16 packetLength;
  4280. int32 items_count;
  4281. struct PACKET_ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO_sub items[];
  4282. } __attribute__((packed));
  4283. DEFINE_PACKET_HEADER(ZC_NPC_EXPANDED_BARTER_MARKET_ITEMINFO, 0x0b56);
  4284. #endif // PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127
  4285. #if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
  4286. struct PACKET_CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE_sub {
  4287. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4288. uint32 itemId;
  4289. #else
  4290. uint16 itemId;
  4291. #endif
  4292. uint32 shopIndex;
  4293. uint32 amount;
  4294. } __attribute__((packed));
  4295. struct PACKET_CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE {
  4296. int16 packetType;
  4297. int16 packetLength;
  4298. struct PACKET_CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE_sub list[];
  4299. } __attribute__((packed));
  4300. DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_MARKET_PURCHASE, 0x0b57);
  4301. #endif
  4302. #if PACKETVER >= 7
  4303. struct PACKET_ZC_STATE_CHANGE {
  4304. int16 packetType;
  4305. uint32 AID;
  4306. int16 bodyState;
  4307. int16 healthState;
  4308. int32 effectState;
  4309. int8 isPKModeON;
  4310. } __attribute__((packed));
  4311. DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0229);
  4312. #else
  4313. struct PACKET_ZC_STATE_CHANGE {
  4314. int16 PacketType;
  4315. uint32 AID;
  4316. int16 bodyState;
  4317. int16 healthState;
  4318. int16 effectState;
  4319. int8 isPKModeON;
  4320. } __attribute__((packed));
  4321. DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0119);
  4322. #endif
  4323. struct PACKET_ZC_AUTORUN_SKILL {
  4324. int16 packetType;
  4325. uint16 skill_id;
  4326. uint32 skill_type;
  4327. uint16 skill_lv;
  4328. uint16 skill_sp;
  4329. uint16 skill_range;
  4330. char skill_name[NAME_LENGTH];
  4331. char up_flag;
  4332. } __attribute__((packed));
  4333. DEFINE_PACKET_HEADER(ZC_AUTORUN_SKILL, 0x0147);
  4334. #if PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  4335. struct PACKET_ZC_RANDOM_UPGRADE_ITEM_UI_OPEN {
  4336. int16 packetType;
  4337. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4338. uint32 itemId;
  4339. #else
  4340. uint16 itemId;
  4341. #endif
  4342. } __attribute__((packed));
  4343. DEFINE_PACKET_HEADER(ZC_RANDOM_UPGRADE_ITEM_UI_OPEN, 0x0ab4);
  4344. struct PACKET_ZC_ACK_RANDOM_UPGRADE_ITEM {
  4345. int16 packetType;
  4346. uint16 result;
  4347. } __attribute__((packed));
  4348. DEFINE_PACKET_HEADER(ZC_ACK_RANDOM_UPGRADE_ITEM, 0x0ab7);
  4349. #endif // PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
  4350. #if PACKETVER_MAIN_NUM >= 20170111 || PACKETVER_RE_NUM >= 20170111 || defined(PACKETVER_ZERO)
  4351. struct PACKET_CZ_RANDOM_UPGRADE_ITEM_UI_CLOSE {
  4352. int16 packetType;
  4353. } __attribute__((packed));
  4354. DEFINE_PACKET_HEADER(CZ_RANDOM_UPGRADE_ITEM_UI_CLOSE, 0x0ab5);
  4355. struct PACKET_CZ_REQ_RANDOM_UPGRADE_ITEM {
  4356. int16 packetType;
  4357. #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
  4358. uint32 itemId;
  4359. #else
  4360. uint16 itemId;
  4361. #endif
  4362. uint16 index;
  4363. } __attribute__((packed));
  4364. DEFINE_PACKET_HEADER(CZ_REQ_RANDOM_UPGRADE_ITEM, 0x0ab6);
  4365. #endif // PACKETVER_MAIN_NUM >= 20170111 || PACKETVER_RE_NUM >= 20170111 || defined(PACKETVER_ZERO)
  4366. #if PACKETVER_MAIN_NUM >= 20120503 || PACKETVER_RE_NUM >= 20120502 || defined(PACKETVER_ZERO)
  4367. struct PACKET_ZC_PERSONAL_INFOMATION_SUB {
  4368. int8 type;
  4369. int32 exp;
  4370. int32 death;
  4371. int32 drop;
  4372. } __attribute__((packed));
  4373. struct PACKET_ZC_PERSONAL_INFOMATION {
  4374. int16 packetType;
  4375. int16 length;
  4376. int32 total_exp;
  4377. int32 total_death;
  4378. int32 total_drop;
  4379. struct PACKET_ZC_PERSONAL_INFOMATION_SUB details[];
  4380. } __attribute__((packed));
  4381. DEFINE_PACKET_HEADER(ZC_PERSONAL_INFOMATION, 0x097b);
  4382. #elif PACKETVER_MAIN_NUM >= 20110627 || PACKETVER_RE_NUM >= 20110628
  4383. struct PACKET_ZC_PERSONAL_INFOMATION_SUB {
  4384. int8 type;
  4385. int16 exp;
  4386. int16 death;
  4387. int16 drop;
  4388. } __attribute__((packed));
  4389. struct PACKET_ZC_PERSONAL_INFOMATION {
  4390. int16 packetType;
  4391. int16 length;
  4392. int16 total_exp;
  4393. int16 total_death;
  4394. int16 total_drop;
  4395. struct PACKET_ZC_PERSONAL_INFOMATION_SUB details[];
  4396. } __attribute__((packed));
  4397. DEFINE_PACKET_HEADER(ZC_PERSONAL_INFOMATION, 0x08cb);
  4398. #endif // PACKETVER_MAIN_NUM >= 20110627 || PACKETVER_RE_NUM >= 20110628
  4399. struct PACKET_CZ_REQUEST_ACTNPC {
  4400. int16 packetType;
  4401. uint32 GID;
  4402. uint32 targetGID;
  4403. int8 action;
  4404. } __attribute__((packed));
  4405. #if PACKETVER < 3
  4406. struct PACKET_ZC_NOTIFY_SKILL {
  4407. int16 PacketType;
  4408. uint16 SKID;
  4409. uint32 AID;
  4410. uint32 targetID;
  4411. uint32 startTime;
  4412. int32 attackMT;
  4413. int32 attackedMT;
  4414. int16 damage;
  4415. int16 level;
  4416. int16 count;
  4417. int8 action;
  4418. } __attribute__((packed));
  4419. DEFINE_PACKET_HEADER(ZC_NOTIFY_SKILL, 0x0114);
  4420. #else
  4421. struct PACKET_ZC_NOTIFY_SKILL {
  4422. int16 PacketType;
  4423. uint16 SKID;
  4424. uint32 AID;
  4425. uint32 targetID;
  4426. uint32 startTime;
  4427. int32 attackMT;
  4428. int32 attackedMT;
  4429. int32 damage;
  4430. int16 level;
  4431. int16 count;
  4432. int8 action;
  4433. } __attribute__((packed));
  4434. DEFINE_PACKET_HEADER(ZC_NOTIFY_SKILL, 0x01de);
  4435. #endif
  4436. #if PACKETVER_MAIN_NUM >= 20130731 || PACKETVER_RE_NUM >= 20130724 || defined(PACKETVER_ZERO)
  4437. struct PACKET_ZC_USE_SKILL {
  4438. int16 PacketType;
  4439. uint16 SKID;
  4440. int32 level;
  4441. uint32 targetAID;
  4442. uint32 srcAID;
  4443. int8 result;
  4444. } __attribute__((packed));
  4445. DEFINE_PACKET_HEADER(ZC_USE_SKILL, 0x09cb);
  4446. #else
  4447. struct PACKET_ZC_USE_SKILL {
  4448. int16 PacketType;
  4449. uint16 SKID;
  4450. int16 level;
  4451. uint32 targetAID;
  4452. uint32 srcAID;
  4453. int8 result;
  4454. } __attribute__((packed));
  4455. DEFINE_PACKET_HEADER(ZC_USE_SKILL, 0x011a);
  4456. #endif
  4457. struct PACKET_ZC_NOTIFY_GROUNDSKILL {
  4458. int16 PacketType;
  4459. uint16 SKID;
  4460. uint32 AID;
  4461. int16 level;
  4462. int16 xPos;
  4463. int16 yPos;
  4464. uint32 startTime;
  4465. } __attribute__((packed));
  4466. DEFINE_PACKET_HEADER(ZC_NOTIFY_GROUNDSKILL, 0x0117);
  4467. #if PACKETVER_MAIN_NUM >= 20081112 || PACKETVER_RE_NUM >= 20081111 || defined(PACKETVER_ZERO)
  4468. struct PACKET_ZC_SKILL_POSTDELAY {
  4469. int16 PacketType;
  4470. uint16 SKID;
  4471. uint32 DelayTM;
  4472. } __attribute__((packed));
  4473. DEFINE_PACKET_HEADER(ZC_SKILL_POSTDELAY, 0x043d);
  4474. #endif
  4475. struct PACKET_ZC_NOTIFY_SKILL_POSITION {
  4476. int16 PacketType;
  4477. uint16 SKID;
  4478. uint32 AID;
  4479. uint32 targetID;
  4480. uint32 startTime;
  4481. int32 attackMT;
  4482. int32 attackedMT;
  4483. int16 xPos;
  4484. int16 yPos;
  4485. int16 damage;
  4486. int16 level;
  4487. int16 count;
  4488. int8 action;
  4489. };
  4490. DEFINE_PACKET_HEADER(ZC_NOTIFY_SKILL_POSITION, 0x0115);
  4491. #if PACKETVER_MAIN_NUM >= 20130731 || PACKETVER_RE_NUM >= 20130707 || defined(PACKETVER_ZERO)
  4492. struct PACKET_ZC_C_MARKERINFO {
  4493. int16 PacketType;
  4494. uint32 AID;
  4495. int16 xPos;
  4496. int16 yPos;
  4497. } __attribute__((packed));
  4498. DEFINE_PACKET_HEADER(ZC_C_MARKERINFO, 0x09c1);
  4499. #endif
  4500. #if PACKETVER >= 20200902
  4501. struct GUILD_MEMBER_INFO {
  4502. uint32 AID;
  4503. uint32 GID;
  4504. int16 head;
  4505. int16 headPalette;
  4506. int16 sex;
  4507. int16 job;
  4508. int16 level;
  4509. int32 contributionExp;
  4510. int32 currentState;
  4511. int32 positionID;
  4512. uint32 lastLoginTime;
  4513. char char_name[NAME_LENGTH];
  4514. } __attribute__((packed));
  4515. struct PACKET_ZC_MEMBERMGR_INFO {
  4516. int16 PacketType;
  4517. int16 packetLength;
  4518. struct GUILD_MEMBER_INFO guildMemberInfo[];
  4519. } __attribute__((packed));
  4520. DEFINE_PACKET_HEADER(ZC_MEMBERMGR_INFO, 0x0b7d);
  4521. #elif PACKETVER_MAIN_NUM >= 20161214 || PACKETVER_RE_NUM >= 20161130 || defined(PACKETVER_ZERO)
  4522. struct GUILD_MEMBER_INFO {
  4523. uint32 AID;
  4524. uint32 GID;
  4525. int16 head;
  4526. int16 headPalette;
  4527. int16 sex;
  4528. int16 job;
  4529. int16 level;
  4530. int32 contributionExp;
  4531. int32 currentState;
  4532. int32 positionID;
  4533. uint32 lastLoginTime;
  4534. } __attribute__((packed));
  4535. struct PACKET_ZC_MEMBERMGR_INFO {
  4536. int16 PacketType;
  4537. int16 packetLength;
  4538. struct GUILD_MEMBER_INFO guildMemberInfo[];
  4539. } __attribute__((packed));
  4540. DEFINE_PACKET_HEADER(ZC_MEMBERMGR_INFO, 0x0aa5);
  4541. #else // false: PACKETVER_MAIN_NUM >= 20161214 || PACKETVER_RE_NUM >= 20161130 || defined(PACKETVER_ZERO)
  4542. struct GUILD_MEMBER_INFO {
  4543. uint32 AID;
  4544. uint32 GID;
  4545. int16 head;
  4546. int16 headPalette;
  4547. int16 sex;
  4548. int16 job;
  4549. int16 level;
  4550. int32 contributionExp;
  4551. int32 currentState;
  4552. int32 positionID;
  4553. char intro[50];
  4554. char char_name[NAME_LENGTH];
  4555. } __attribute__((packed));
  4556. struct PACKET_ZC_MEMBERMGR_INFO {
  4557. int16 PacketType;
  4558. int16 packetLength;
  4559. struct GUILD_MEMBER_INFO guildMemberInfo[];
  4560. } __attribute__((packed));
  4561. DEFINE_PACKET_HEADER(ZC_MEMBERMGR_INFO, 0x0154);
  4562. #endif
  4563. #if PACKETVER >= 20200902
  4564. struct PACKET_ZC_GUILD_INFO {
  4565. int16 PacketType;
  4566. int GDID;
  4567. int level;
  4568. int userNum;
  4569. int maxUserNum;
  4570. int userAverageLevel;
  4571. int exp;
  4572. int maxExp;
  4573. int point;
  4574. int honor;
  4575. int virtue;
  4576. int emblemVersion;
  4577. char guildname[NAME_LENGTH];
  4578. char manageLand[MAP_NAME_LENGTH_EXT];
  4579. int zeny;
  4580. int masterGID;
  4581. char masterName[NAME_LENGTH];
  4582. } __attribute__((packed));
  4583. DEFINE_PACKET_HEADER(ZC_GUILD_INFO, 0x0b7b);
  4584. #elif PACKETVER_MAIN_NUM >= 20161019 || PACKETVER_RE_NUM >= 20160921 || defined(PACKETVER_ZERO)
  4585. struct PACKET_ZC_GUILD_INFO {
  4586. int16 PacketType;
  4587. int GDID;
  4588. int level;
  4589. int userNum;
  4590. int maxUserNum;
  4591. int userAverageLevel;
  4592. int exp;
  4593. int maxExp;
  4594. int point;
  4595. int honor;
  4596. int virtue;
  4597. int emblemVersion;
  4598. char guildname[NAME_LENGTH];
  4599. char manageLand[MAP_NAME_LENGTH_EXT];
  4600. int zeny;
  4601. int masterGID;
  4602. } __attribute__((packed));
  4603. DEFINE_PACKET_HEADER(ZC_GUILD_INFO, 0x0a84);
  4604. #else
  4605. struct PACKET_ZC_GUILD_INFO {
  4606. int16 PacketType;
  4607. int GDID;
  4608. int level;
  4609. int userNum;
  4610. int maxUserNum;
  4611. int userAverageLevel;
  4612. int exp;
  4613. int maxExp;
  4614. int point;
  4615. int honor;
  4616. int virtue;
  4617. int emblemVersion;
  4618. char guildname[NAME_LENGTH];
  4619. char masterName[NAME_LENGTH];
  4620. char manageLand[MAP_NAME_LENGTH_EXT];
  4621. int zeny;
  4622. } __attribute__((packed));
  4623. //0x150; [4144] this is packet for older versions?
  4624. DEFINE_PACKET_HEADER(ZC_GUILD_INFO, 0x01b6);
  4625. #endif
  4626. struct PACKET_ZC_POSITION_ID_NAME_INFO {
  4627. int16 PacketType;
  4628. int16 PacketLength;
  4629. struct {
  4630. int positionID;
  4631. char posName[NAME_LENGTH];
  4632. } posInfo[MAX_GUILDPOSITION];
  4633. } __attribute__((packed));
  4634. DEFINE_PACKET_HEADER(ZC_POSITION_ID_NAME_INFO, 0x0166);
  4635. struct PACKET_ZC_POSITION_INFO {
  4636. int16 PacketType;
  4637. int16 PacketLength;
  4638. struct {
  4639. int positionID;
  4640. int right;
  4641. int ranking;
  4642. int payRate;
  4643. } posInfo[MAX_GUILDPOSITION];
  4644. } __attribute__((packed));
  4645. DEFINE_PACKET_HEADER(ZC_POSITION_INFO, 0x0160);
  4646. struct GUILD_SKILLDATA {
  4647. uint16 id;
  4648. int inf;
  4649. uint16 level;
  4650. uint16 sp;
  4651. uint16 range2;
  4652. char name[NAME_LENGTH];
  4653. uint8 upFlag;
  4654. } __attribute__((packed));
  4655. struct PACKET_ZC_GUILD_SKILLINFO {
  4656. int16 PacketType;
  4657. int16 PacketLength;
  4658. int16 skillPoint;
  4659. struct GUILD_SKILLDATA skillInfo[];
  4660. } __attribute__((packed));
  4661. DEFINE_PACKET_HEADER(ZC_GUILD_SKILLINFO, 0x0162);
  4662. struct RELATED_GUILD_INFO {
  4663. int relation;
  4664. int GDID;
  4665. char guildname[NAME_LENGTH];
  4666. } __attribute__((packed));
  4667. struct PACKET_ZC_MYGUILD_BASIC_INFO {
  4668. int16 PacketType;
  4669. int16 PacketLength;
  4670. struct RELATED_GUILD_INFO rgInfo[];
  4671. } __attribute__((packed));
  4672. DEFINE_PACKET_HEADER(ZC_MYGUILD_BASIC_INFO, 0x014c);
  4673. #if PACKETVER >= 20160316
  4674. struct PACKET_CZ_REQ_UPLOAD_MACRO_DETECTOR {
  4675. int16 PacketType;
  4676. char answer[16];
  4677. uint16 imageSize;
  4678. } __attribute__((packed));
  4679. DEFINE_PACKET_HEADER(CZ_REQ_UPLOAD_MACRO_DETECTOR, 0x0a52);
  4680. #endif
  4681. #if PACKETVER >= 20160330
  4682. struct PACKET_ZC_ACK_UPLOAD_MACRO_DETECTOR {
  4683. int16 PacketType;
  4684. char captchaKey[4];
  4685. int captchaFlag;
  4686. } __attribute__((packed));
  4687. DEFINE_PACKET_HEADER(ZC_ACK_UPLOAD_MACRO_DETECTOR, 0x0a53);
  4688. #endif
  4689. #if PACKETVER >= 20160316
  4690. struct PACKET_CZ_UPLOAD_MACRO_DETECTOR_CAPTCHA {
  4691. int16 PacketType;
  4692. int16 PacketLength;
  4693. char captchaKey[4];
  4694. char imageData[];
  4695. } __attribute__((packed));
  4696. DEFINE_PACKET_HEADER(CZ_UPLOAD_MACRO_DETECTOR_CAPTCHA, 0x0a54);
  4697. #endif
  4698. #if PACKETVER >= 20160330
  4699. struct PACKET_ZC_COMPLETE_UPLOAD_MACRO_DETECTOR_CAPTCHA {
  4700. int16 PacketType;
  4701. } __attribute__((packed));
  4702. DEFINE_PACKET_HEADER(ZC_COMPLETE_UPLOAD_MACRO_DETECTOR_CAPTCHA, 0x0a55);
  4703. #endif
  4704. #if PACKETVER >= 20160316
  4705. struct PACKET_CZ_REQ_APPLY_MACRO_DETECTOR {
  4706. int16 PacketType;
  4707. uint32 AID;
  4708. } __attribute__((packed));
  4709. DEFINE_PACKET_HEADER(CZ_REQ_APPLY_MACRO_DETECTOR, 0x0a56);
  4710. #endif
  4711. #if PACKETVER >= 20160330
  4712. struct PACKET_ZC_ACK_APPLY_MACRO_DETECTOR {
  4713. int16 PacketType;
  4714. int status;
  4715. } __attribute__((packed));
  4716. DEFINE_PACKET_HEADER(ZC_ACK_APPLY_MACRO_DETECTOR, 0x0a57);
  4717. #endif
  4718. #if PACKETVER >= 20160330
  4719. struct PACKET_ZC_APPLY_MACRO_DETECTOR {
  4720. int16 PacketType;
  4721. uint16 imageSize;
  4722. char captchaKey[4];
  4723. } __attribute__((packed));
  4724. DEFINE_PACKET_HEADER(ZC_APPLY_MACRO_DETECTOR, 0x0a58);
  4725. #endif
  4726. #if PACKETVER >= 20160330
  4727. struct PACKET_ZC_APPLY_MACRO_DETECTOR_CAPTCHA {
  4728. int16 PacketType;
  4729. int16 PacketLength;
  4730. char captchaKey[4];
  4731. char imageData[];
  4732. } __attribute__((packed));
  4733. DEFINE_PACKET_HEADER(ZC_APPLY_MACRO_DETECTOR_CAPTCHA, 0x0a59);
  4734. #endif
  4735. #if PACKETVER >= 20160316
  4736. struct PACKET_CZ_COMPLETE_APPLY_MACRO_DETECTOR_CAPTCHA {
  4737. int16 PacketType;
  4738. } __attribute__((packed));
  4739. DEFINE_PACKET_HEADER(CZ_COMPLETE_APPLY_MACRO_DETECTOR_CAPTCHA, 0x0a5a);
  4740. #endif
  4741. #if PACKETVER >= 20160330
  4742. struct PACKET_ZC_REQ_ANSWER_MACRO_DETECTOR {
  4743. int16 PacketType;
  4744. uint8 retryCount;
  4745. int timeout;
  4746. } __attribute__((packed));
  4747. DEFINE_PACKET_HEADER(ZC_REQ_ANSWER_MACRO_DETECTOR, 0x0a5b);
  4748. #endif
  4749. #if PACKETVER >= 20160316
  4750. struct PACKET_CZ_ACK_ANSWER_MACRO_DETECTOR {
  4751. int16 PacketType;
  4752. char answer[16];
  4753. } __attribute__((packed));
  4754. DEFINE_PACKET_HEADER(CZ_ACK_ANSWER_MACRO_DETECTOR, 0x0a5c);
  4755. #endif
  4756. #if PACKETVER >= 20160330
  4757. struct PACKET_ZC_CLOSE_MACRO_DETECTOR {
  4758. int16 PacketType;
  4759. int status;
  4760. } __attribute__((packed));
  4761. DEFINE_PACKET_HEADER(ZC_CLOSE_MACRO_DETECTOR, 0x0a5d);
  4762. #endif
  4763. #if PACKETVER >= 20160323
  4764. struct PACKET_CZ_REQ_PREVIEW_MACRO_DETECTOR {
  4765. int16 PacketType;
  4766. int captchaID;
  4767. } __attribute__((packed));
  4768. DEFINE_PACKET_HEADER(CZ_REQ_PREVIEW_MACRO_DETECTOR, 0x0a69);
  4769. #endif
  4770. #if PACKETVER >= 20160330
  4771. struct PACKET_ZC_ACK_PREVIEW_MACRO_DETECTOR {
  4772. int16 PacketType;
  4773. int captchaFlag;
  4774. uint16 imageSize;
  4775. char captchaKey[4];
  4776. } __attribute__((packed));
  4777. DEFINE_PACKET_HEADER(ZC_ACK_PREVIEW_MACRO_DETECTOR, 0x0a6a);
  4778. #endif
  4779. #if PACKETVER >= 20160330
  4780. struct PACKET_ZC_PREVIEW_MACRO_DETECTOR_CAPTCHA {
  4781. int16 PacketType;
  4782. int16 PacketLength;
  4783. char captchaKey[4];
  4784. char imageData[];
  4785. } __attribute__((packed));
  4786. DEFINE_PACKET_HEADER(ZC_PREVIEW_MACRO_DETECTOR_CAPTCHA, 0x0a6b);
  4787. #endif
  4788. #if PACKETVER >= 20160330
  4789. struct PACKET_CZ_REQ_PLAYER_AID_IN_RANGE {
  4790. int16 PacketType;
  4791. int16 xPos;
  4792. int16 yPos;
  4793. int8 RadiusRange;
  4794. } __attribute__((packed));
  4795. DEFINE_PACKET_HEADER(CZ_REQ_PLAYER_AID_IN_RANGE, 0x0a6c);
  4796. #endif
  4797. #if PACKETVER >= 20160330
  4798. struct PACKET_ZC_ACK_PLAYER_AID_IN_RANGE {
  4799. int16 PacketType;
  4800. int16 PacketLength;
  4801. uint32 AID[];
  4802. } __attribute__((packed));
  4803. DEFINE_PACKET_HEADER(ZC_ACK_PLAYER_AID_IN_RANGE, 0x0a6d);
  4804. #endif
  4805. struct PACKET_ZC_ACK_MAKE_GROUP {
  4806. int16 PacketType;
  4807. int8 result;
  4808. } __attribute__((packed));
  4809. DEFINE_PACKET_HEADER(ZC_ACK_MAKE_GROUP, 0x00fa);
  4810. struct PACKET_ZC_PARTY_JOIN_REQ {
  4811. int16 PacketType;
  4812. int GRID;
  4813. char groupName[NAME_LENGTH];
  4814. } __attribute__((packed));
  4815. #if PACKETVER < 20070821
  4816. DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ, 0x00fe);
  4817. #else
  4818. DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ, 0x02c6);
  4819. #endif
  4820. struct PACKET_ZC_PARTY_JOIN_REQ_ACK {
  4821. int16 PacketType;
  4822. char characterName[NAME_LENGTH];
  4823. int result;
  4824. } __attribute__((packed));
  4825. #if PACKETVER < 20070821
  4826. DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ_ACK, 0x00fd);
  4827. #else
  4828. DEFINE_PACKET_HEADER(ZC_PARTY_JOIN_REQ_ACK, 0x02c5);
  4829. #endif
  4830. struct PACKET_ZC_NOTIFY_CHAT_PARTY {
  4831. int16 PacketType;
  4832. int16 PacketLength;
  4833. int AID;
  4834. char chatMsg[];
  4835. } __attribute__((packed));
  4836. DEFINE_PACKET_HEADER(ZC_NOTIFY_CHAT_PARTY, 0x0109);
  4837. struct PACKET_ZC_NOTIFY_POSITION_TO_GROUPM {
  4838. int16 PacketType;
  4839. int AID;
  4840. int16 xPos;
  4841. int16 yPos;
  4842. } __attribute__((packed));
  4843. DEFINE_PACKET_HEADER(ZC_NOTIFY_POSITION_TO_GROUPM, 0x0107);
  4844. #if PACKETVER_ZERO_NUM >= 20210504
  4845. struct PACKET_ZC_NOTIFY_HP_TO_GROUPM {
  4846. int16 PacketType;
  4847. uint32 AID;
  4848. int hp;
  4849. int maxhp;
  4850. int sp;
  4851. int maxsp;
  4852. } __attribute__((packed));
  4853. DEFINE_PACKET_HEADER(ZC_NOTIFY_HP_TO_GROUPM, 0x0bab);
  4854. #elif PACKETVER >= 20100119
  4855. struct PACKET_ZC_NOTIFY_HP_TO_GROUPM {
  4856. int16 PacketType;
  4857. uint32 AID;
  4858. int hp;
  4859. int maxhp;
  4860. } __attribute__((packed));
  4861. DEFINE_PACKET_HEADER(ZC_NOTIFY_HP_TO_GROUPM, 0x080e);
  4862. #else // PACKETVER >= 20100119
  4863. struct PACKET_ZC_NOTIFY_HP_TO_GROUPM {
  4864. int16 PacketType;
  4865. uint32 AID;
  4866. int16 hp;
  4867. int16 maxhp;
  4868. } __attribute__((packed));
  4869. DEFINE_PACKET_HEADER(ZC_NOTIFY_HP_TO_GROUPM, 0x0106);
  4870. #endif // PACKETVER >= 20100119
  4871. #if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
  4872. struct PACKET_ZC_NOTIFY_MEMBERINFO_TO_GROUPM {
  4873. int16 PacketType;
  4874. int AID;
  4875. int16 job;
  4876. int16 level;
  4877. } __attribute__((packed));
  4878. DEFINE_PACKET_HEADER(ZC_NOTIFY_MEMBERINFO_TO_GROUPM, 0x0abd);
  4879. #endif
  4880. struct PACKET_ZC_DELETE_MEMBER_FROM_GROUP {
  4881. int16 PacketType;
  4882. int AID;
  4883. char characterName[NAME_LENGTH];
  4884. int8 result;
  4885. } __attribute__((packed));
  4886. DEFINE_PACKET_HEADER(ZC_DELETE_MEMBER_FROM_GROUP, 0x0105);
  4887. #if PACKETVER_MAIN_NUM >= 20230906
  4888. struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL {
  4889. int16 PacketType;
  4890. uint32 location;
  4891. } __attribute__((packed));
  4892. DEFINE_PACKET_HEADER(CZ_REQ_TAKEOFF_EQUIP_ALL, 0x0bf5);
  4893. #elif PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210818
  4894. struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL {
  4895. int16 PacketType;
  4896. } __attribute__((packed));
  4897. DEFINE_PACKET_HEADER(CZ_REQ_TAKEOFF_EQUIP_ALL, 0x0bad);
  4898. #endif // PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210818
  4899. #if PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4900. struct PACKET_ZC_ACK_TAKEOFF_EQUIP_ALL {
  4901. int16 PacketType;
  4902. uint8 result;
  4903. } __attribute__((packed));
  4904. DEFINE_PACKET_HEADER(ZC_ACK_TAKEOFF_EQUIP_ALL, 0x0bae);
  4905. #endif // PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4906. #if PACKETVER_ZERO_NUM >= 20210504
  4907. struct PACKET_ZC_BATTLEFIELD_NOTIFY_HP {
  4908. int16 PacketType;
  4909. uint32 AID;
  4910. int hp;
  4911. int maxhp;
  4912. int sp;
  4913. int maxsp;
  4914. } __attribute__((packed));
  4915. DEFINE_PACKET_HEADER(ZC_BATTLEFIELD_NOTIFY_HP, 0x0baa);
  4916. #elif PACKETVER >= 20140312
  4917. struct PACKET_ZC_BATTLEFIELD_NOTIFY_HP {
  4918. int16 PacketType;
  4919. uint32 AID;
  4920. int hp;
  4921. int maxhp;
  4922. } __attribute__((packed));
  4923. DEFINE_PACKET_HEADER(ZC_BATTLEFIELD_NOTIFY_HP, 0x0a0e);
  4924. #elif PACKETVER >= 20071009
  4925. struct PACKET_ZC_BATTLEFIELD_NOTIFY_HP {
  4926. int16 PacketType;
  4927. uint32 AID;
  4928. char name[NAME_LENGTH];
  4929. int16 hp;
  4930. int16 maxhp;
  4931. } __attribute__((packed));
  4932. DEFINE_PACKET_HEADER(ZC_BATTLEFIELD_NOTIFY_HP, 0x02e0);
  4933. #endif // PACKETVER >= 20071009
  4934. #if PACKETVER_ZERO_NUM >= 20210721
  4935. struct PACKET_ZC_QUEST_DIALOG {
  4936. int16 PacketType;
  4937. int16 PacketLength;
  4938. uint32 NpcID;
  4939. char message[];
  4940. } __attribute__((packed));
  4941. DEFINE_PACKET_HEADER(ZC_QUEST_DIALOG, 0x0ba6);
  4942. #endif // PACKETVER_ZERO_NUM >= 20210721
  4943. #if PACKETVER_ZERO_NUM >= 20210721
  4944. struct PACKET_ZC_MONOLOG_DIALOG {
  4945. int16 PacketType;
  4946. int16 PacketLength;
  4947. uint32 NpcID;
  4948. char message[];
  4949. } __attribute__((packed));
  4950. DEFINE_PACKET_HEADER(ZC_MONOLOG_DIALOG, 0x0ba9);
  4951. #endif // PACKETVER_ZERO_NUM >= 20210721
  4952. #if PACKETVER_ZERO_NUM >= 20210721
  4953. struct PACKET_ZC_QUEST_DIALOG_MENU_LIST {
  4954. int16 PacketType;
  4955. int16 PacketLength;
  4956. uint32 NpcID;
  4957. char message[];
  4958. } __attribute__((packed));
  4959. DEFINE_PACKET_HEADER(ZC_QUEST_DIALOG_MENU_LIST, 0x0ba7);
  4960. #endif // PACKETVER_ZERO_NUM >= 20210721
  4961. #if PACKETVER_MAIN_NUM >= 20210317 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210317
  4962. struct PACKET_CZ_CHOOSE_MENU_ZERO {
  4963. int16 PacketType;
  4964. uint32 NpcID;
  4965. uint8 menuIndex;
  4966. } __attribute__((packed));
  4967. DEFINE_PACKET_HEADER(CZ_CHOOSE_MENU_ZERO, 0x0ba8);
  4968. #endif // PACKETVER_MAIN_NUM >= 20210317 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210317
  4969. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4970. struct PACKET_ZC_DIALOG_TEXT_ALIGN {
  4971. int16 PacketType;
  4972. uint8 align;
  4973. } __attribute__((packed));
  4974. DEFINE_PACKET_HEADER(ZC_DIALOG_TEXT_ALIGN, 0x0ba1);
  4975. #endif // PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  4976. #if PACKETVER_MAIN_NUM >= 20191016 || PACKETVER_RE_NUM >= 20191016 || PACKETVER_ZERO_NUM >= 20191008
  4977. struct PACKET_CZ_GRADE_ENCHANT_SELECT_EQUIPMENT {
  4978. int16 PacketType;
  4979. int16 index;
  4980. } __attribute__((packed));
  4981. DEFINE_PACKET_HEADER(CZ_GRADE_ENCHANT_SELECT_EQUIPMENT, 0x0b59);
  4982. #endif
  4983. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  4984. struct GRADE_ENCHANT_BLESSING {
  4985. int32 id;
  4986. int32 amount;
  4987. int32 max_blessing;
  4988. int32 bonus;
  4989. } __attribute__((packed));
  4990. struct GRADE_ENCHANT_MATERIAL {
  4991. int32 nameid;
  4992. int32 amount;
  4993. int32 price;
  4994. int32 downgrade;
  4995. int8 breakable;
  4996. } __attribute__((packed));
  4997. struct PACKET_ZC_GRADE_ENCHANT_MATERIAL_LIST {
  4998. int16 PacketType;
  4999. int16 PacketLength;
  5000. int16 index;
  5001. int32 success_chance;
  5002. struct GRADE_ENCHANT_BLESSING blessing_info;
  5003. int32 protect_itemid; // used only for PACKETVER_RE_NUM >= 20200723 && PACKETVER_RE_NUM <= 20200819
  5004. int32 protect_amount; // used only for PACKETVER_RE_NUM >= 20200723 && PACKETVER_RE_NUM <= 20200819
  5005. struct GRADE_ENCHANT_MATERIAL material_info[];
  5006. } __attribute__((packed));
  5007. DEFINE_PACKET_HEADER(ZC_GRADE_ENCHANT_MATERIAL_LIST, 0x0b5a);
  5008. #endif
  5009. #if PACKETVER_MAIN_NUM >= 20191016 || PACKETVER_RE_NUM >= 20191016 || PACKETVER_ZERO_NUM >= 20191008
  5010. struct PACKET_CZ_GRADE_ENCHANT_REQUEST {
  5011. int16 PacketType;
  5012. int16 index;
  5013. int material_index;
  5014. int8 blessing_flag;
  5015. int blessing_amount;
  5016. int8 protect_flag; // used only for PACKETVER_RE_NUM >= 20200723 && PACKETVER_RE_NUM <= 20200819
  5017. } __attribute__((packed));
  5018. DEFINE_PACKET_HEADER(CZ_GRADE_ENCHANT_REQUEST, 0x0b5b);
  5019. #endif
  5020. #if PACKETVER_MAIN_NUM >= 20191016 || PACKETVER_RE_NUM >= 20191016 || PACKETVER_ZERO_NUM >= 20191008
  5021. struct PACKET_CZ_GRADE_ENCHANT_CLOSE_UI {
  5022. int16 PacketType;
  5023. } __attribute__((packed));
  5024. DEFINE_PACKET_HEADER(CZ_GRADE_ENCHANT_CLOSE_UI, 0x0b5c);
  5025. #endif
  5026. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  5027. struct PACKET_ZC_GRADE_ENCHANT_ACK {
  5028. int16 PacketType;
  5029. int16 index;
  5030. int16 grade;
  5031. int result;
  5032. } __attribute__((packed));
  5033. DEFINE_PACKET_HEADER(ZC_GRADE_ENCHANT_ACK, 0x0b5d);
  5034. #endif
  5035. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20221024
  5036. struct PACKET_ZC_GRADE_ENCHANT_BROADCAST_RESULT {
  5037. int16 packetType;
  5038. char name[NAME_LENGTH];
  5039. uint32 itemId;
  5040. int16 grade;
  5041. int8 status;
  5042. } __attribute__((packed));
  5043. DEFINE_PACKET_HEADER(ZC_GRADE_ENCHANT_BROADCAST_RESULT, 0x0b5e);
  5044. #endif
  5045. struct PACKET_ZC_SHOW_IMAGE {
  5046. int16 packetType;
  5047. char image[64];
  5048. uint8 type;
  5049. } __attribute__((packed));
  5050. DEFINE_PACKET_HEADER(ZC_SHOW_IMAGE, 0x01b3)
  5051. #if PACKETVER_MAIN_NUM >= 20131204 || PACKETVER_RE_NUM >= 20131120 || defined(PACKETVER_ZERO)
  5052. struct PACKET_ZC_WHISPER {
  5053. int16 PacketType;
  5054. int16 PacketLength;
  5055. uint32 senderGID;
  5056. char sender[NAME_LENGTH];
  5057. uint8 isAdmin;
  5058. char message[];
  5059. } __attribute__((packed));
  5060. DEFINE_PACKET_HEADER(ZC_WHISPER, 0x09de)
  5061. // [4144] unconfirmed version
  5062. #elif PACKETVER >= 20091104
  5063. struct PACKET_ZC_WHISPER {
  5064. int16 PacketType;
  5065. int16 PacketLength;
  5066. char sender[NAME_LENGTH];
  5067. int32 isAdmin;
  5068. char message[];
  5069. } __attribute__((packed));
  5070. DEFINE_PACKET_HEADER(ZC_WHISPER, 0x0097)
  5071. #else // PACKETVER_MAIN_NUM >= 20131204 || PACKETVER_RE_NUM >= 20131120 || defined(PACKETVER_ZERO)
  5072. struct PACKET_ZC_WHISPER {
  5073. int16 PacketType;
  5074. int16 PacketLength;
  5075. char sender[NAME_LENGTH];
  5076. char message[];
  5077. } __attribute__((packed));
  5078. DEFINE_PACKET_HEADER(ZC_WHISPER, 0x0097)
  5079. #endif // PACKETVER_MAIN_NUM >= 20131204 || PACKETVER_RE_NUM >= 20131120 || defined(PACKETVER_ZERO)
  5080. #if PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5081. struct PACKET_ZC_UPDATE_GDID {
  5082. int16 PacketType;
  5083. uint32 guildId;
  5084. int emblemVersion;
  5085. uint32 mode;
  5086. uint8 isMaster;
  5087. int32 interSid;
  5088. char guildName[NAME_LENGTH];
  5089. uint32 masterGID;
  5090. } __attribute__((packed));
  5091. DEFINE_PACKET_HEADER(ZC_UPDATE_GDID, 0x02f7)
  5092. #else // PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5093. struct PACKET_ZC_UPDATE_GDID {
  5094. int16 PacketType;
  5095. uint32 guildId;
  5096. int emblemVersion;
  5097. uint32 mode;
  5098. uint8 isMaster;
  5099. int32 interSid;
  5100. char guildName[NAME_LENGTH];
  5101. } __attribute__((packed));
  5102. DEFINE_PACKET_HEADER(ZC_UPDATE_GDID, 0x016c)
  5103. #endif // PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5104. #if PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5105. struct PACKET_CZ_APPROXIMATE_ACTOR {
  5106. int16 PacketType;
  5107. uint32 masterGID;
  5108. uint16 unused1;
  5109. uint8 unused2;
  5110. } __attribute__((packed));
  5111. DEFINE_PACKET_HEADER(CZ_APPROXIMATE_ACTOR, 0x0bb0)
  5112. #endif // PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20221024
  5113. struct PACKET_CZ_CONTACTNPC {
  5114. int16 PacketType;
  5115. uint32 AID;
  5116. uint8 type;
  5117. } __attribute__((packed));
  5118. DEFINE_PACKET_HEADER(CZ_CONTACTNPC, 0x0090)
  5119. struct PACKET_ZC_ATTACK_FAILURE_FOR_DISTANCE {
  5120. int16 PacketType;
  5121. uint32 targetAID;
  5122. int16 targetXPos;
  5123. int16 targetYPos;
  5124. int16 xPos;
  5125. int16 yPos;
  5126. int16 currentAttRange;
  5127. } __attribute__((packed));
  5128. DEFINE_PACKET_HEADER(ZC_ATTACK_FAILURE_FOR_DISTANCE, 0x0139)
  5129. struct PACKET_ZC_START_CAPTURE {
  5130. int16 PacketType;
  5131. } __attribute__((packed));
  5132. DEFINE_PACKET_HEADER(ZC_START_CAPTURE, 0x019e)
  5133. struct PACKET_ZC_TRYCAPTURE_MONSTER {
  5134. int16 PacketType;
  5135. int8 result;
  5136. } __attribute__((packed));
  5137. DEFINE_PACKET_HEADER(ZC_TRYCAPTURE_MONSTER, 0x01a0)
  5138. struct PACKET_ZC_PROPERTY_PET {
  5139. int16 PacketType;
  5140. char szName[NAME_LENGTH];
  5141. int8 bModified;
  5142. int16 nLevel;
  5143. int16 nFullness;
  5144. int16 nRelationship;
  5145. int16 ITID;
  5146. #if PACKETVER >= 20081126
  5147. int16 job;
  5148. #endif
  5149. } __attribute__((packed));
  5150. DEFINE_PACKET_HEADER(ZC_PROPERTY_PET, 0x01a2)
  5151. struct PACKET_ZC_CHANGESTATE_PET {
  5152. int16 PacketType;
  5153. int8 type;
  5154. int GID;
  5155. int data;
  5156. } __attribute__((packed));
  5157. DEFINE_PACKET_HEADER(ZC_CHANGESTATE_PET, 0x01a4)
  5158. struct PACKET_ZC_SPIRITS {
  5159. int16 PacketType;
  5160. uint32 AID;
  5161. int16 num;
  5162. } __attribute__((packed));
  5163. DEFINE_PACKET_HEADER(ZC_SPIRITS, 0x01d0)
  5164. struct PACKET_ZC_SPIRITS2 {
  5165. int16 PacketType;
  5166. uint32 AID;
  5167. int16 num;
  5168. } __attribute__((packed));
  5169. DEFINE_PACKET_HEADER(ZC_SPIRITS2, 0x01e1)
  5170. #if PACKETVER_MAIN_NUM >= 20200414 || PACKETVER_RE_NUM >= 20200723 || PACKETVER_ZERO_NUM >= 20200506
  5171. struct PACKET_ZC_SOULENERGY {
  5172. int16 PacketType;
  5173. uint32 AID;
  5174. uint16 num;
  5175. } __attribute__((packed));
  5176. DEFINE_PACKET_HEADER(ZC_SOULENERGY, 0x0b73)
  5177. #endif
  5178. struct PACKET_ZC_SAY_DIALOG {
  5179. int16 PacketType;
  5180. int16 PacketLength;
  5181. uint32 NpcID;
  5182. char message[];
  5183. } __attribute__((packed));
  5184. DEFINE_PACKET_HEADER(ZC_SAY_DIALOG, 0x00b4)
  5185. #if PACKETVER_MAIN_NUM >= 20220504
  5186. struct PACKET_ZC_SAY_DIALOG2 {
  5187. int16 PacketType;
  5188. int16 PacketLength;
  5189. uint32 NpcID;
  5190. uint8 type;
  5191. char message[];
  5192. } __attribute__((packed));
  5193. DEFINE_PACKET_HEADER(ZC_SAY_DIALOG2, 0x0972)
  5194. #else // PACKETVER_MAIN_NUM >= 20220504
  5195. struct PACKET_ZC_SAY_DIALOG2 {
  5196. int16 PacketType;
  5197. int16 PacketLength;
  5198. uint32 NpcID;
  5199. char message[];
  5200. } __attribute__((packed));
  5201. DEFINE_PACKET_HEADER(ZC_SAY_DIALOG2, 0x00b4)
  5202. #endif // PACKETVER_MAIN_NUM >= 20220504
  5203. struct PACKET_ZC_WAIT_DIALOG {
  5204. int16 PacketType;
  5205. uint32 NpcID;
  5206. } __attribute__((packed));
  5207. DEFINE_PACKET_HEADER(ZC_WAIT_DIALOG, 0x00b5)
  5208. #if PACKETVER_MAIN_NUM >= 20220504
  5209. struct PACKET_ZC_WAIT_DIALOG2 {
  5210. int16 PacketType;
  5211. uint32 NpcID;
  5212. uint8 type;
  5213. } __attribute__((packed));
  5214. DEFINE_PACKET_HEADER(ZC_WAIT_DIALOG2, 0x0973)
  5215. #else // PACKETVER_MAIN_NUM >= 20220504
  5216. struct PACKET_ZC_WAIT_DIALOG2 {
  5217. int16 PacketType;
  5218. uint32 NpcID;
  5219. } __attribute__((packed));
  5220. DEFINE_PACKET_HEADER(ZC_WAIT_DIALOG2, 0x00b5)
  5221. #endif // PACKETVER_MAIN_NUM >= 20220504
  5222. #if PACKETVER_MAIN_NUM >= 20220504
  5223. struct PACKET_ZC_DIALOG_WINDOW_SIZE {
  5224. int16 PacketType;
  5225. int height;
  5226. int width;
  5227. } __attribute__((packed));
  5228. DEFINE_PACKET_HEADER(ZC_DIALOG_WINDOW_SIZE, 0x0ba2)
  5229. #endif // PACKETVER_MAIN_NUM >= 20220504
  5230. #if PACKETVER_MAIN_NUM >= 20220504
  5231. struct PACKET_ZC_DIALOG_WINDOW_POS {
  5232. int16 PacketType;
  5233. int x;
  5234. int y;
  5235. } __attribute__((packed));
  5236. DEFINE_PACKET_HEADER(ZC_DIALOG_WINDOW_POS, 0x0ba3)
  5237. #endif // PACKETVER_MAIN_NUM >= 20220504
  5238. #if PACKETVER_MAIN_NUM >= 20220504
  5239. struct PACKET_ZC_DIALOG_WINDOW_POS2 {
  5240. int16 PacketType;
  5241. int x;
  5242. int y;
  5243. } __attribute__((packed));
  5244. DEFINE_PACKET_HEADER(ZC_DIALOG_WINDOW_POS2, 0x0bb5)
  5245. #endif // PACKETVER_MAIN_NUM >= 20220504
  5246. #if PACKETVER_MAIN_NUM >= 20220504
  5247. struct PACKET_ZC_PLAY_NPC_BGM {
  5248. int16 PacketType;
  5249. int16 PacketLength;
  5250. uint8 playType;
  5251. char bgm[];
  5252. } __attribute__((packed));
  5253. DEFINE_PACKET_HEADER(ZC_PLAY_NPC_BGM, 0x0b8c)
  5254. #elif PACKETVER >= 20091201
  5255. struct PACKET_ZC_PLAY_NPC_BGM {
  5256. int16 PacketType;
  5257. char bgm[NAME_LENGTH];
  5258. } __attribute__((packed));
  5259. DEFINE_PACKET_HEADER(ZC_PLAY_NPC_BGM, 0x07fe)
  5260. #endif // PACKETVER >= 20091201
  5261. struct PACKET_CZ_MOVE_ITEM_FROM_BODY_TO_CART {
  5262. int16 PacketType;
  5263. int16 index;
  5264. int count;
  5265. } __attribute__((packed));
  5266. DEFINE_PACKET_HEADER(CZ_MOVE_ITEM_FROM_BODY_TO_CART, 0x0126)
  5267. struct PACKET_ZC_SOUND {
  5268. int16 PacketType;
  5269. char name[NAME_LENGTH];
  5270. uint8 act;
  5271. uint32 term;
  5272. uint32 AID;
  5273. } __attribute__((packed));
  5274. DEFINE_PACKET_HEADER(ZC_SOUND, 0x01d3)
  5275. #if PACKETVER >= 20100420
  5276. struct PACKET_ZC_BUYING_STORE_ENTRY {
  5277. int16 packetType;
  5278. uint32 makerAID;
  5279. char storeName[MESSAGE_SIZE];
  5280. } __attribute__((packed));
  5281. DEFINE_PACKET_HEADER(ZC_BUYING_STORE_ENTRY, 0x0814);
  5282. #endif
  5283. struct PACKET_ZC_STORE_ENTRY {
  5284. int16 packetType;
  5285. uint32 makerAID;
  5286. char storeName[MESSAGE_SIZE];
  5287. } __attribute__((packed));
  5288. DEFINE_PACKET_HEADER(ZC_STORE_ENTRY, 0x0131);
  5289. struct CZ_PURCHASE_ITEM_FROMMC {
  5290. int16 count;
  5291. int16 index;
  5292. } __attribute__((packed));
  5293. struct PACKET_CZ_PC_PURCHASE_ITEMLIST_FROMMC {
  5294. int16 packetType;
  5295. int16 packetLength;
  5296. uint32 AID;
  5297. struct CZ_PURCHASE_ITEM_FROMMC list[];
  5298. } __attribute__((packed));
  5299. DEFINE_PACKET_HEADER(CZ_PC_PURCHASE_ITEMLIST_FROMMC, 0x0134);
  5300. struct PACKET_CZ_PC_PURCHASE_ITEMLIST_FROMMC2 {
  5301. int16 packetType;
  5302. int16 packetLength;
  5303. uint32 AID;
  5304. uint32 UniqueID;
  5305. struct CZ_PURCHASE_ITEM_FROMMC list[];
  5306. } __attribute__((packed));
  5307. DEFINE_PACKET_HEADER(CZ_PC_PURCHASE_ITEMLIST_FROMMC2, 0x0801);
  5308. #if PACKETVER >= 20100309
  5309. struct PACKET_ZC_DISAPPEAR_BUYING_STORE_ENTRY {
  5310. int16 packetType;
  5311. uint32 makerAID;
  5312. } __attribute__((packed));
  5313. DEFINE_PACKET_HEADER(ZC_DISAPPEAR_BUYING_STORE_ENTRY, 0x0816);
  5314. #endif
  5315. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5316. struct PACKET_ZC_OPEN_REFORM_UI {
  5317. int16 PacketType;
  5318. int32 ITID;
  5319. } __attribute__((packed));
  5320. DEFINE_PACKET_HEADER(ZC_OPEN_REFORM_UI, 0x0b8f);
  5321. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5322. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5323. struct PACKET_CZ_CLOSE_REFORM_UI {
  5324. int16 PacketType;
  5325. } __attribute__((packed));
  5326. DEFINE_PACKET_HEADER(CZ_CLOSE_REFORM_UI, 0x0b90);
  5327. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5328. #if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5329. struct PACKET_CZ_ITEM_REFORM {
  5330. int16 PacketType;
  5331. int32 ITID;
  5332. int16 index;
  5333. } __attribute__((packed));
  5334. DEFINE_PACKET_HEADER(CZ_ITEM_REFORM, 0x0b91);
  5335. #endif // PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5336. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5337. struct PACKET_ZC_ITEM_REFORM_ACK {
  5338. int16 PacketType;
  5339. int16 index;
  5340. int8 result;
  5341. } __attribute__((packed));
  5342. DEFINE_PACKET_HEADER(ZC_ITEM_REFORM_ACK, 0x0b92);
  5343. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5344. #if PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20220316
  5345. struct PACKET_CZ_USE_PACKAGEITEM {
  5346. int16 PacketType;
  5347. uint16 index;
  5348. uint32 AID;
  5349. uint32 itemID;
  5350. uint32 BoxIndex;
  5351. } __attribute__((packed));
  5352. DEFINE_PACKET_HEADER(CZ_USE_PACKAGEITEM, 0x0baf)
  5353. #endif // PACKETVER_MAIN_NUM >= 20220216 || PACKETVER_ZERO_NUM >= 20220316
  5354. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5355. struct PACKET_CZ_REQUEST_RANDOM_ENCHANT {
  5356. int16 PacketType;
  5357. int64 enchant_group;
  5358. int16 index;
  5359. } __attribute__((packed));
  5360. DEFINE_PACKET_HEADER(CZ_REQUEST_RANDOM_ENCHANT, 0x0b9b);
  5361. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5362. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5363. struct PACKET_CZ_REQUEST_PERFECT_ENCHANT {
  5364. int16 PacketType;
  5365. int64 enchant_group;
  5366. int16 index;
  5367. uint32 ITID;
  5368. } __attribute__((packed));
  5369. DEFINE_PACKET_HEADER(CZ_REQUEST_PERFECT_ENCHANT, 0x0b9c);
  5370. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5371. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5372. struct PACKET_CZ_REQUEST_UPGRADE_ENCHANT {
  5373. int16 PacketType;
  5374. int64 enchant_group;
  5375. int16 index;
  5376. int16 slot;
  5377. } __attribute__((packed));
  5378. DEFINE_PACKET_HEADER(CZ_REQUEST_UPGRADE_ENCHANT, 0x0b9d);
  5379. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5380. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5381. struct PACKET_CZ_REQUEST_RESET_ENCHANT {
  5382. int16 PacketType;
  5383. int64 enchant_group;
  5384. int16 index;
  5385. } __attribute__((packed));
  5386. DEFINE_PACKET_HEADER(CZ_REQUEST_RESET_ENCHANT, 0x0b9e);
  5387. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5388. #if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5389. struct PACKET_ZC_RESPONSE_ENCHANT {
  5390. int16 PacketType;
  5391. int32 msgId;
  5392. uint32 ITID;
  5393. } __attribute__((packed));
  5394. DEFINE_PACKET_HEADER(ZC_RESPONSE_ENCHANT, 0x0b9f);
  5395. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5396. #if PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5397. struct PACKET_CZ_CLOSE_UI_ENCHANT {
  5398. int16 PacketType;
  5399. } __attribute__((packed));
  5400. DEFINE_PACKET_HEADER(CZ_CLOSE_UI_ENCHANT, 0x0ba0);
  5401. #endif // PACKETVER_MAIN_NUM >= 20201118 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20221024
  5402. #if PACKETVER_MAIN_NUM >= 20221005
  5403. struct PACKET_ZC_SPECIALPOPUP {
  5404. int16 PacketType;
  5405. int32 ppId;
  5406. } __attribute__((packed));
  5407. DEFINE_PACKET_HEADER(ZC_SPECIALPOPUP, 0x0bbe);
  5408. #endif // PACKETVER_MAIN_NUM >= 20221005
  5409. #if PACKETVER >= 20140611
  5410. struct PACKET_ZC_GOLDPCCAFE_POINT {
  5411. // Note: 2014-04-30 has 1 byte less, but those packets are only functional after 2014-06-11Ragexe
  5412. uint16 PacketType;
  5413. int8 isActive; //< 1 = yes, 0 = no
  5414. int8 mode;
  5415. int32 point;
  5416. int32 playedTime;
  5417. } __attribute__((packed));
  5418. DEFINE_PACKET_HEADER(ZC_GOLDPCCAFE_POINT , 0x0a15);
  5419. #endif // PACKETVER >= 20140611
  5420. #if PACKETVER >= 20140430
  5421. struct PACKET_CZ_DYNAMICNPC_CREATE_REQUEST {
  5422. uint16 PacketType;
  5423. char name[NAME_LENGTH];
  5424. } __attribute__((packed));
  5425. DEFINE_PACKET_HEADER(CZ_DYNAMICNPC_CREATE_REQUEST, 0x0a16);
  5426. #endif // PACKETVER >= 20140430
  5427. #if PACKETVER_MAIN_NUM >= 20140430 || PACKETVER_RE_NUM >= 20140430 || defined(PACKETVER_ZERO)
  5428. struct PACKET_ZC_DYNAMICNPC_CREATE_RESULT {
  5429. uint16 PacketType;
  5430. uint32 result; // enum dynamicnpc_create_result
  5431. } __attribute__((packed));
  5432. DEFINE_PACKET_HEADER(ZC_DYNAMICNPC_CREATE_RESULT , 0x0a17);
  5433. #endif // PACKETVER_MAIN_NUM >= 20140430 || PACKETVER_RE_NUM >= 20140430 || defined(PACKETVER_ZERO)
  5434. struct PACKET_CZ_REQ_GUILD_EMBLEM_IMG1 {
  5435. int16 packetType;
  5436. int32 guild_id;
  5437. } __attribute__((packed));
  5438. DEFINE_PACKET_HEADER(CZ_REQ_GUILD_EMBLEM_IMG1, 0x0151);
  5439. #if PACKETVER >= 20190724
  5440. struct PACKET_CZ_REQ_GUILD_EMBLEM_IMG3 {
  5441. int16 packetType;
  5442. int32 guild_id;
  5443. int32 emblem_id;
  5444. } __attribute__((packed));
  5445. DEFINE_PACKET_HEADER(CZ_REQ_GUILD_EMBLEM_IMG3, 0x0b46);
  5446. #endif // PACKETVER >= 20190724
  5447. #if PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626
  5448. struct PACKET_CZ_REQ_GUILD_EMBLEM_IMG2 {
  5449. int16 packetType;
  5450. int32 guild_id;
  5451. int32 emblem_id;
  5452. int32 unused;
  5453. } __attribute__((packed));
  5454. DEFINE_PACKET_HEADER(CZ_REQ_GUILD_EMBLEM_IMG2, 0x0b1e);
  5455. #elif PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190227 || PACKETVER_ZERO_NUM >= 20190313
  5456. struct PACKET_CZ_REQ_GUILD_EMBLEM_IMG2 {
  5457. int16 packetType;
  5458. int32 guild_id;
  5459. int32 emblem_id;
  5460. } __attribute__((packed));
  5461. DEFINE_PACKET_HEADER(CZ_REQ_GUILD_EMBLEM_IMG2, 0x0b1e);
  5462. #endif // PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626
  5463. #if PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190731 || PACKETVER_ZERO_NUM >= 20190814
  5464. struct PACKET_ZC_CHANGE_GUILD {
  5465. int16 packetType;
  5466. int32 guild_id;
  5467. uint32 emblem_id;
  5468. uint32 AID;
  5469. } __attribute__((packed));
  5470. DEFINE_PACKET_HEADER(ZC_CHANGE_GUILD, 0x0b47);
  5471. // 20190619 main exists in first versions, then removed
  5472. // 20190605 re first versions with other packet size
  5473. #elif PACKETVER_MAIN_NUM >= 20190703 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190709
  5474. struct PACKET_ZC_CHANGE_GUILD {
  5475. int16 packetType;
  5476. int32 guild_id;
  5477. uint32 emblem_id;
  5478. uint32 AID;
  5479. } __attribute__((packed));
  5480. DEFINE_PACKET_HEADER(ZC_CHANGE_GUILD, 0x0b1f);
  5481. #else // PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190731 || PACKETVER_ZERO_NUM >= 20190814
  5482. struct PACKET_ZC_CHANGE_GUILD {
  5483. int16 packetType;
  5484. uint32 AID;
  5485. int32 guild_id;
  5486. uint16 emblem_id;
  5487. } __attribute__((packed));
  5488. DEFINE_PACKET_HEADER(ZC_CHANGE_GUILD, 0x01b4);
  5489. #endif // PACKETVER_MAIN_NUM >= 20190807 || PACKETVER_RE_NUM >= 20190731 || PACKETVER_ZERO_NUM >= 20190814
  5490. #if PACKETVER_MAIN_NUM >= 20190821 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190710
  5491. enum ZC_GUILD_EMBLEM_TYPE {
  5492. ZC_GUILD_EMBLEM_TYPE_CLEAR = 0,
  5493. ZC_GUILD_EMBLEM_TYPE_ADD = 1,
  5494. ZC_GUILD_EMBLEM_TYPE_COMPLETE = 2,
  5495. };
  5496. struct PACKET_ZC_GUILD_EMBLEM_IMG {
  5497. int16 packetType;
  5498. int16 packetLength;
  5499. uint16 result;
  5500. int32 guild_id;
  5501. uint32 emblem_id;
  5502. char emblem_data[];
  5503. } __attribute__((packed));
  5504. DEFINE_PACKET_HEADER(ZC_GUILD_EMBLEM_IMG, 0x0b36);
  5505. #else // PACKETVER_MAIN_NUM >= 20190821 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190710
  5506. struct PACKET_ZC_GUILD_EMBLEM_IMG {
  5507. int16 packetType;
  5508. int16 packetLength;
  5509. int32 guild_id;
  5510. uint32 emblem_id;
  5511. char emblem_data[];
  5512. } __attribute__((packed));
  5513. DEFINE_PACKET_HEADER(ZC_GUILD_EMBLEM_IMG, 0x0152);
  5514. #endif // PACKETVER_MAIN_NUM >= 20190821 || PACKETVER_RE_NUM >= 20190807 || PACKETVER_ZERO_NUM >= 20190710
  5515. #if PACKETVER_MAIN_NUM >= 20171213 || PACKETVER_RE_NUM >= 20171213 || PACKETVER_ZERO_NUM >= 20171214
  5516. struct PACKET_CZ_ADVENTURER_AGENCY_JOIN_REQ {
  5517. int16 packetType;
  5518. int GID;
  5519. int AID;
  5520. } __attribute__((packed));
  5521. DEFINE_PACKET_HEADER(CZ_ADVENTURER_AGENCY_JOIN_REQ, 0x0ae6);
  5522. #endif // PACKETVER_MAIN_NUM >= 20171213 || PACKETVER_RE_NUM >= 20171213 || PACKETVER_ZERO_NUM >= 20171214
  5523. #if PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5524. struct PACKET_ZC_ADVENTURER_AGENCY_JOIN_RESULT {
  5525. int16 packetType;
  5526. char player_name[NAME_LENGTH];
  5527. char party_name[NAME_LENGTH];
  5528. int AID;
  5529. int result;
  5530. } __attribute__((packed));
  5531. DEFINE_PACKET_HEADER(ZC_ADVENTURER_AGENCY_JOIN_RESULT, 0x0afa);
  5532. #endif // PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5533. #if PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5534. struct PACKET_ZC_ADVENTURER_AGENCY_JOIN_REQ {
  5535. int16 packetType;
  5536. int GRID;
  5537. int AID;
  5538. char groupName[NAME_LENGTH];
  5539. int16 level;
  5540. int16 job;
  5541. } __attribute__((packed));
  5542. DEFINE_PACKET_HEADER(ZC_ADVENTURER_AGENCY_JOIN_REQ, 0x0ae7);
  5543. #endif // PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5544. #if PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5545. struct PACKET_CZ_ADVENTURER_AGENCY_JOIN_RESULT {
  5546. int16 packetType;
  5547. int GRID;
  5548. int AID;
  5549. int8 result;
  5550. } __attribute__((packed));
  5551. DEFINE_PACKET_HEADER(CZ_ADVENTURER_AGENCY_JOIN_RESULT, 0x0af8);
  5552. #endif // PACKETVER_MAIN_NUM >= 20191218 || PACKETVER_RE_NUM >= 20191211 || PACKETVER_ZERO_NUM >= 20191224
  5553. #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
  5554. #pragma pack(pop)
  5555. #endif // not NetBSD < 6 / Solaris
  5556. #endif /* MAP_PACKETS_STRUCT_HPP */