packets_struct.hpp 158 KB

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