game.ts 302 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045
  1. // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-ts_proto v1.180.0
  4. // protoc v5.26.0
  5. // source: game.proto
  6. /* eslint-disable */
  7. import {
  8. activityConfInfo,
  9. activityTimeInfo,
  10. altarInfo,
  11. building,
  12. card,
  13. dailyDungeonsInfo,
  14. drawAwardInfo,
  15. drawInfo,
  16. embattleInfo,
  17. equip,
  18. groceryInfo,
  19. hero,
  20. idNum,
  21. mail,
  22. manual,
  23. popGiftInfo,
  24. privilegeCardInfo,
  25. quest,
  26. rankingInfo,
  27. redPointInfo,
  28. reward,
  29. shopInfo,
  30. sidPos,
  31. talentInfo,
  32. timeBox,
  33. } from "./typedef";
  34. export const protobufPackage = "game";
  35. /** 心跳 */
  36. export interface ping {
  37. }
  38. /** 心跳响应 */
  39. export interface pingRsp {
  40. /** 时间 */
  41. time: number;
  42. }
  43. /** 登录请求 */
  44. export interface login {
  45. /** 服务器id */
  46. sid: number;
  47. /** 玩家账号(渠道分配) */
  48. account: string;
  49. /** 玩家渠道( 目前填"xiaohei") */
  50. channel: string;
  51. /** sdk参数token */
  52. token: string;
  53. /** sdk参数 */
  54. extension: string;
  55. }
  56. /** 登录相应 */
  57. export interface loginRsp {
  58. /** 错误码 */
  59. errno: number;
  60. }
  61. /** 创角请求 */
  62. export interface create {
  63. /** 玩家姓名 */
  64. nickname: string;
  65. }
  66. /** 创角响应 */
  67. export interface createRsp {
  68. /** 错误码 */
  69. errno: number;
  70. }
  71. /** 玩家信息 */
  72. export interface user {
  73. /** 玩家唯一id */
  74. uid: string;
  75. /** 玩家名字 */
  76. nickname: string;
  77. /** 等级 */
  78. level: number;
  79. /** 经验 */
  80. exp: number;
  81. /** 头像 */
  82. avatar: number;
  83. /** 服务器当前时间 */
  84. svrtime: number;
  85. /** 重置姓名的时间 */
  86. renameTime: number;
  87. /** 创角时间 */
  88. createtime: number;
  89. /** 区服id */
  90. sid: number;
  91. /** 是否首次登录 */
  92. bfirst: boolean;
  93. /** 货币数组 */
  94. currency: idNum[];
  95. }
  96. /** 获得奖励消息 */
  97. export interface rewardInfo {
  98. /** 特殊标记 */
  99. flags: string;
  100. /** 得到的奖励 */
  101. added: reward | undefined;
  102. }
  103. /** 城镇变化 */
  104. export interface cityChange {
  105. /** 变化的数据 */
  106. currency:
  107. | idNum
  108. | undefined;
  109. /** 下次改变时间 */
  110. time: number;
  111. }
  112. /** 货币支付消息 */
  113. export interface payCurrency {
  114. /** 当前的货币数量(支付后的) */
  115. now: idNum[];
  116. /** 支付的货币数量 */
  117. pay: idNum[];
  118. }
  119. /** 碎片支付消息 */
  120. export interface payDebrisNty {
  121. /** 碎片支付 */
  122. list: idNum[];
  123. }
  124. /** 异常抛出 */
  125. export interface exceptionNty {
  126. /** 错误码 */
  127. errno: number;
  128. }
  129. /** 创建订单 */
  130. export interface createOrderNty {
  131. /** 订单id */
  132. id: string;
  133. /** 计费点id */
  134. cfid: number;
  135. /** 订单签名 */
  136. sign: string;
  137. /** 时间 */
  138. time: number;
  139. }
  140. /** 主城数据请求 */
  141. export interface cityData {
  142. }
  143. /** 主城数据响应 */
  144. export interface cityDataRsp {
  145. /** 错误码 */
  146. errno: number;
  147. /** 累计时间 */
  148. time: number;
  149. /** 建筑数据 */
  150. list: building[];
  151. /** 主城技能列表 */
  152. skillList: number[];
  153. /** 主城技能id */
  154. skillid: number;
  155. }
  156. /** 主城数据推送 */
  157. export interface cityDataSend {
  158. /** 累计时间 */
  159. time: number;
  160. /** 建筑数据 */
  161. list: building[];
  162. }
  163. /** 建筑升级请求 */
  164. export interface buildingUpgrade {
  165. /** 主城id */
  166. id: number;
  167. }
  168. /** 建筑升级响应 */
  169. export interface buildingUpgradeRsp {
  170. /** 错误码 */
  171. errno: number;
  172. /** 建筑数据 */
  173. data: building | undefined;
  174. }
  175. /** 建筑一键收获 */
  176. export interface buildingOneKey {
  177. }
  178. /** 建筑一键收获 */
  179. export interface buildingOneKeyRsp {
  180. /** 错误码 */
  181. errno: number;
  182. /** 建筑数据 */
  183. list: building[];
  184. }
  185. /** 闯关数据 */
  186. export interface adventureData {
  187. }
  188. /** 闯关数据 */
  189. export interface adventureDataRsp {
  190. /** 错误码 */
  191. errno: number;
  192. /** 简单关卡 */
  193. id1: number;
  194. /** 通关奖励 */
  195. award1: number[];
  196. /** 困难关卡 */
  197. id2: number;
  198. /** 通关奖励 */
  199. award2: number[];
  200. /** 当前冒险关卡类型 */
  201. type: number;
  202. /** 当前波次信息 */
  203. layer: number;
  204. /** 当前费用 */
  205. cost: number;
  206. }
  207. /** 闯关开始 */
  208. export interface adventureStart {
  209. /** 闯关请求 */
  210. id: number;
  211. /** 冒险关卡类型 */
  212. type: number;
  213. }
  214. /** 闯关开始 */
  215. export interface adventureStartRsp {
  216. /** 错误码 */
  217. errno: number;
  218. /** 是否开启试玩 */
  219. btrial: boolean;
  220. /** 试玩id */
  221. trialId: number;
  222. /** 试玩次数 */
  223. trialNum: number;
  224. }
  225. /** 闯关结束 */
  226. export interface adventureEnd {
  227. /** 是否胜利 */
  228. win: boolean;
  229. /** 杀怪数量 */
  230. monsterNum: number;
  231. /** 杀boss数量 */
  232. bossNum: number;
  233. /** 杀精英数量 */
  234. eliteNum: number;
  235. }
  236. /** 闯关结束 */
  237. export interface adventureEndRsp {
  238. /** 错误码 */
  239. errno: number;
  240. }
  241. /** 开始波次 */
  242. export interface adventureLayer {
  243. /** 波次 */
  244. layer: number;
  245. /** 费用 */
  246. cost: number;
  247. /** 杀怪数量 */
  248. monsterNum: number;
  249. /** 杀boss数量 */
  250. bossNum: number;
  251. /** 杀精英数量 */
  252. eliteNum: number;
  253. }
  254. /** 开始波次 */
  255. export interface adventureLayerRsp {
  256. /** 错误码 */
  257. errno: number;
  258. }
  259. /** 扫荡 */
  260. export interface adventureSweep {
  261. /** 关卡id */
  262. id: number;
  263. /** 冒险关卡类型 */
  264. type: number;
  265. }
  266. /** 扫荡 */
  267. export interface adventureSweepRsp {
  268. /** 错误码 */
  269. errno: number;
  270. }
  271. /** 领取通关奖励 */
  272. export interface adventurePassAward {
  273. /** 关卡id */
  274. id: number;
  275. /** 冒险关卡类型 */
  276. type: number;
  277. }
  278. /** 领取通关奖励 */
  279. export interface adventurePassAwardRsp {
  280. /** 错误码 */
  281. errno: number;
  282. /** 关卡id */
  283. id: number;
  284. /** 冒险关卡类型 */
  285. type: number;
  286. }
  287. /** 冒险广告奖励 */
  288. export interface adventureAdAward {
  289. }
  290. /** 冒险广告奖励 */
  291. export interface adventureAdAwardRsp {
  292. /** 错误码 */
  293. errno: number;
  294. }
  295. /** 冒险试用英雄 */
  296. export interface adventureTrial {
  297. }
  298. /** 冒险试用英雄 */
  299. export interface adventureTrialRsp {
  300. /** 错误码 */
  301. errno: number;
  302. }
  303. /** 获取邮件数据 */
  304. export interface getMail {
  305. }
  306. /** 获取邮件数据 */
  307. export interface getMailRsp {
  308. /** 错误码 */
  309. errno: number;
  310. /** 邮件数据 */
  311. list: mail[];
  312. }
  313. /** 获取邮件奖励 */
  314. export interface getMailGoods {
  315. /** 需要取出的id */
  316. list: string[];
  317. /** 是否一键领取 */
  318. bonekey: boolean;
  319. }
  320. /** 获取邮件奖励 */
  321. export interface getMailGoodsRsp {
  322. /** 错误码 */
  323. errno: number;
  324. /** 取出的id */
  325. list: string[];
  326. }
  327. /** 删除邮件 */
  328. export interface delMail {
  329. /** 需要删除的id */
  330. list: string[];
  331. }
  332. /** 删除邮件 */
  333. export interface delMailRsp {
  334. /** 错误码 */
  335. errno: number;
  336. /** 删除的id */
  337. list: string[];
  338. }
  339. /** 标记为已读 */
  340. export interface flagMail {
  341. /** 需要标记的id */
  342. list: string[];
  343. }
  344. /** 标记为已读 */
  345. export interface flagMailRsp {
  346. /** 错误码 */
  347. errno: number;
  348. }
  349. /** 发送邮件sc */
  350. export interface sendMail {
  351. /** 邮件数据 */
  352. list: mail[];
  353. }
  354. /** 简单的邮件数据 */
  355. export interface simpleMail {
  356. /** 邮件的数量 */
  357. num: number;
  358. /** 未读邮件数量 */
  359. noread: number;
  360. /** 有奖励的邮件(可能已经读过但没领取奖励) */
  361. needread: number;
  362. }
  363. /** 上阵数据 */
  364. export interface embattleGetData {
  365. }
  366. /** 上阵数据 */
  367. export interface embattleGetDataRsp {
  368. /** 错误码 */
  369. errno: number;
  370. /** 角色位置信息 */
  371. list: sidPos[];
  372. /** 卡牌位置信息 */
  373. cardList: sidPos[];
  374. }
  375. /** 角色上阵 */
  376. export interface embattleBattle {
  377. /** ture 是技能 */
  378. skill: boolean;
  379. /** 角色唯一id(为空时,检查下阵逻辑) */
  380. sid: string;
  381. /** 从1开始 */
  382. pos: number;
  383. }
  384. /** 角色上阵 */
  385. export interface embattleBattleRsp {
  386. /** 错误码 */
  387. errno: number;
  388. /** 角色位置信息 */
  389. list: sidPos[];
  390. /** 卡牌位置信息 */
  391. cardList: sidPos[];
  392. }
  393. /** 角色背包数据 */
  394. export interface heroGetData {
  395. }
  396. /** 角色背包数据 */
  397. export interface heroGetDataRsp {
  398. /** 错误码 */
  399. errno: number;
  400. /** 角色数据 */
  401. list: hero[];
  402. }
  403. /** 角色升级 */
  404. export interface heroUpgrade {
  405. /** 角色唯一id */
  406. sid: string;
  407. /** 升几级 */
  408. num: number;
  409. }
  410. /** 角色升级 */
  411. export interface heroUpgradeRsp {
  412. /** 错误码 */
  413. errno: number;
  414. /** 角色数据 */
  415. data: hero | undefined;
  416. }
  417. /** 角色突破 */
  418. export interface heroUpgradeStar {
  419. /** 角色唯一id */
  420. sid: string;
  421. /** 同名卡唯一id */
  422. same: string[];
  423. /** 非同名卡唯一id */
  424. other: string[];
  425. /** 替代品货币 */
  426. currency: idNum | undefined;
  427. }
  428. /** 角色突破 */
  429. export interface heroUpgradeStarRsp {
  430. /** 错误码 */
  431. errno: number;
  432. /** 角色数据 */
  433. data:
  434. | hero
  435. | undefined;
  436. /** 同名卡唯一id */
  437. same: string[];
  438. /** 非同名卡唯一id */
  439. other: string[];
  440. /** 替代品货币 */
  441. currency: idNum | undefined;
  442. }
  443. /** 一键突破 */
  444. export interface heroOnekeyUpgradeStar {
  445. }
  446. /** 一键突破 */
  447. export interface heroOnekeyUpgradeStarRsp {
  448. /** 错误码 */
  449. errno: number;
  450. /** 删除的角色 */
  451. delList: string[];
  452. /** 变化的角色 */
  453. changeList: hero[];
  454. }
  455. /** 角色重置 */
  456. export interface heroReset {
  457. /** 是否重置等级 */
  458. level: boolean;
  459. /** 重置角色唯一id */
  460. sid: string;
  461. }
  462. /** 角色重置 */
  463. export interface heroResetRsp {
  464. /** 错误码 */
  465. errno: number;
  466. /** 角色数据 */
  467. data: hero | undefined;
  468. }
  469. /** 角色穿戴 */
  470. export interface heroWearEquip {
  471. /** 角色sid */
  472. sid: string;
  473. /** 装备信息 */
  474. list: string[];
  475. }
  476. /** 角色穿戴 */
  477. export interface heroWearEquipRsp {
  478. /** 错误码 */
  479. errno: number;
  480. /** 装备信息 */
  481. list: string[];
  482. /** 角色数据 */
  483. data: hero | undefined;
  484. }
  485. /** 角色穿戴 */
  486. export interface heroChangeNty {
  487. /** 英雄信息 */
  488. list: hero[];
  489. }
  490. /** 技能卡牌数据 */
  491. export interface skillCardGetData {
  492. }
  493. /** 技能卡牌数据 */
  494. export interface skillCardGetDataRsp {
  495. /** 错误码 */
  496. errno: number;
  497. /** 技能卡牌数据 */
  498. list: card[];
  499. }
  500. /** 技能卡牌升级 */
  501. export interface skillCardUpgrade {
  502. /** 技能卡牌唯一id */
  503. sid: string;
  504. /** 升几级 */
  505. num: number;
  506. }
  507. /** 技能卡牌升级 */
  508. export interface skillCardUpgradeRsp {
  509. /** 错误码 */
  510. errno: number;
  511. /** 技能卡牌数据 */
  512. data: card | undefined;
  513. }
  514. /** 技能卡牌突破 */
  515. export interface skillCardUpgradeStar {
  516. /** 技能卡牌唯一id */
  517. sid: string;
  518. }
  519. /** 技能卡牌突破 */
  520. export interface skillCardUpgradeStarRsp {
  521. /** 错误码 */
  522. errno: number;
  523. /** 技能卡牌数据 */
  524. data: card | undefined;
  525. }
  526. /** 队伍数据 */
  527. export interface roleGetData {
  528. }
  529. /** 队伍数据 */
  530. export interface roleGetDataRsp {
  531. /** 错误码 */
  532. errno: number;
  533. /** 等级 */
  534. level: number;
  535. /** 经验 */
  536. exp: number;
  537. }
  538. /** 队伍等级提升 */
  539. export interface roleUpgrade {
  540. }
  541. /** 队伍等级提升 */
  542. export interface roleUpgradeRsp {
  543. /** 错误码 */
  544. errno: number;
  545. /** 等级 */
  546. level: number;
  547. /** 经验 */
  548. exp: number;
  549. }
  550. /** 改名 */
  551. export interface roleRename {
  552. /** 名字 */
  553. name: string;
  554. }
  555. /** 改名 */
  556. export interface roleRenameRsp {
  557. /** 错误码 */
  558. errno: number;
  559. /** 名字 */
  560. name: string;
  561. /** 重置姓名的时间 */
  562. time: number;
  563. }
  564. /** 碎片背包数据 */
  565. export interface debrisGetData {
  566. }
  567. /** 碎片背包数据 */
  568. export interface debrisGetDataRsp {
  569. /** 错误码 */
  570. errno: number;
  571. /** 数据 */
  572. list: idNum[];
  573. }
  574. /** 碎片合成 */
  575. export interface debrisMerge {
  576. /** 碎片id */
  577. id: number;
  578. }
  579. /** 碎片合成 */
  580. export interface debrisMergeRsp {
  581. /** 错误码 */
  582. errno: number;
  583. }
  584. /** 装备背包数据 */
  585. export interface equipGetData {
  586. }
  587. /** 装备背包数据 */
  588. export interface equipGetDataRsp {
  589. /** 错误码 */
  590. errno: number;
  591. /** 装备数据 */
  592. list: equip[];
  593. }
  594. /** 装备升级 */
  595. export interface equipUpgrade {
  596. /** 装备唯一id */
  597. sid: string;
  598. /** 升几级 */
  599. num: number;
  600. }
  601. /** 装备升级 */
  602. export interface equipUpgradeRsp {
  603. /** 错误码 */
  604. errno: number;
  605. /** 装备数据 */
  606. data: equip | undefined;
  607. }
  608. /** 装备突破 */
  609. export interface equipUpgradeStar {
  610. /** 装备唯一id */
  611. sid: string;
  612. /** 同名卡唯一id */
  613. same: string[];
  614. /** 非同名卡唯一id */
  615. other: string[];
  616. /** 替代品货币 */
  617. currency: idNum | undefined;
  618. }
  619. /** 装备突破 */
  620. export interface equipUpgradeStarRsp {
  621. /** 错误码 */
  622. errno: number;
  623. /** 装备数据 */
  624. data:
  625. | equip
  626. | undefined;
  627. /** 同名卡唯一id */
  628. same: string[];
  629. /** 非同名卡唯一id */
  630. other: string[];
  631. /** 替代品货币 */
  632. currency: idNum | undefined;
  633. }
  634. /** 一键突破 */
  635. export interface equipOnekeyUpgradeStar {
  636. }
  637. /** 一键突破 */
  638. export interface equipOnekeyUpgradeStarRsp {
  639. /** 错误码 */
  640. errno: number;
  641. /** 删除的装备 */
  642. delList: string[];
  643. /** 变化的装备 */
  644. changeList: equip[];
  645. }
  646. /** 装备重置 */
  647. export interface equipReset {
  648. /** 是否重置等级 */
  649. level: boolean;
  650. /** 重置装备唯一id */
  651. sid: string;
  652. }
  653. /** 装备重置 */
  654. export interface equipResetRsp {
  655. /** 错误码 */
  656. errno: number;
  657. /** 装备数据 */
  658. data: equip | undefined;
  659. }
  660. /** 装备重置 */
  661. export interface equipChangeNty {
  662. /** 英雄信息 */
  663. list: equip[];
  664. }
  665. /** 天赋数据 */
  666. export interface talentGetData {
  667. }
  668. /** 天赋数据 */
  669. export interface talentGetDataRsp {
  670. /** 错误码 */
  671. errno: number;
  672. /** 天赋1 */
  673. id1: number;
  674. /** 天赋2 */
  675. id2: number;
  676. }
  677. /** 天赋激活 */
  678. export interface talentActivate {
  679. /** 激活id */
  680. id: number;
  681. }
  682. /** 天赋激活 */
  683. export interface talentActivateRsp {
  684. /** 错误码 */
  685. errno: number;
  686. /** 激活id */
  687. id: number;
  688. }
  689. /** 签到数据 */
  690. export interface signInGetData {
  691. }
  692. /** 签到数据 */
  693. export interface signInGetDataRsp {
  694. /** 错误码 */
  695. errno: number;
  696. }
  697. /** 签到奖励 */
  698. export interface signInAward {
  699. /** 第几天 */
  700. day: number;
  701. }
  702. /** 签到奖励 */
  703. export interface signInAwardRsp {
  704. /** 错误码 */
  705. errno: number;
  706. /** 第几天 */
  707. day: number;
  708. /** 领奖数据 */
  709. award: number;
  710. }
  711. /** 新一轮签到数据 */
  712. export interface signInNty {
  713. /** 是否开启 */
  714. open: boolean;
  715. /** 第几天 */
  716. day: number;
  717. /** 领奖数据 */
  718. award: number;
  719. /** 当前轮次 */
  720. round: number;
  721. }
  722. /** 任务数据 */
  723. export interface questGetData {
  724. }
  725. /** 任务数据 */
  726. export interface questGetDataRsp {
  727. /** 错误码 */
  728. errno: number;
  729. /** 日常刷新时等级 */
  730. dlv: number;
  731. /** 周常刷新时等级 */
  732. wlv: number;
  733. /** 日常活跃领取 */
  734. daward: number;
  735. /** 周常活跃领取 */
  736. waward: number;
  737. /** 日常任务 */
  738. daily: quest[];
  739. /** 周常任务 */
  740. weekly: quest[];
  741. /** 成就任务 */
  742. achievement: quest[];
  743. /** 主线任务 */
  744. mainQuest: quest | undefined;
  745. }
  746. /** 领取任务奖励 */
  747. export interface questGetAward {
  748. /** 任务id */
  749. id: number;
  750. }
  751. /** 领取任务奖励 */
  752. export interface questGetAwardRsp {
  753. /** 错误码 */
  754. errno: number;
  755. /** 任务id */
  756. id: number;
  757. /** 任务数据变化(成就任务这里会变为下个成就任务) */
  758. data: quest | undefined;
  759. }
  760. /** 领取活跃奖励 */
  761. export interface questActiveAward {
  762. /** 1日常任务 2周常任务 */
  763. type: number;
  764. }
  765. /** 领取活跃奖励 */
  766. export interface questActiveAwardRsp {
  767. /** 错误码 */
  768. errno: number;
  769. /** 1日常任务 2周常任务 */
  770. type: number;
  771. /** 已领取的活跃奖励 */
  772. award: number;
  773. }
  774. /** 任务 */
  775. export interface questCmplateNotify {
  776. /** 任务数据变化(成就任务这里会变为下个成就任务) */
  777. data: quest | undefined;
  778. }
  779. /** 战令数据 */
  780. export interface manualGetData {
  781. /** 模块id */
  782. moduleid: number;
  783. }
  784. /** 战令数据 */
  785. export interface manualGetDataRsp {
  786. /** 错误码 */
  787. errno: number;
  788. /** 是否开启 */
  789. open: boolean;
  790. /** 开启时间 */
  791. openTime: number;
  792. /** 等级 */
  793. level: number;
  794. /** 经验 */
  795. exp: number;
  796. /** 轮次 */
  797. round: number;
  798. /** 战令数据 */
  799. list: manual[];
  800. /** 模块id */
  801. moduleid: number;
  802. }
  803. /** 战令购买经验 */
  804. export interface manualBuyExp {
  805. /** 模块id */
  806. moduleid: number;
  807. }
  808. /** 战令购买经验 */
  809. export interface manualBuyExpRsp {
  810. /** 错误码 */
  811. errno: number;
  812. /** 等级 */
  813. level: number;
  814. /** 经验 */
  815. exp: number;
  816. /** 模块id */
  817. moduleid: number;
  818. }
  819. /** 战令领取奖励 */
  820. export interface manualGetAward {
  821. /** 模块id */
  822. moduleid: number;
  823. }
  824. /** 战令领取奖励 */
  825. export interface manualGetAwardRsp {
  826. /** 错误码 */
  827. errno: number;
  828. /** 已领取的奖励 */
  829. award: number;
  830. /** 模块id */
  831. moduleid: number;
  832. }
  833. /** 战令通知 */
  834. export interface manualNotify {
  835. /** 是否开启 */
  836. open: boolean;
  837. /** 开启时间 */
  838. openTime: number;
  839. /** 等级 */
  840. level: number;
  841. /** 经验 */
  842. exp: number;
  843. /** 轮次 */
  844. round: number;
  845. /** 战令数据 */
  846. list: manual[];
  847. /** 模块id */
  848. moduleid: number;
  849. }
  850. /** 购买战令 */
  851. export interface manualBuy {
  852. /** 礼包id */
  853. giftid: number;
  854. /** 模块id */
  855. moduleid: number;
  856. }
  857. /** 购买战令 */
  858. export interface manualBuyRsp {
  859. /** 错误码 */
  860. errno: number;
  861. /** 模块id */
  862. moduleid: number;
  863. }
  864. /** 抽奖 */
  865. export interface draw {
  866. /** 抽奖类型 1高级英雄 2普通英雄 3装备 */
  867. drawType: number;
  868. /** 抽奖付费方式 1免费 2召唤卷 3其它货币 */
  869. payType: number;
  870. /** 数量 */
  871. num: number;
  872. }
  873. /** 抽奖 */
  874. export interface drawRsp {
  875. /** 错误码 */
  876. errno: number;
  877. /** 抽奖类型 */
  878. drawType: number;
  879. /** 每天抽奖次数 */
  880. daily: number;
  881. /** 已免费次数 */
  882. free: number;
  883. /** 剩余多少次出特殊奖励列表 */
  884. list: number[];
  885. /** 抽奖数据 */
  886. awardList: drawAwardInfo[];
  887. }
  888. /** 抽奖数据 */
  889. export interface drawGetData {
  890. }
  891. /** 抽奖数据 */
  892. export interface drawGetDataRsp {
  893. /** 错误码 */
  894. errno: number;
  895. /** 高级英雄抽奖数据 */
  896. hero:
  897. | drawInfo
  898. | undefined;
  899. /** 普通英雄抽奖数据 */
  900. hero2:
  901. | drawInfo
  902. | undefined;
  903. /** 装备锻造数据 */
  904. equip: drawInfo | undefined;
  905. }
  906. /** 商店数据 */
  907. export interface shopData {
  908. }
  909. /** 商店数据 */
  910. export interface shopDataRsp {
  911. /** 错误码 */
  912. errno: number;
  913. /** 商店数据 */
  914. list: shopInfo[];
  915. }
  916. /** 商店购买 */
  917. export interface shopBuy {
  918. /** 商店类型 */
  919. type: number;
  920. /** 商品id */
  921. id: number;
  922. /** 商品数量 */
  923. num: number;
  924. }
  925. /** 商店购买 */
  926. export interface shopBuyRsp {
  927. /** 错误码 */
  928. errno: number;
  929. }
  930. /** 商店购买 */
  931. export interface shopNotify {
  932. /** 商店类型 */
  933. type: number;
  934. /** 商品id */
  935. id: number;
  936. /** 已购买数量 */
  937. num: number;
  938. }
  939. /** 排行榜数据 */
  940. export interface rankingData {
  941. /** 排行类型 1冒险排行 2战力排行 */
  942. type: number;
  943. }
  944. /** 排行榜数据 */
  945. export interface rankingDataRsp {
  946. /** 错误码 */
  947. errno: number;
  948. /** 排行类型 1冒险排行 2战力排行 */
  949. type: number;
  950. /** 排行数据 */
  951. list: rankingInfo[];
  952. /** 自己的数据(没有就是未上榜) */
  953. myslef: rankingInfo | undefined;
  954. }
  955. /** 杂货店数据 */
  956. export interface groceryData {
  957. /** 1体力购买 2金币购买 */
  958. type: number;
  959. }
  960. /** 杂货店数据 */
  961. export interface groceryDataRsp {
  962. /** 错误码 */
  963. errno: number;
  964. /** 杂货店数据 */
  965. data: groceryInfo | undefined;
  966. }
  967. /** 杂货店购买 */
  968. export interface groceryBuy {
  969. /** 1体力购买 2金币购买 */
  970. type: number;
  971. /** 免费还是付费 */
  972. free: boolean;
  973. }
  974. /** 杂货店购买 */
  975. export interface groceryBuyRsp {
  976. /** 错误码 */
  977. errno: number;
  978. /** 杂货店数据 */
  979. data: groceryInfo | undefined;
  980. }
  981. /** 祭坛数据 */
  982. export interface altarData {
  983. }
  984. /** 祭坛数据 */
  985. export interface altarDataRsp {
  986. /** 错误码 */
  987. errno: number;
  988. /** 前5英雄id */
  989. baseList: string[];
  990. /** 上阵英雄数据 */
  991. list: altarInfo[];
  992. /** 购买的格子数量 */
  993. buyNum: number;
  994. /** 可免费置换次数 */
  995. equipFree: number;
  996. /** 可免费置换次数 */
  997. heroFree: number;
  998. }
  999. /** 祭坛上阵 */
  1000. export interface altarBattle {
  1001. /** 上阵位置 */
  1002. pos: number;
  1003. /** 上阵英雄唯一id */
  1004. sid: string;
  1005. }
  1006. /** 祭坛上阵 */
  1007. export interface altarBattleRsp {
  1008. /** 错误码 */
  1009. errno: number;
  1010. /** 上阵位置 */
  1011. pos: number;
  1012. /** 上阵位置信息 */
  1013. data: altarInfo | undefined;
  1014. }
  1015. /** 祭坛置换 */
  1016. export interface altarExchange {
  1017. /** 1英雄置换 2装备置换 */
  1018. type: number;
  1019. /** 唯一id */
  1020. sid: string;
  1021. }
  1022. /** 祭坛置换 */
  1023. export interface altarExchangeRsp {
  1024. /** 错误码 */
  1025. errno: number;
  1026. /** 1英雄置换 2装备置换 */
  1027. type: number;
  1028. /** 唯一id */
  1029. sid: string;
  1030. /** 置换后的模板id */
  1031. id: number;
  1032. }
  1033. /** 祭坛置换确认 */
  1034. export interface altarExchangeConfirm {
  1035. /** 1英雄置换 2装备置换 */
  1036. type: number;
  1037. /** 唯一id */
  1038. sid: string;
  1039. /** 是否置换 */
  1040. change: boolean;
  1041. }
  1042. /** 祭坛置换确认 */
  1043. export interface altarExchangeConfirmRsp {
  1044. /** 错误码 */
  1045. errno: number;
  1046. }
  1047. /** 祭坛购买上阵位 */
  1048. export interface altarBuyBattleSpace {
  1049. }
  1050. /** 祭坛购买上阵位 */
  1051. export interface altarBuyBattleSpaceRsp {
  1052. /** 错误码 */
  1053. errno: number;
  1054. /** 上阵位置 */
  1055. pos: number;
  1056. /** 上阵位置信息 */
  1057. data: altarInfo | undefined;
  1058. }
  1059. /** 祭坛重置上阵位时间 */
  1060. export interface altarResetCd {
  1061. /** 上阵位置 */
  1062. pos: number;
  1063. }
  1064. /** 祭坛重置上阵位时间 */
  1065. export interface altarResetCdRsp {
  1066. /** 错误码 */
  1067. errno: number;
  1068. /** 上阵位置 */
  1069. pos: number;
  1070. /** 上阵位置信息 */
  1071. data: altarInfo | undefined;
  1072. }
  1073. /** 遗迹数据 */
  1074. export interface relicData {
  1075. }
  1076. /** 遗迹数据 */
  1077. export interface relicDataRsp {
  1078. /** 错误码 */
  1079. errno: number;
  1080. }
  1081. /** 遗迹前往下个位置 */
  1082. export interface relicNextPos {
  1083. pos: number;
  1084. }
  1085. /** 遗迹前往下个位置 */
  1086. export interface relicNextPosRsp {
  1087. /** 错误码 */
  1088. errno: number;
  1089. }
  1090. /** 遗迹前往下一层 */
  1091. export interface relicNextLayer {
  1092. }
  1093. /** 遗迹前往下一层 */
  1094. export interface relicNextLayerRsp {
  1095. /** 错误码 */
  1096. errno: number;
  1097. }
  1098. /** 遗迹选择buff */
  1099. export interface relicSelectBuff {
  1100. }
  1101. /** 遗迹选择buff */
  1102. export interface relicSelectBuffRsp {
  1103. /** 错误码 */
  1104. errno: number;
  1105. }
  1106. /** 遗迹重置 */
  1107. export interface relicReset {
  1108. difficulty: number;
  1109. }
  1110. /** 遗迹重置 */
  1111. export interface relicResetRsp {
  1112. /** 错误码 */
  1113. errno: number;
  1114. }
  1115. /** 遗迹事件选择 */
  1116. export interface relicEventSelect {
  1117. /** 事件类型 2战斗 3温泉 4buff选择 */
  1118. type: number;
  1119. /** 战斗是否胜利 */
  1120. win: boolean;
  1121. /** 战斗消耗费用 */
  1122. cost: number;
  1123. /** 选择 */
  1124. select: number;
  1125. }
  1126. /** 遗迹事件选择 */
  1127. export interface relicEventSelectRsp {
  1128. /** 错误码 */
  1129. errno: number;
  1130. }
  1131. /** 遗迹数据推送 */
  1132. export interface relicDataNty {
  1133. /** 历史最高难度 */
  1134. maxDiff: number;
  1135. /** 当前难度 */
  1136. curDiff: number;
  1137. /** 已选buff */
  1138. buffList: number[];
  1139. /** 所在层级 */
  1140. layer: number;
  1141. /** 当前位置 */
  1142. pos: number;
  1143. /** 当前状态 */
  1144. cost: number;
  1145. /** 状态 0 结束 1选择buff */
  1146. state: number;
  1147. /** 可重置的时间 */
  1148. resetTime: number;
  1149. /** 历史路径 */
  1150. posList: number[];
  1151. /** 驻军关卡关卡id */
  1152. battleInfo: number[];
  1153. /** 增加的费用 */
  1154. addCost: number;
  1155. }
  1156. /** 遗迹事件推送 */
  1157. export interface relicEventNty {
  1158. /** 事件类型 2战斗 3温泉 4buff选择 */
  1159. type: number;
  1160. /** 挑战id */
  1161. battleId: number;
  1162. /** 挑战类型 1普通 2精英 3boss 7驻军 */
  1163. battleType: number;
  1164. /** 可选择的buff */
  1165. selectBuff: number[];
  1166. }
  1167. /** 活动时间 */
  1168. export interface activityTimeListNty {
  1169. /** 活动时间列表 */
  1170. list: activityTimeInfo[];
  1171. }
  1172. /** 活动配置 */
  1173. export interface activityGetConfList {
  1174. list: string[];
  1175. }
  1176. /** 活动配置 */
  1177. export interface activityGetConfListRsp {
  1178. /** 错误码 */
  1179. errno: number;
  1180. list: activityConfInfo[];
  1181. }
  1182. export interface activityGetConfNty {
  1183. list: number[];
  1184. }
  1185. /** 特权卡数据 */
  1186. export interface privilegeCardData {
  1187. }
  1188. /** 特权卡数据 */
  1189. export interface privilegeCardDataRsp {
  1190. /** 错误码 */
  1191. errno: number;
  1192. /** 特权卡数据 */
  1193. list: privilegeCardInfo[];
  1194. }
  1195. /** 特权卡购买 */
  1196. export interface privilegeCardBuy {
  1197. /** 模块id */
  1198. moduleid: number;
  1199. }
  1200. /** 特权卡购买 */
  1201. export interface privilegeCardBuyRsp {
  1202. /** 错误码 */
  1203. errno: number;
  1204. }
  1205. /** 特权卡解锁 */
  1206. export interface privilegeCardUnlockNty {
  1207. /** 解锁特权卡数据 */
  1208. data: privilegeCardInfo | undefined;
  1209. }
  1210. /** 特权卡奖励 */
  1211. export interface privilegeCardAward {
  1212. /** 模块id */
  1213. moduleid: number;
  1214. }
  1215. /** 特权卡奖励 */
  1216. export interface privilegeCardAwardRsp {
  1217. /** 模块id */
  1218. errno: number;
  1219. /** 模块id */
  1220. moduleid: number;
  1221. /** 模块id */
  1222. award: boolean;
  1223. }
  1224. /** 宝箱奖励 */
  1225. export interface boxGetAward {
  1226. /** 奖励宝箱id */
  1227. id: number;
  1228. /** 奖励id */
  1229. select: number;
  1230. /** 宝箱类型 */
  1231. type: number;
  1232. /** 数量 */
  1233. num: number;
  1234. }
  1235. /** 宝箱奖励 */
  1236. export interface boxGetAwardRsp {
  1237. /** 模块id */
  1238. errno: number;
  1239. /** 宝箱类型 */
  1240. type: number;
  1241. }
  1242. export interface firstRechargeData {
  1243. /** 模块id */
  1244. moduleid: number;
  1245. }
  1246. /** 首充礼包数据 */
  1247. export interface firstRechargeDataRsp {
  1248. /** 错误码 */
  1249. errno: number;
  1250. /** 模块id */
  1251. moduleid: number;
  1252. /** 是否购买 */
  1253. state: boolean;
  1254. /** 当前第几天 */
  1255. day: number;
  1256. /** 奖励领取数据按位 */
  1257. award: number;
  1258. }
  1259. /** 首充礼包购买 */
  1260. export interface firstRechargeBuy {
  1261. /** 模块id */
  1262. moduleid: number;
  1263. }
  1264. /** 首充礼包购买 */
  1265. export interface firstRechargeBuyRsp {
  1266. /** 错误码 */
  1267. errno: number;
  1268. /** 模块id */
  1269. moduleid: number;
  1270. }
  1271. /** 首充礼包奖励 */
  1272. export interface firstRechargeAward {
  1273. /** 模块id */
  1274. moduleid: number;
  1275. /** 领取第天的奖励 */
  1276. day: number;
  1277. }
  1278. /** 首充礼包奖励 */
  1279. export interface firstRechargeAwardRsp {
  1280. /** 错误码 */
  1281. errno: number;
  1282. /** 模块id */
  1283. moduleid: number;
  1284. /** 领奖数据 */
  1285. award: number;
  1286. }
  1287. /** 首充礼包推送 */
  1288. export interface firstRechargeNty {
  1289. /** 模块id */
  1290. moduleid: number;
  1291. /** 是否购买 */
  1292. state: boolean;
  1293. /** 当前第几天 */
  1294. day: number;
  1295. /** 奖励领取数据按位 */
  1296. award: number;
  1297. }
  1298. /** 日常副本数据 */
  1299. export interface dailyDungeonsData {
  1300. }
  1301. /** 日常副本数据 */
  1302. export interface dailyDungeonsDataRsp {
  1303. /** 错误码 */
  1304. errno: number;
  1305. /** 日常副本数据 */
  1306. list: dailyDungeonsInfo[];
  1307. }
  1308. /** 日常副本战斗开始 */
  1309. export interface dailyDungeonsStart {
  1310. type: number;
  1311. diff: number;
  1312. }
  1313. /** 日常副本战斗开始 */
  1314. export interface dailyDungeonsStartRsp {
  1315. /** 错误码 */
  1316. errno: number;
  1317. awardList: idNum[];
  1318. }
  1319. /** 日常副本战斗结束 */
  1320. export interface dailyDungeonsEnd {
  1321. /** 是否胜利 */
  1322. win: boolean;
  1323. /** 杀怪数量 */
  1324. monsterNum: number;
  1325. /** 杀boss数量 */
  1326. bossNum: number;
  1327. /** 杀精英数量 */
  1328. eliteNum: number;
  1329. }
  1330. /** 日常副本战斗结束 */
  1331. export interface dailyDungeonsEndRsp {
  1332. /** 错误码 */
  1333. errno: number;
  1334. /** 副本数据 */
  1335. data: dailyDungeonsInfo | undefined;
  1336. }
  1337. /** 日常副本扫荡 */
  1338. export interface dailyDungeonsSweep {
  1339. type: number;
  1340. diff: number;
  1341. }
  1342. /** 日常副本扫荡 */
  1343. export interface dailyDungeonsSweepRsp {
  1344. /** 错误码 */
  1345. errno: number;
  1346. /** 副本数据 */
  1347. data: dailyDungeonsInfo | undefined;
  1348. }
  1349. /** 冒险礼包数据 */
  1350. export interface advGiftData {
  1351. }
  1352. /** 冒险礼包数据 */
  1353. export interface advGiftDataRsp {
  1354. /** 错误码 */
  1355. errno: number;
  1356. }
  1357. /** 冒险礼包购买 */
  1358. export interface advGiftBuy {
  1359. /** 礼包id */
  1360. id: number;
  1361. }
  1362. /** 冒险礼包购买 */
  1363. export interface advGiftBuyRsp {
  1364. /** 错误码 */
  1365. errno: number;
  1366. }
  1367. /** 冒险礼包推送 */
  1368. export interface advGiftNty {
  1369. /** 已购买的礼包数据 */
  1370. list: idNum[];
  1371. }
  1372. /** 弹窗礼包数据 */
  1373. export interface popGiftData {
  1374. }
  1375. /** 弹窗礼包数据 */
  1376. export interface popGiftDataRsp {
  1377. /** 错误码 */
  1378. errno: number;
  1379. /** 弹窗礼包数据 */
  1380. list: popGiftInfo[];
  1381. }
  1382. /** 弹窗礼包购买 */
  1383. export interface popGiftBuy {
  1384. /** 礼包id */
  1385. id: number;
  1386. }
  1387. /** 弹窗礼包购买 */
  1388. export interface popGiftBuyRsp {
  1389. /** 错误码 */
  1390. errno: number;
  1391. }
  1392. /** 弹窗礼包推送 */
  1393. export interface popGiftNty {
  1394. /** 弹窗礼包数据 */
  1395. data: popGiftInfo | undefined;
  1396. }
  1397. /** 弹窗礼包数据变化 */
  1398. export interface popGiftChangeNty {
  1399. /** 弹窗礼包数据 */
  1400. data: popGiftInfo | undefined;
  1401. }
  1402. /** 基金数据 */
  1403. export interface fundData {
  1404. /** 模块id */
  1405. moduleid: number;
  1406. }
  1407. /** 基金数据 */
  1408. export interface fundDataRsp {
  1409. /** 错误码 */
  1410. errno: number;
  1411. /** 模块id */
  1412. moduleid: number;
  1413. /** 是否购买 */
  1414. state: boolean;
  1415. /** 领奖数据 */
  1416. award: number;
  1417. /** 领奖数据 */
  1418. freeAward: number;
  1419. /** 当前进度 */
  1420. progress: number;
  1421. }
  1422. /** 基金购买 */
  1423. export interface fundBuy {
  1424. /** 模块id */
  1425. moduleid: number;
  1426. }
  1427. /** 基金购买 */
  1428. export interface fundBuyRsp {
  1429. /** 错误码 */
  1430. errno: number;
  1431. /** 模块id */
  1432. moduleid: number;
  1433. }
  1434. /** 基金奖励 */
  1435. export interface fundAward {
  1436. /** 模块id */
  1437. moduleid: number;
  1438. }
  1439. /** 基金奖励 */
  1440. export interface fundAwardRsp {
  1441. /** 错误码 */
  1442. errno: number;
  1443. /** 模块id */
  1444. moduleid: number;
  1445. /** 领奖数据 */
  1446. award: number;
  1447. /** 领奖数据 */
  1448. freeAward: number;
  1449. }
  1450. /** 基金推送 */
  1451. export interface fundNty {
  1452. /** 模块id */
  1453. moduleid: number;
  1454. /** 是否购买 */
  1455. state: boolean;
  1456. /** 领奖数据 */
  1457. award: number;
  1458. /** 领奖数据 */
  1459. freeAward: number;
  1460. /** 当前进度 */
  1461. progress: number;
  1462. }
  1463. /** 连续充值数据 */
  1464. export interface keepRechargeData {
  1465. }
  1466. /** 连续充值数据 */
  1467. export interface keepRechargeDataRsp {
  1468. /** 错误码 */
  1469. errno: number;
  1470. /** 连续充值天数 */
  1471. day: number;
  1472. /** 当天充值数量 */
  1473. num: number;
  1474. /** 领取奖励信息(按位存) */
  1475. award: number;
  1476. }
  1477. /** 连续充值奖励 */
  1478. export interface keepRechargeAward {
  1479. /** 领取奖励的天数 */
  1480. day: number;
  1481. }
  1482. /** 连续充值奖励 */
  1483. export interface keepRechargeAwardRsp {
  1484. /** 错误码 */
  1485. errno: number;
  1486. /** 领取奖励信息(按位存) */
  1487. award: number;
  1488. }
  1489. /** 红点数据 */
  1490. export interface getRedPointList {
  1491. }
  1492. /** 红点数据 */
  1493. export interface getRedPointListRsp {
  1494. /** 错误码 */
  1495. errno: number;
  1496. /** 红点数据 */
  1497. list: redPointInfo[];
  1498. }
  1499. /** 充值结果 */
  1500. export interface rechargeResult {
  1501. /** 服务器订单号 */
  1502. orderId: string;
  1503. /** 支付平台返回的订单号 */
  1504. payOrderId: string;
  1505. /** 支付平台返回的purchaseToken */
  1506. purchaseToken: string;
  1507. /** 支付方式 */
  1508. payType: string;
  1509. /** 计费点 */
  1510. cfgId: number;
  1511. }
  1512. /** 充值结果 */
  1513. export interface rechargeResultRsp {
  1514. /** 错误码 */
  1515. errno: number;
  1516. }
  1517. /** 充值回调成功消息 */
  1518. export interface rechargeSuccess {
  1519. /** 订单号 */
  1520. id: string;
  1521. }
  1522. /** 领取在线奖励 */
  1523. export interface onlineAwardGetAward {
  1524. /** 领取第几个在线奖励 */
  1525. pos: number;
  1526. }
  1527. /** 领取在线奖励 */
  1528. export interface onlineAwardGetAwardRsp {
  1529. /** 错误码 */
  1530. errno: number;
  1531. /** 领取奖励数据 */
  1532. award: number;
  1533. }
  1534. /** 在线奖励数据 */
  1535. export interface onlineAwardGetData {
  1536. }
  1537. /** 在线奖励数据 */
  1538. export interface onlineAwardGetDataRsp {
  1539. /** 错误码 */
  1540. errno: number;
  1541. }
  1542. /** 在线奖励数据推送 */
  1543. export interface onlineAwardNty {
  1544. /** 是否开启 */
  1545. open: boolean;
  1546. /** 在线时长 */
  1547. time: number;
  1548. /** 领取奖励数据 */
  1549. award: number;
  1550. }
  1551. /** 战斗加速数据 */
  1552. export interface speedUpData {
  1553. }
  1554. /** 战斗加速数据 */
  1555. export interface speedUpDataRsp {
  1556. /** 错误码 */
  1557. errno: number;
  1558. /** 剩余加速时间 */
  1559. time: number;
  1560. }
  1561. /** 战斗加速时间购买 */
  1562. export interface speedUpBuy {
  1563. /** 是否广告观看 */
  1564. free: boolean;
  1565. }
  1566. /** 战斗加速时间购买 */
  1567. export interface speedUpBuyRsp {
  1568. /** 错误码 */
  1569. errno: number;
  1570. /** 剩余加速时间 */
  1571. time: number;
  1572. }
  1573. /** 主城技能升级 */
  1574. export interface citySkillUpgrade {
  1575. /** 技能id */
  1576. id: number;
  1577. }
  1578. /** 主城技能升级 */
  1579. export interface citySkillUpgradeRsp {
  1580. /** 错误码 */
  1581. errno: number;
  1582. /** 技能id */
  1583. id: number;
  1584. }
  1585. /** 主城技能上阵 */
  1586. export interface citySkillBattle {
  1587. /** 技能id */
  1588. id: number;
  1589. }
  1590. /** 主城技能上阵 */
  1591. export interface citySkillBattleRsp {
  1592. /** 错误码 */
  1593. errno: number;
  1594. /** 技能id */
  1595. id: number;
  1596. }
  1597. /** 建筑探索 */
  1598. export interface buildingExplore {
  1599. /** 建筑id */
  1600. id: number;
  1601. }
  1602. /** 建筑探索 */
  1603. export interface buildingExploreRsp {
  1604. /** 错误码 */
  1605. errno: number;
  1606. /** 建筑数据 */
  1607. data: building | undefined;
  1608. }
  1609. /** 领取自动探索奖励 */
  1610. export interface buildingAutoExploreAward {
  1611. /** 建筑id */
  1612. id: number;
  1613. }
  1614. /** 领取自动探索奖励 */
  1615. export interface buildingAutoExploreAwardRsp {
  1616. /** 错误码 */
  1617. errno: number;
  1618. /** 建筑数据 */
  1619. data: building | undefined;
  1620. }
  1621. /** 建筑探索上阵 */
  1622. export interface buildingExploreBattle {
  1623. /** 建筑id */
  1624. id: number;
  1625. /** 上阵数据 */
  1626. list: string[];
  1627. }
  1628. /** 建筑探索上阵 */
  1629. export interface buildingExploreBattleRsp {
  1630. /** 错误码 */
  1631. errno: number;
  1632. /** 建筑数据 */
  1633. data: building | undefined;
  1634. }
  1635. /** 建筑自动探索设置 */
  1636. export interface buildingAutoExploreOption {
  1637. /** 建筑id */
  1638. id: number;
  1639. /** 是否开启 */
  1640. open: boolean;
  1641. }
  1642. /** 建筑自动探索设置 */
  1643. export interface buildingAutoExploreOptionRsp {
  1644. /** 错误码 */
  1645. errno: number;
  1646. /** 建筑数据 */
  1647. data: building | undefined;
  1648. }
  1649. /** 等级礼包数据 */
  1650. export interface levelGiftData {
  1651. }
  1652. /** 等级礼包数据 */
  1653. export interface levelGiftDataRsp {
  1654. /** 错误码 */
  1655. errno: number;
  1656. }
  1657. /** 等级礼包购买 */
  1658. export interface levelGiftBuy {
  1659. /** 礼包id */
  1660. id: number;
  1661. }
  1662. /** 等级礼包购买 */
  1663. export interface levelGiftBuyRsp {
  1664. /** 错误码 */
  1665. errno: number;
  1666. }
  1667. /** 等级礼包推送 */
  1668. export interface levelGiftNty {
  1669. /** 已购买的礼包数据 */
  1670. list: idNum[];
  1671. }
  1672. /** 等级礼包取消红点 */
  1673. export interface levelGiftDelRedPoint {
  1674. }
  1675. /** 等级礼包取消红点 */
  1676. export interface levelGiftDelRedPointRsp {
  1677. /** 错误码 */
  1678. errno: number;
  1679. }
  1680. /** 千抽活动数据 */
  1681. export interface lotteryData {
  1682. }
  1683. /** 千抽活动数据 */
  1684. export interface lotteryDataRsp {
  1685. /** 错误码 */
  1686. errno: number;
  1687. }
  1688. /** 千抽活动奖励 */
  1689. export interface lotteryAward {
  1690. /** 是否为免费奖励 */
  1691. free: boolean;
  1692. }
  1693. /** 千抽活动奖励 */
  1694. export interface lotteryAwardRsp {
  1695. /** 错误码 */
  1696. errno: number;
  1697. /** 是否为免费奖励 */
  1698. free: boolean;
  1699. /** 领取进度 */
  1700. award: number;
  1701. }
  1702. /** 千抽活动购买 */
  1703. export interface lotteryBuy {
  1704. }
  1705. /** 千抽活动购买 */
  1706. export interface lotteryBuyRsp {
  1707. /** 错误码 */
  1708. errno: number;
  1709. }
  1710. /** 千抽活动推送 */
  1711. export interface lotteryNty {
  1712. /** 状态0未开启 1开启 2关闭 */
  1713. state: number;
  1714. /** 免费奖励领取进度 */
  1715. free: number;
  1716. /** 付费奖励领取进度-1为未解锁. */
  1717. award: number;
  1718. /** 第几天 */
  1719. day: number;
  1720. }
  1721. /** 开服排行活动数据 */
  1722. export interface actRankData {
  1723. /** 排行活动id */
  1724. id: number;
  1725. }
  1726. /** 开服排行活动数据 */
  1727. export interface actRankDataRsp {
  1728. /** 错误码 */
  1729. errno: number;
  1730. /** 排行数据 */
  1731. list: rankingInfo[];
  1732. }
  1733. /** 开服宝藏活动数据 */
  1734. export interface treasureGetData {
  1735. }
  1736. /** 开服宝藏活动数据 */
  1737. export interface treasureGetDataRsp {
  1738. /** 错误码 */
  1739. errno: number;
  1740. /** 购买次数 */
  1741. buy: number;
  1742. /** 签到进度 */
  1743. sign: number;
  1744. /** 已抽到数据 */
  1745. list: number[];
  1746. /** 是否抽到大奖 */
  1747. treasure: boolean;
  1748. }
  1749. /** 开服宝藏活动抽奖 */
  1750. export interface treasureDraw {
  1751. }
  1752. /** 开服宝藏活动抽奖 */
  1753. export interface treasureDrawRsp {
  1754. /** 错误码 */
  1755. errno: number;
  1756. /** 0为大奖 */
  1757. pos: number;
  1758. }
  1759. /** 开服宝藏活动签到 */
  1760. export interface treasureSign {
  1761. }
  1762. /** 开服宝藏活动签到 */
  1763. export interface treasureSignRsp {
  1764. /** 错误码 */
  1765. errno: number;
  1766. /** 签到进度 */
  1767. sign: number;
  1768. }
  1769. /** 开服宝藏活动购买 */
  1770. export interface treasureBuy {
  1771. }
  1772. /** 开服宝藏活动购买 */
  1773. export interface treasureBuyRsp {
  1774. /** 错误码 */
  1775. errno: number;
  1776. /** 购买次数 */
  1777. buy: number;
  1778. }
  1779. /** pvp数据 */
  1780. export interface pvpData {
  1781. }
  1782. /** pvp数据 */
  1783. export interface pvpDataRsp {
  1784. /** 错误码 */
  1785. errno: number;
  1786. /** 阵容数据 */
  1787. embattleList: embattleInfo[];
  1788. /** 排名数据 */
  1789. rankingList: rankingInfo[];
  1790. }
  1791. /** pvp匹配战斗 */
  1792. export interface pvpMatch {
  1793. }
  1794. /** pvp匹配战斗 */
  1795. export interface pvpMatchRsp {
  1796. errno: number;
  1797. /** 阵容数据 */
  1798. embattleList: embattleInfo[];
  1799. /** 英雄数据 */
  1800. heroList: hero[];
  1801. /** 卡牌数据 */
  1802. cardList: card[];
  1803. /** 装备数据 */
  1804. equipList: equip[];
  1805. /** 天赋数据 */
  1806. talentData: talentInfo | undefined;
  1807. }
  1808. /** pvp战斗结果 */
  1809. export interface pvpReslut {
  1810. /** 胜利次数 */
  1811. win: number;
  1812. }
  1813. /** pvp战斗结果 */
  1814. export interface pvpReslutRsp {
  1815. errno: number;
  1816. }
  1817. /** 布阵 */
  1818. export interface pvpEmbattle {
  1819. data: embattleInfo | undefined;
  1820. }
  1821. /** 布阵 */
  1822. export interface pvpEmbattleRsp {
  1823. errno: number;
  1824. }
  1825. /** 宝箱数据 */
  1826. export interface timeBoxData {
  1827. }
  1828. /** 宝箱数据 */
  1829. export interface timeBoxDataRsp {
  1830. errno: number;
  1831. list: timeBox[];
  1832. }
  1833. /** 宝箱解锁 */
  1834. export interface timeBoxUnlock {
  1835. /** 宝箱位置 */
  1836. pos: number;
  1837. }
  1838. /** 宝箱解锁 */
  1839. export interface timeBoxUnlockRsp {
  1840. errno: number;
  1841. data: timeBox | undefined;
  1842. }
  1843. /** 宝箱奖励 */
  1844. export interface timeBoxGetAward {
  1845. /** 宝箱位置 */
  1846. pos: number;
  1847. }
  1848. /** 宝箱奖励 */
  1849. export interface timeBoxGetAwardRsp {
  1850. errno: number;
  1851. /** 宝箱位置 */
  1852. pos: number;
  1853. }
  1854. function createBaseping(): ping {
  1855. return {};
  1856. }
  1857. export const ping = {
  1858. fromJSON(_: any): ping {
  1859. return {};
  1860. },
  1861. toJSON(_: ping): unknown {
  1862. const obj: any = {};
  1863. return obj;
  1864. },
  1865. create<I extends Exact<DeepPartial<ping>, I>>(base?: I): ping {
  1866. return ping.fromPartial(base ?? ({} as any));
  1867. },
  1868. fromPartial<I extends Exact<DeepPartial<ping>, I>>(_: I): ping {
  1869. const message = createBaseping();
  1870. return message;
  1871. },
  1872. };
  1873. function createBasepingRsp(): pingRsp {
  1874. return { time: 0 };
  1875. }
  1876. export const pingRsp = {
  1877. fromJSON(object: any): pingRsp {
  1878. return { time: isSet(object.time) ? globalThis.Number(object.time) : 0 };
  1879. },
  1880. toJSON(message: pingRsp): unknown {
  1881. const obj: any = {};
  1882. if (message.time !== 0) {
  1883. obj.time = Math.round(message.time);
  1884. }
  1885. return obj;
  1886. },
  1887. create<I extends Exact<DeepPartial<pingRsp>, I>>(base?: I): pingRsp {
  1888. return pingRsp.fromPartial(base ?? ({} as any));
  1889. },
  1890. fromPartial<I extends Exact<DeepPartial<pingRsp>, I>>(object: I): pingRsp {
  1891. const message = createBasepingRsp();
  1892. message.time = object.time ?? 0;
  1893. return message;
  1894. },
  1895. };
  1896. function createBaselogin(): login {
  1897. return { sid: 0, account: "", channel: "", token: "", extension: "" };
  1898. }
  1899. export const login = {
  1900. fromJSON(object: any): login {
  1901. return {
  1902. sid: isSet(object.sid) ? globalThis.Number(object.sid) : 0,
  1903. account: isSet(object.account) ? globalThis.String(object.account) : "",
  1904. channel: isSet(object.channel) ? globalThis.String(object.channel) : "",
  1905. token: isSet(object.token) ? globalThis.String(object.token) : "",
  1906. extension: isSet(object.extension) ? globalThis.String(object.extension) : "",
  1907. };
  1908. },
  1909. toJSON(message: login): unknown {
  1910. const obj: any = {};
  1911. if (message.sid !== 0) {
  1912. obj.sid = Math.round(message.sid);
  1913. }
  1914. if (message.account !== "") {
  1915. obj.account = message.account;
  1916. }
  1917. if (message.channel !== "") {
  1918. obj.channel = message.channel;
  1919. }
  1920. if (message.token !== "") {
  1921. obj.token = message.token;
  1922. }
  1923. if (message.extension !== "") {
  1924. obj.extension = message.extension;
  1925. }
  1926. return obj;
  1927. },
  1928. create<I extends Exact<DeepPartial<login>, I>>(base?: I): login {
  1929. return login.fromPartial(base ?? ({} as any));
  1930. },
  1931. fromPartial<I extends Exact<DeepPartial<login>, I>>(object: I): login {
  1932. const message = createBaselogin();
  1933. message.sid = object.sid ?? 0;
  1934. message.account = object.account ?? "";
  1935. message.channel = object.channel ?? "";
  1936. message.token = object.token ?? "";
  1937. message.extension = object.extension ?? "";
  1938. return message;
  1939. },
  1940. };
  1941. function createBaseloginRsp(): loginRsp {
  1942. return { errno: 0 };
  1943. }
  1944. export const loginRsp = {
  1945. fromJSON(object: any): loginRsp {
  1946. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  1947. },
  1948. toJSON(message: loginRsp): unknown {
  1949. const obj: any = {};
  1950. if (message.errno !== 0) {
  1951. obj.errno = Math.round(message.errno);
  1952. }
  1953. return obj;
  1954. },
  1955. create<I extends Exact<DeepPartial<loginRsp>, I>>(base?: I): loginRsp {
  1956. return loginRsp.fromPartial(base ?? ({} as any));
  1957. },
  1958. fromPartial<I extends Exact<DeepPartial<loginRsp>, I>>(object: I): loginRsp {
  1959. const message = createBaseloginRsp();
  1960. message.errno = object.errno ?? 0;
  1961. return message;
  1962. },
  1963. };
  1964. function createBasecreate(): create {
  1965. return { nickname: "" };
  1966. }
  1967. export const create = {
  1968. fromJSON(object: any): create {
  1969. return { nickname: isSet(object.nickname) ? globalThis.String(object.nickname) : "" };
  1970. },
  1971. toJSON(message: create): unknown {
  1972. const obj: any = {};
  1973. if (message.nickname !== "") {
  1974. obj.nickname = message.nickname;
  1975. }
  1976. return obj;
  1977. },
  1978. create<I extends Exact<DeepPartial<create>, I>>(base?: I): create {
  1979. return create.fromPartial(base ?? ({} as any));
  1980. },
  1981. fromPartial<I extends Exact<DeepPartial<create>, I>>(object: I): create {
  1982. const message = createBasecreate();
  1983. message.nickname = object.nickname ?? "";
  1984. return message;
  1985. },
  1986. };
  1987. function createBasecreateRsp(): createRsp {
  1988. return { errno: 0 };
  1989. }
  1990. export const createRsp = {
  1991. fromJSON(object: any): createRsp {
  1992. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  1993. },
  1994. toJSON(message: createRsp): unknown {
  1995. const obj: any = {};
  1996. if (message.errno !== 0) {
  1997. obj.errno = Math.round(message.errno);
  1998. }
  1999. return obj;
  2000. },
  2001. create<I extends Exact<DeepPartial<createRsp>, I>>(base?: I): createRsp {
  2002. return createRsp.fromPartial(base ?? ({} as any));
  2003. },
  2004. fromPartial<I extends Exact<DeepPartial<createRsp>, I>>(object: I): createRsp {
  2005. const message = createBasecreateRsp();
  2006. message.errno = object.errno ?? 0;
  2007. return message;
  2008. },
  2009. };
  2010. function createBaseuser(): user {
  2011. return {
  2012. uid: "",
  2013. nickname: "",
  2014. level: 0,
  2015. exp: 0,
  2016. avatar: 0,
  2017. svrtime: 0,
  2018. renameTime: 0,
  2019. createtime: 0,
  2020. sid: 0,
  2021. bfirst: false,
  2022. currency: [],
  2023. };
  2024. }
  2025. export const user = {
  2026. fromJSON(object: any): user {
  2027. return {
  2028. uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
  2029. nickname: isSet(object.nickname) ? globalThis.String(object.nickname) : "",
  2030. level: isSet(object.level) ? globalThis.Number(object.level) : 0,
  2031. exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0,
  2032. avatar: isSet(object.avatar) ? globalThis.Number(object.avatar) : 0,
  2033. svrtime: isSet(object.svrtime) ? globalThis.Number(object.svrtime) : 0,
  2034. renameTime: isSet(object.renameTime) ? globalThis.Number(object.renameTime) : 0,
  2035. createtime: isSet(object.createtime) ? globalThis.Number(object.createtime) : 0,
  2036. sid: isSet(object.sid) ? globalThis.Number(object.sid) : 0,
  2037. bfirst: isSet(object.bfirst) ? globalThis.Boolean(object.bfirst) : false,
  2038. currency: globalThis.Array.isArray(object?.currency) ? object.currency.map((e: any) => idNum.fromJSON(e)) : [],
  2039. };
  2040. },
  2041. toJSON(message: user): unknown {
  2042. const obj: any = {};
  2043. if (message.uid !== "") {
  2044. obj.uid = message.uid;
  2045. }
  2046. if (message.nickname !== "") {
  2047. obj.nickname = message.nickname;
  2048. }
  2049. if (message.level !== 0) {
  2050. obj.level = Math.round(message.level);
  2051. }
  2052. if (message.exp !== 0) {
  2053. obj.exp = Math.round(message.exp);
  2054. }
  2055. if (message.avatar !== 0) {
  2056. obj.avatar = Math.round(message.avatar);
  2057. }
  2058. if (message.svrtime !== 0) {
  2059. obj.svrtime = Math.round(message.svrtime);
  2060. }
  2061. if (message.renameTime !== 0) {
  2062. obj.renameTime = Math.round(message.renameTime);
  2063. }
  2064. if (message.createtime !== 0) {
  2065. obj.createtime = Math.round(message.createtime);
  2066. }
  2067. if (message.sid !== 0) {
  2068. obj.sid = Math.round(message.sid);
  2069. }
  2070. if (message.bfirst !== false) {
  2071. obj.bfirst = message.bfirst;
  2072. }
  2073. if (message.currency?.length) {
  2074. obj.currency = message.currency.map((e) => idNum.toJSON(e));
  2075. }
  2076. return obj;
  2077. },
  2078. create<I extends Exact<DeepPartial<user>, I>>(base?: I): user {
  2079. return user.fromPartial(base ?? ({} as any));
  2080. },
  2081. fromPartial<I extends Exact<DeepPartial<user>, I>>(object: I): user {
  2082. const message = createBaseuser();
  2083. message.uid = object.uid ?? "";
  2084. message.nickname = object.nickname ?? "";
  2085. message.level = object.level ?? 0;
  2086. message.exp = object.exp ?? 0;
  2087. message.avatar = object.avatar ?? 0;
  2088. message.svrtime = object.svrtime ?? 0;
  2089. message.renameTime = object.renameTime ?? 0;
  2090. message.createtime = object.createtime ?? 0;
  2091. message.sid = object.sid ?? 0;
  2092. message.bfirst = object.bfirst ?? false;
  2093. message.currency = object.currency?.map((e) => idNum.fromPartial(e)) || [];
  2094. return message;
  2095. },
  2096. };
  2097. function createBaserewardInfo(): rewardInfo {
  2098. return { flags: "", added: undefined };
  2099. }
  2100. export const rewardInfo = {
  2101. fromJSON(object: any): rewardInfo {
  2102. return {
  2103. flags: isSet(object.flags) ? globalThis.String(object.flags) : "",
  2104. added: isSet(object.added) ? reward.fromJSON(object.added) : undefined,
  2105. };
  2106. },
  2107. toJSON(message: rewardInfo): unknown {
  2108. const obj: any = {};
  2109. if (message.flags !== "") {
  2110. obj.flags = message.flags;
  2111. }
  2112. if (message.added !== undefined) {
  2113. obj.added = reward.toJSON(message.added);
  2114. }
  2115. return obj;
  2116. },
  2117. create<I extends Exact<DeepPartial<rewardInfo>, I>>(base?: I): rewardInfo {
  2118. return rewardInfo.fromPartial(base ?? ({} as any));
  2119. },
  2120. fromPartial<I extends Exact<DeepPartial<rewardInfo>, I>>(object: I): rewardInfo {
  2121. const message = createBaserewardInfo();
  2122. message.flags = object.flags ?? "";
  2123. message.added = (object.added !== undefined && object.added !== null)
  2124. ? reward.fromPartial(object.added)
  2125. : undefined;
  2126. return message;
  2127. },
  2128. };
  2129. function createBasecityChange(): cityChange {
  2130. return { currency: undefined, time: 0 };
  2131. }
  2132. export const cityChange = {
  2133. fromJSON(object: any): cityChange {
  2134. return {
  2135. currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined,
  2136. time: isSet(object.time) ? globalThis.Number(object.time) : 0,
  2137. };
  2138. },
  2139. toJSON(message: cityChange): unknown {
  2140. const obj: any = {};
  2141. if (message.currency !== undefined) {
  2142. obj.currency = idNum.toJSON(message.currency);
  2143. }
  2144. if (message.time !== 0) {
  2145. obj.time = Math.round(message.time);
  2146. }
  2147. return obj;
  2148. },
  2149. create<I extends Exact<DeepPartial<cityChange>, I>>(base?: I): cityChange {
  2150. return cityChange.fromPartial(base ?? ({} as any));
  2151. },
  2152. fromPartial<I extends Exact<DeepPartial<cityChange>, I>>(object: I): cityChange {
  2153. const message = createBasecityChange();
  2154. message.currency = (object.currency !== undefined && object.currency !== null)
  2155. ? idNum.fromPartial(object.currency)
  2156. : undefined;
  2157. message.time = object.time ?? 0;
  2158. return message;
  2159. },
  2160. };
  2161. function createBasepayCurrency(): payCurrency {
  2162. return { now: [], pay: [] };
  2163. }
  2164. export const payCurrency = {
  2165. fromJSON(object: any): payCurrency {
  2166. return {
  2167. now: globalThis.Array.isArray(object?.now) ? object.now.map((e: any) => idNum.fromJSON(e)) : [],
  2168. pay: globalThis.Array.isArray(object?.pay) ? object.pay.map((e: any) => idNum.fromJSON(e)) : [],
  2169. };
  2170. },
  2171. toJSON(message: payCurrency): unknown {
  2172. const obj: any = {};
  2173. if (message.now?.length) {
  2174. obj.now = message.now.map((e) => idNum.toJSON(e));
  2175. }
  2176. if (message.pay?.length) {
  2177. obj.pay = message.pay.map((e) => idNum.toJSON(e));
  2178. }
  2179. return obj;
  2180. },
  2181. create<I extends Exact<DeepPartial<payCurrency>, I>>(base?: I): payCurrency {
  2182. return payCurrency.fromPartial(base ?? ({} as any));
  2183. },
  2184. fromPartial<I extends Exact<DeepPartial<payCurrency>, I>>(object: I): payCurrency {
  2185. const message = createBasepayCurrency();
  2186. message.now = object.now?.map((e) => idNum.fromPartial(e)) || [];
  2187. message.pay = object.pay?.map((e) => idNum.fromPartial(e)) || [];
  2188. return message;
  2189. },
  2190. };
  2191. function createBasepayDebrisNty(): payDebrisNty {
  2192. return { list: [] };
  2193. }
  2194. export const payDebrisNty = {
  2195. fromJSON(object: any): payDebrisNty {
  2196. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => idNum.fromJSON(e)) : [] };
  2197. },
  2198. toJSON(message: payDebrisNty): unknown {
  2199. const obj: any = {};
  2200. if (message.list?.length) {
  2201. obj.list = message.list.map((e) => idNum.toJSON(e));
  2202. }
  2203. return obj;
  2204. },
  2205. create<I extends Exact<DeepPartial<payDebrisNty>, I>>(base?: I): payDebrisNty {
  2206. return payDebrisNty.fromPartial(base ?? ({} as any));
  2207. },
  2208. fromPartial<I extends Exact<DeepPartial<payDebrisNty>, I>>(object: I): payDebrisNty {
  2209. const message = createBasepayDebrisNty();
  2210. message.list = object.list?.map((e) => idNum.fromPartial(e)) || [];
  2211. return message;
  2212. },
  2213. };
  2214. function createBaseexceptionNty(): exceptionNty {
  2215. return { errno: 0 };
  2216. }
  2217. export const exceptionNty = {
  2218. fromJSON(object: any): exceptionNty {
  2219. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  2220. },
  2221. toJSON(message: exceptionNty): unknown {
  2222. const obj: any = {};
  2223. if (message.errno !== 0) {
  2224. obj.errno = Math.round(message.errno);
  2225. }
  2226. return obj;
  2227. },
  2228. create<I extends Exact<DeepPartial<exceptionNty>, I>>(base?: I): exceptionNty {
  2229. return exceptionNty.fromPartial(base ?? ({} as any));
  2230. },
  2231. fromPartial<I extends Exact<DeepPartial<exceptionNty>, I>>(object: I): exceptionNty {
  2232. const message = createBaseexceptionNty();
  2233. message.errno = object.errno ?? 0;
  2234. return message;
  2235. },
  2236. };
  2237. function createBasecreateOrderNty(): createOrderNty {
  2238. return { id: "", cfid: 0, sign: "", time: 0 };
  2239. }
  2240. export const createOrderNty = {
  2241. fromJSON(object: any): createOrderNty {
  2242. return {
  2243. id: isSet(object.id) ? globalThis.String(object.id) : "",
  2244. cfid: isSet(object.cfid) ? globalThis.Number(object.cfid) : 0,
  2245. sign: isSet(object.sign) ? globalThis.String(object.sign) : "",
  2246. time: isSet(object.time) ? globalThis.Number(object.time) : 0,
  2247. };
  2248. },
  2249. toJSON(message: createOrderNty): unknown {
  2250. const obj: any = {};
  2251. if (message.id !== "") {
  2252. obj.id = message.id;
  2253. }
  2254. if (message.cfid !== 0) {
  2255. obj.cfid = Math.round(message.cfid);
  2256. }
  2257. if (message.sign !== "") {
  2258. obj.sign = message.sign;
  2259. }
  2260. if (message.time !== 0) {
  2261. obj.time = Math.round(message.time);
  2262. }
  2263. return obj;
  2264. },
  2265. create<I extends Exact<DeepPartial<createOrderNty>, I>>(base?: I): createOrderNty {
  2266. return createOrderNty.fromPartial(base ?? ({} as any));
  2267. },
  2268. fromPartial<I extends Exact<DeepPartial<createOrderNty>, I>>(object: I): createOrderNty {
  2269. const message = createBasecreateOrderNty();
  2270. message.id = object.id ?? "";
  2271. message.cfid = object.cfid ?? 0;
  2272. message.sign = object.sign ?? "";
  2273. message.time = object.time ?? 0;
  2274. return message;
  2275. },
  2276. };
  2277. function createBasecityData(): cityData {
  2278. return {};
  2279. }
  2280. export const cityData = {
  2281. fromJSON(_: any): cityData {
  2282. return {};
  2283. },
  2284. toJSON(_: cityData): unknown {
  2285. const obj: any = {};
  2286. return obj;
  2287. },
  2288. create<I extends Exact<DeepPartial<cityData>, I>>(base?: I): cityData {
  2289. return cityData.fromPartial(base ?? ({} as any));
  2290. },
  2291. fromPartial<I extends Exact<DeepPartial<cityData>, I>>(_: I): cityData {
  2292. const message = createBasecityData();
  2293. return message;
  2294. },
  2295. };
  2296. function createBasecityDataRsp(): cityDataRsp {
  2297. return { errno: 0, time: 0, list: [], skillList: [], skillid: 0 };
  2298. }
  2299. export const cityDataRsp = {
  2300. fromJSON(object: any): cityDataRsp {
  2301. return {
  2302. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  2303. time: isSet(object.time) ? globalThis.Number(object.time) : 0,
  2304. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => building.fromJSON(e)) : [],
  2305. skillList: globalThis.Array.isArray(object?.skillList)
  2306. ? object.skillList.map((e: any) => globalThis.Number(e))
  2307. : [],
  2308. skillid: isSet(object.skillid) ? globalThis.Number(object.skillid) : 0,
  2309. };
  2310. },
  2311. toJSON(message: cityDataRsp): unknown {
  2312. const obj: any = {};
  2313. if (message.errno !== 0) {
  2314. obj.errno = Math.round(message.errno);
  2315. }
  2316. if (message.time !== 0) {
  2317. obj.time = Math.round(message.time);
  2318. }
  2319. if (message.list?.length) {
  2320. obj.list = message.list.map((e) => building.toJSON(e));
  2321. }
  2322. if (message.skillList?.length) {
  2323. obj.skillList = message.skillList.map((e) => Math.round(e));
  2324. }
  2325. if (message.skillid !== 0) {
  2326. obj.skillid = Math.round(message.skillid);
  2327. }
  2328. return obj;
  2329. },
  2330. create<I extends Exact<DeepPartial<cityDataRsp>, I>>(base?: I): cityDataRsp {
  2331. return cityDataRsp.fromPartial(base ?? ({} as any));
  2332. },
  2333. fromPartial<I extends Exact<DeepPartial<cityDataRsp>, I>>(object: I): cityDataRsp {
  2334. const message = createBasecityDataRsp();
  2335. message.errno = object.errno ?? 0;
  2336. message.time = object.time ?? 0;
  2337. message.list = object.list?.map((e) => building.fromPartial(e)) || [];
  2338. message.skillList = object.skillList?.map((e) => e) || [];
  2339. message.skillid = object.skillid ?? 0;
  2340. return message;
  2341. },
  2342. };
  2343. function createBasecityDataSend(): cityDataSend {
  2344. return { time: 0, list: [] };
  2345. }
  2346. export const cityDataSend = {
  2347. fromJSON(object: any): cityDataSend {
  2348. return {
  2349. time: isSet(object.time) ? globalThis.Number(object.time) : 0,
  2350. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => building.fromJSON(e)) : [],
  2351. };
  2352. },
  2353. toJSON(message: cityDataSend): unknown {
  2354. const obj: any = {};
  2355. if (message.time !== 0) {
  2356. obj.time = Math.round(message.time);
  2357. }
  2358. if (message.list?.length) {
  2359. obj.list = message.list.map((e) => building.toJSON(e));
  2360. }
  2361. return obj;
  2362. },
  2363. create<I extends Exact<DeepPartial<cityDataSend>, I>>(base?: I): cityDataSend {
  2364. return cityDataSend.fromPartial(base ?? ({} as any));
  2365. },
  2366. fromPartial<I extends Exact<DeepPartial<cityDataSend>, I>>(object: I): cityDataSend {
  2367. const message = createBasecityDataSend();
  2368. message.time = object.time ?? 0;
  2369. message.list = object.list?.map((e) => building.fromPartial(e)) || [];
  2370. return message;
  2371. },
  2372. };
  2373. function createBasebuildingUpgrade(): buildingUpgrade {
  2374. return { id: 0 };
  2375. }
  2376. export const buildingUpgrade = {
  2377. fromJSON(object: any): buildingUpgrade {
  2378. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  2379. },
  2380. toJSON(message: buildingUpgrade): unknown {
  2381. const obj: any = {};
  2382. if (message.id !== 0) {
  2383. obj.id = Math.round(message.id);
  2384. }
  2385. return obj;
  2386. },
  2387. create<I extends Exact<DeepPartial<buildingUpgrade>, I>>(base?: I): buildingUpgrade {
  2388. return buildingUpgrade.fromPartial(base ?? ({} as any));
  2389. },
  2390. fromPartial<I extends Exact<DeepPartial<buildingUpgrade>, I>>(object: I): buildingUpgrade {
  2391. const message = createBasebuildingUpgrade();
  2392. message.id = object.id ?? 0;
  2393. return message;
  2394. },
  2395. };
  2396. function createBasebuildingUpgradeRsp(): buildingUpgradeRsp {
  2397. return { errno: 0, data: undefined };
  2398. }
  2399. export const buildingUpgradeRsp = {
  2400. fromJSON(object: any): buildingUpgradeRsp {
  2401. return {
  2402. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  2403. data: isSet(object.data) ? building.fromJSON(object.data) : undefined,
  2404. };
  2405. },
  2406. toJSON(message: buildingUpgradeRsp): unknown {
  2407. const obj: any = {};
  2408. if (message.errno !== 0) {
  2409. obj.errno = Math.round(message.errno);
  2410. }
  2411. if (message.data !== undefined) {
  2412. obj.data = building.toJSON(message.data);
  2413. }
  2414. return obj;
  2415. },
  2416. create<I extends Exact<DeepPartial<buildingUpgradeRsp>, I>>(base?: I): buildingUpgradeRsp {
  2417. return buildingUpgradeRsp.fromPartial(base ?? ({} as any));
  2418. },
  2419. fromPartial<I extends Exact<DeepPartial<buildingUpgradeRsp>, I>>(object: I): buildingUpgradeRsp {
  2420. const message = createBasebuildingUpgradeRsp();
  2421. message.errno = object.errno ?? 0;
  2422. message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined;
  2423. return message;
  2424. },
  2425. };
  2426. function createBasebuildingOneKey(): buildingOneKey {
  2427. return {};
  2428. }
  2429. export const buildingOneKey = {
  2430. fromJSON(_: any): buildingOneKey {
  2431. return {};
  2432. },
  2433. toJSON(_: buildingOneKey): unknown {
  2434. const obj: any = {};
  2435. return obj;
  2436. },
  2437. create<I extends Exact<DeepPartial<buildingOneKey>, I>>(base?: I): buildingOneKey {
  2438. return buildingOneKey.fromPartial(base ?? ({} as any));
  2439. },
  2440. fromPartial<I extends Exact<DeepPartial<buildingOneKey>, I>>(_: I): buildingOneKey {
  2441. const message = createBasebuildingOneKey();
  2442. return message;
  2443. },
  2444. };
  2445. function createBasebuildingOneKeyRsp(): buildingOneKeyRsp {
  2446. return { errno: 0, list: [] };
  2447. }
  2448. export const buildingOneKeyRsp = {
  2449. fromJSON(object: any): buildingOneKeyRsp {
  2450. return {
  2451. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  2452. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => building.fromJSON(e)) : [],
  2453. };
  2454. },
  2455. toJSON(message: buildingOneKeyRsp): unknown {
  2456. const obj: any = {};
  2457. if (message.errno !== 0) {
  2458. obj.errno = Math.round(message.errno);
  2459. }
  2460. if (message.list?.length) {
  2461. obj.list = message.list.map((e) => building.toJSON(e));
  2462. }
  2463. return obj;
  2464. },
  2465. create<I extends Exact<DeepPartial<buildingOneKeyRsp>, I>>(base?: I): buildingOneKeyRsp {
  2466. return buildingOneKeyRsp.fromPartial(base ?? ({} as any));
  2467. },
  2468. fromPartial<I extends Exact<DeepPartial<buildingOneKeyRsp>, I>>(object: I): buildingOneKeyRsp {
  2469. const message = createBasebuildingOneKeyRsp();
  2470. message.errno = object.errno ?? 0;
  2471. message.list = object.list?.map((e) => building.fromPartial(e)) || [];
  2472. return message;
  2473. },
  2474. };
  2475. function createBaseadventureData(): adventureData {
  2476. return {};
  2477. }
  2478. export const adventureData = {
  2479. fromJSON(_: any): adventureData {
  2480. return {};
  2481. },
  2482. toJSON(_: adventureData): unknown {
  2483. const obj: any = {};
  2484. return obj;
  2485. },
  2486. create<I extends Exact<DeepPartial<adventureData>, I>>(base?: I): adventureData {
  2487. return adventureData.fromPartial(base ?? ({} as any));
  2488. },
  2489. fromPartial<I extends Exact<DeepPartial<adventureData>, I>>(_: I): adventureData {
  2490. const message = createBaseadventureData();
  2491. return message;
  2492. },
  2493. };
  2494. function createBaseadventureDataRsp(): adventureDataRsp {
  2495. return { errno: 0, id1: 0, award1: [], id2: 0, award2: [], type: 0, layer: 0, cost: 0 };
  2496. }
  2497. export const adventureDataRsp = {
  2498. fromJSON(object: any): adventureDataRsp {
  2499. return {
  2500. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  2501. id1: isSet(object.id1) ? globalThis.Number(object.id1) : 0,
  2502. award1: globalThis.Array.isArray(object?.award1) ? object.award1.map((e: any) => globalThis.Number(e)) : [],
  2503. id2: isSet(object.id2) ? globalThis.Number(object.id2) : 0,
  2504. award2: globalThis.Array.isArray(object?.award2) ? object.award2.map((e: any) => globalThis.Number(e)) : [],
  2505. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  2506. layer: isSet(object.layer) ? globalThis.Number(object.layer) : 0,
  2507. cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
  2508. };
  2509. },
  2510. toJSON(message: adventureDataRsp): unknown {
  2511. const obj: any = {};
  2512. if (message.errno !== 0) {
  2513. obj.errno = Math.round(message.errno);
  2514. }
  2515. if (message.id1 !== 0) {
  2516. obj.id1 = Math.round(message.id1);
  2517. }
  2518. if (message.award1?.length) {
  2519. obj.award1 = message.award1.map((e) => Math.round(e));
  2520. }
  2521. if (message.id2 !== 0) {
  2522. obj.id2 = Math.round(message.id2);
  2523. }
  2524. if (message.award2?.length) {
  2525. obj.award2 = message.award2.map((e) => Math.round(e));
  2526. }
  2527. if (message.type !== 0) {
  2528. obj.type = Math.round(message.type);
  2529. }
  2530. if (message.layer !== 0) {
  2531. obj.layer = Math.round(message.layer);
  2532. }
  2533. if (message.cost !== 0) {
  2534. obj.cost = Math.round(message.cost);
  2535. }
  2536. return obj;
  2537. },
  2538. create<I extends Exact<DeepPartial<adventureDataRsp>, I>>(base?: I): adventureDataRsp {
  2539. return adventureDataRsp.fromPartial(base ?? ({} as any));
  2540. },
  2541. fromPartial<I extends Exact<DeepPartial<adventureDataRsp>, I>>(object: I): adventureDataRsp {
  2542. const message = createBaseadventureDataRsp();
  2543. message.errno = object.errno ?? 0;
  2544. message.id1 = object.id1 ?? 0;
  2545. message.award1 = object.award1?.map((e) => e) || [];
  2546. message.id2 = object.id2 ?? 0;
  2547. message.award2 = object.award2?.map((e) => e) || [];
  2548. message.type = object.type ?? 0;
  2549. message.layer = object.layer ?? 0;
  2550. message.cost = object.cost ?? 0;
  2551. return message;
  2552. },
  2553. };
  2554. function createBaseadventureStart(): adventureStart {
  2555. return { id: 0, type: 0 };
  2556. }
  2557. export const adventureStart = {
  2558. fromJSON(object: any): adventureStart {
  2559. return {
  2560. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  2561. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  2562. };
  2563. },
  2564. toJSON(message: adventureStart): unknown {
  2565. const obj: any = {};
  2566. if (message.id !== 0) {
  2567. obj.id = Math.round(message.id);
  2568. }
  2569. if (message.type !== 0) {
  2570. obj.type = Math.round(message.type);
  2571. }
  2572. return obj;
  2573. },
  2574. create<I extends Exact<DeepPartial<adventureStart>, I>>(base?: I): adventureStart {
  2575. return adventureStart.fromPartial(base ?? ({} as any));
  2576. },
  2577. fromPartial<I extends Exact<DeepPartial<adventureStart>, I>>(object: I): adventureStart {
  2578. const message = createBaseadventureStart();
  2579. message.id = object.id ?? 0;
  2580. message.type = object.type ?? 0;
  2581. return message;
  2582. },
  2583. };
  2584. function createBaseadventureStartRsp(): adventureStartRsp {
  2585. return { errno: 0, btrial: false, trialId: 0, trialNum: 0 };
  2586. }
  2587. export const adventureStartRsp = {
  2588. fromJSON(object: any): adventureStartRsp {
  2589. return {
  2590. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  2591. btrial: isSet(object.btrial) ? globalThis.Boolean(object.btrial) : false,
  2592. trialId: isSet(object.trialId) ? globalThis.Number(object.trialId) : 0,
  2593. trialNum: isSet(object.trialNum) ? globalThis.Number(object.trialNum) : 0,
  2594. };
  2595. },
  2596. toJSON(message: adventureStartRsp): unknown {
  2597. const obj: any = {};
  2598. if (message.errno !== 0) {
  2599. obj.errno = Math.round(message.errno);
  2600. }
  2601. if (message.btrial !== false) {
  2602. obj.btrial = message.btrial;
  2603. }
  2604. if (message.trialId !== 0) {
  2605. obj.trialId = Math.round(message.trialId);
  2606. }
  2607. if (message.trialNum !== 0) {
  2608. obj.trialNum = Math.round(message.trialNum);
  2609. }
  2610. return obj;
  2611. },
  2612. create<I extends Exact<DeepPartial<adventureStartRsp>, I>>(base?: I): adventureStartRsp {
  2613. return adventureStartRsp.fromPartial(base ?? ({} as any));
  2614. },
  2615. fromPartial<I extends Exact<DeepPartial<adventureStartRsp>, I>>(object: I): adventureStartRsp {
  2616. const message = createBaseadventureStartRsp();
  2617. message.errno = object.errno ?? 0;
  2618. message.btrial = object.btrial ?? false;
  2619. message.trialId = object.trialId ?? 0;
  2620. message.trialNum = object.trialNum ?? 0;
  2621. return message;
  2622. },
  2623. };
  2624. function createBaseadventureEnd(): adventureEnd {
  2625. return { win: false, monsterNum: 0, bossNum: 0, eliteNum: 0 };
  2626. }
  2627. export const adventureEnd = {
  2628. fromJSON(object: any): adventureEnd {
  2629. return {
  2630. win: isSet(object.win) ? globalThis.Boolean(object.win) : false,
  2631. monsterNum: isSet(object.monsterNum) ? globalThis.Number(object.monsterNum) : 0,
  2632. bossNum: isSet(object.bossNum) ? globalThis.Number(object.bossNum) : 0,
  2633. eliteNum: isSet(object.eliteNum) ? globalThis.Number(object.eliteNum) : 0,
  2634. };
  2635. },
  2636. toJSON(message: adventureEnd): unknown {
  2637. const obj: any = {};
  2638. if (message.win !== false) {
  2639. obj.win = message.win;
  2640. }
  2641. if (message.monsterNum !== 0) {
  2642. obj.monsterNum = Math.round(message.monsterNum);
  2643. }
  2644. if (message.bossNum !== 0) {
  2645. obj.bossNum = Math.round(message.bossNum);
  2646. }
  2647. if (message.eliteNum !== 0) {
  2648. obj.eliteNum = Math.round(message.eliteNum);
  2649. }
  2650. return obj;
  2651. },
  2652. create<I extends Exact<DeepPartial<adventureEnd>, I>>(base?: I): adventureEnd {
  2653. return adventureEnd.fromPartial(base ?? ({} as any));
  2654. },
  2655. fromPartial<I extends Exact<DeepPartial<adventureEnd>, I>>(object: I): adventureEnd {
  2656. const message = createBaseadventureEnd();
  2657. message.win = object.win ?? false;
  2658. message.monsterNum = object.monsterNum ?? 0;
  2659. message.bossNum = object.bossNum ?? 0;
  2660. message.eliteNum = object.eliteNum ?? 0;
  2661. return message;
  2662. },
  2663. };
  2664. function createBaseadventureEndRsp(): adventureEndRsp {
  2665. return { errno: 0 };
  2666. }
  2667. export const adventureEndRsp = {
  2668. fromJSON(object: any): adventureEndRsp {
  2669. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  2670. },
  2671. toJSON(message: adventureEndRsp): unknown {
  2672. const obj: any = {};
  2673. if (message.errno !== 0) {
  2674. obj.errno = Math.round(message.errno);
  2675. }
  2676. return obj;
  2677. },
  2678. create<I extends Exact<DeepPartial<adventureEndRsp>, I>>(base?: I): adventureEndRsp {
  2679. return adventureEndRsp.fromPartial(base ?? ({} as any));
  2680. },
  2681. fromPartial<I extends Exact<DeepPartial<adventureEndRsp>, I>>(object: I): adventureEndRsp {
  2682. const message = createBaseadventureEndRsp();
  2683. message.errno = object.errno ?? 0;
  2684. return message;
  2685. },
  2686. };
  2687. function createBaseadventureLayer(): adventureLayer {
  2688. return { layer: 0, cost: 0, monsterNum: 0, bossNum: 0, eliteNum: 0 };
  2689. }
  2690. export const adventureLayer = {
  2691. fromJSON(object: any): adventureLayer {
  2692. return {
  2693. layer: isSet(object.layer) ? globalThis.Number(object.layer) : 0,
  2694. cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
  2695. monsterNum: isSet(object.monsterNum) ? globalThis.Number(object.monsterNum) : 0,
  2696. bossNum: isSet(object.bossNum) ? globalThis.Number(object.bossNum) : 0,
  2697. eliteNum: isSet(object.eliteNum) ? globalThis.Number(object.eliteNum) : 0,
  2698. };
  2699. },
  2700. toJSON(message: adventureLayer): unknown {
  2701. const obj: any = {};
  2702. if (message.layer !== 0) {
  2703. obj.layer = Math.round(message.layer);
  2704. }
  2705. if (message.cost !== 0) {
  2706. obj.cost = Math.round(message.cost);
  2707. }
  2708. if (message.monsterNum !== 0) {
  2709. obj.monsterNum = Math.round(message.monsterNum);
  2710. }
  2711. if (message.bossNum !== 0) {
  2712. obj.bossNum = Math.round(message.bossNum);
  2713. }
  2714. if (message.eliteNum !== 0) {
  2715. obj.eliteNum = Math.round(message.eliteNum);
  2716. }
  2717. return obj;
  2718. },
  2719. create<I extends Exact<DeepPartial<adventureLayer>, I>>(base?: I): adventureLayer {
  2720. return adventureLayer.fromPartial(base ?? ({} as any));
  2721. },
  2722. fromPartial<I extends Exact<DeepPartial<adventureLayer>, I>>(object: I): adventureLayer {
  2723. const message = createBaseadventureLayer();
  2724. message.layer = object.layer ?? 0;
  2725. message.cost = object.cost ?? 0;
  2726. message.monsterNum = object.monsterNum ?? 0;
  2727. message.bossNum = object.bossNum ?? 0;
  2728. message.eliteNum = object.eliteNum ?? 0;
  2729. return message;
  2730. },
  2731. };
  2732. function createBaseadventureLayerRsp(): adventureLayerRsp {
  2733. return { errno: 0 };
  2734. }
  2735. export const adventureLayerRsp = {
  2736. fromJSON(object: any): adventureLayerRsp {
  2737. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  2738. },
  2739. toJSON(message: adventureLayerRsp): unknown {
  2740. const obj: any = {};
  2741. if (message.errno !== 0) {
  2742. obj.errno = Math.round(message.errno);
  2743. }
  2744. return obj;
  2745. },
  2746. create<I extends Exact<DeepPartial<adventureLayerRsp>, I>>(base?: I): adventureLayerRsp {
  2747. return adventureLayerRsp.fromPartial(base ?? ({} as any));
  2748. },
  2749. fromPartial<I extends Exact<DeepPartial<adventureLayerRsp>, I>>(object: I): adventureLayerRsp {
  2750. const message = createBaseadventureLayerRsp();
  2751. message.errno = object.errno ?? 0;
  2752. return message;
  2753. },
  2754. };
  2755. function createBaseadventureSweep(): adventureSweep {
  2756. return { id: 0, type: 0 };
  2757. }
  2758. export const adventureSweep = {
  2759. fromJSON(object: any): adventureSweep {
  2760. return {
  2761. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  2762. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  2763. };
  2764. },
  2765. toJSON(message: adventureSweep): unknown {
  2766. const obj: any = {};
  2767. if (message.id !== 0) {
  2768. obj.id = Math.round(message.id);
  2769. }
  2770. if (message.type !== 0) {
  2771. obj.type = Math.round(message.type);
  2772. }
  2773. return obj;
  2774. },
  2775. create<I extends Exact<DeepPartial<adventureSweep>, I>>(base?: I): adventureSweep {
  2776. return adventureSweep.fromPartial(base ?? ({} as any));
  2777. },
  2778. fromPartial<I extends Exact<DeepPartial<adventureSweep>, I>>(object: I): adventureSweep {
  2779. const message = createBaseadventureSweep();
  2780. message.id = object.id ?? 0;
  2781. message.type = object.type ?? 0;
  2782. return message;
  2783. },
  2784. };
  2785. function createBaseadventureSweepRsp(): adventureSweepRsp {
  2786. return { errno: 0 };
  2787. }
  2788. export const adventureSweepRsp = {
  2789. fromJSON(object: any): adventureSweepRsp {
  2790. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  2791. },
  2792. toJSON(message: adventureSweepRsp): unknown {
  2793. const obj: any = {};
  2794. if (message.errno !== 0) {
  2795. obj.errno = Math.round(message.errno);
  2796. }
  2797. return obj;
  2798. },
  2799. create<I extends Exact<DeepPartial<adventureSweepRsp>, I>>(base?: I): adventureSweepRsp {
  2800. return adventureSweepRsp.fromPartial(base ?? ({} as any));
  2801. },
  2802. fromPartial<I extends Exact<DeepPartial<adventureSweepRsp>, I>>(object: I): adventureSweepRsp {
  2803. const message = createBaseadventureSweepRsp();
  2804. message.errno = object.errno ?? 0;
  2805. return message;
  2806. },
  2807. };
  2808. function createBaseadventurePassAward(): adventurePassAward {
  2809. return { id: 0, type: 0 };
  2810. }
  2811. export const adventurePassAward = {
  2812. fromJSON(object: any): adventurePassAward {
  2813. return {
  2814. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  2815. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  2816. };
  2817. },
  2818. toJSON(message: adventurePassAward): unknown {
  2819. const obj: any = {};
  2820. if (message.id !== 0) {
  2821. obj.id = Math.round(message.id);
  2822. }
  2823. if (message.type !== 0) {
  2824. obj.type = Math.round(message.type);
  2825. }
  2826. return obj;
  2827. },
  2828. create<I extends Exact<DeepPartial<adventurePassAward>, I>>(base?: I): adventurePassAward {
  2829. return adventurePassAward.fromPartial(base ?? ({} as any));
  2830. },
  2831. fromPartial<I extends Exact<DeepPartial<adventurePassAward>, I>>(object: I): adventurePassAward {
  2832. const message = createBaseadventurePassAward();
  2833. message.id = object.id ?? 0;
  2834. message.type = object.type ?? 0;
  2835. return message;
  2836. },
  2837. };
  2838. function createBaseadventurePassAwardRsp(): adventurePassAwardRsp {
  2839. return { errno: 0, id: 0, type: 0 };
  2840. }
  2841. export const adventurePassAwardRsp = {
  2842. fromJSON(object: any): adventurePassAwardRsp {
  2843. return {
  2844. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  2845. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  2846. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  2847. };
  2848. },
  2849. toJSON(message: adventurePassAwardRsp): unknown {
  2850. const obj: any = {};
  2851. if (message.errno !== 0) {
  2852. obj.errno = Math.round(message.errno);
  2853. }
  2854. if (message.id !== 0) {
  2855. obj.id = Math.round(message.id);
  2856. }
  2857. if (message.type !== 0) {
  2858. obj.type = Math.round(message.type);
  2859. }
  2860. return obj;
  2861. },
  2862. create<I extends Exact<DeepPartial<adventurePassAwardRsp>, I>>(base?: I): adventurePassAwardRsp {
  2863. return adventurePassAwardRsp.fromPartial(base ?? ({} as any));
  2864. },
  2865. fromPartial<I extends Exact<DeepPartial<adventurePassAwardRsp>, I>>(object: I): adventurePassAwardRsp {
  2866. const message = createBaseadventurePassAwardRsp();
  2867. message.errno = object.errno ?? 0;
  2868. message.id = object.id ?? 0;
  2869. message.type = object.type ?? 0;
  2870. return message;
  2871. },
  2872. };
  2873. function createBaseadventureAdAward(): adventureAdAward {
  2874. return {};
  2875. }
  2876. export const adventureAdAward = {
  2877. fromJSON(_: any): adventureAdAward {
  2878. return {};
  2879. },
  2880. toJSON(_: adventureAdAward): unknown {
  2881. const obj: any = {};
  2882. return obj;
  2883. },
  2884. create<I extends Exact<DeepPartial<adventureAdAward>, I>>(base?: I): adventureAdAward {
  2885. return adventureAdAward.fromPartial(base ?? ({} as any));
  2886. },
  2887. fromPartial<I extends Exact<DeepPartial<adventureAdAward>, I>>(_: I): adventureAdAward {
  2888. const message = createBaseadventureAdAward();
  2889. return message;
  2890. },
  2891. };
  2892. function createBaseadventureAdAwardRsp(): adventureAdAwardRsp {
  2893. return { errno: 0 };
  2894. }
  2895. export const adventureAdAwardRsp = {
  2896. fromJSON(object: any): adventureAdAwardRsp {
  2897. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  2898. },
  2899. toJSON(message: adventureAdAwardRsp): unknown {
  2900. const obj: any = {};
  2901. if (message.errno !== 0) {
  2902. obj.errno = Math.round(message.errno);
  2903. }
  2904. return obj;
  2905. },
  2906. create<I extends Exact<DeepPartial<adventureAdAwardRsp>, I>>(base?: I): adventureAdAwardRsp {
  2907. return adventureAdAwardRsp.fromPartial(base ?? ({} as any));
  2908. },
  2909. fromPartial<I extends Exact<DeepPartial<adventureAdAwardRsp>, I>>(object: I): adventureAdAwardRsp {
  2910. const message = createBaseadventureAdAwardRsp();
  2911. message.errno = object.errno ?? 0;
  2912. return message;
  2913. },
  2914. };
  2915. function createBaseadventureTrial(): adventureTrial {
  2916. return {};
  2917. }
  2918. export const adventureTrial = {
  2919. fromJSON(_: any): adventureTrial {
  2920. return {};
  2921. },
  2922. toJSON(_: adventureTrial): unknown {
  2923. const obj: any = {};
  2924. return obj;
  2925. },
  2926. create<I extends Exact<DeepPartial<adventureTrial>, I>>(base?: I): adventureTrial {
  2927. return adventureTrial.fromPartial(base ?? ({} as any));
  2928. },
  2929. fromPartial<I extends Exact<DeepPartial<adventureTrial>, I>>(_: I): adventureTrial {
  2930. const message = createBaseadventureTrial();
  2931. return message;
  2932. },
  2933. };
  2934. function createBaseadventureTrialRsp(): adventureTrialRsp {
  2935. return { errno: 0 };
  2936. }
  2937. export const adventureTrialRsp = {
  2938. fromJSON(object: any): adventureTrialRsp {
  2939. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  2940. },
  2941. toJSON(message: adventureTrialRsp): unknown {
  2942. const obj: any = {};
  2943. if (message.errno !== 0) {
  2944. obj.errno = Math.round(message.errno);
  2945. }
  2946. return obj;
  2947. },
  2948. create<I extends Exact<DeepPartial<adventureTrialRsp>, I>>(base?: I): adventureTrialRsp {
  2949. return adventureTrialRsp.fromPartial(base ?? ({} as any));
  2950. },
  2951. fromPartial<I extends Exact<DeepPartial<adventureTrialRsp>, I>>(object: I): adventureTrialRsp {
  2952. const message = createBaseadventureTrialRsp();
  2953. message.errno = object.errno ?? 0;
  2954. return message;
  2955. },
  2956. };
  2957. function createBasegetMail(): getMail {
  2958. return {};
  2959. }
  2960. export const getMail = {
  2961. fromJSON(_: any): getMail {
  2962. return {};
  2963. },
  2964. toJSON(_: getMail): unknown {
  2965. const obj: any = {};
  2966. return obj;
  2967. },
  2968. create<I extends Exact<DeepPartial<getMail>, I>>(base?: I): getMail {
  2969. return getMail.fromPartial(base ?? ({} as any));
  2970. },
  2971. fromPartial<I extends Exact<DeepPartial<getMail>, I>>(_: I): getMail {
  2972. const message = createBasegetMail();
  2973. return message;
  2974. },
  2975. };
  2976. function createBasegetMailRsp(): getMailRsp {
  2977. return { errno: 0, list: [] };
  2978. }
  2979. export const getMailRsp = {
  2980. fromJSON(object: any): getMailRsp {
  2981. return {
  2982. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  2983. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => mail.fromJSON(e)) : [],
  2984. };
  2985. },
  2986. toJSON(message: getMailRsp): unknown {
  2987. const obj: any = {};
  2988. if (message.errno !== 0) {
  2989. obj.errno = Math.round(message.errno);
  2990. }
  2991. if (message.list?.length) {
  2992. obj.list = message.list.map((e) => mail.toJSON(e));
  2993. }
  2994. return obj;
  2995. },
  2996. create<I extends Exact<DeepPartial<getMailRsp>, I>>(base?: I): getMailRsp {
  2997. return getMailRsp.fromPartial(base ?? ({} as any));
  2998. },
  2999. fromPartial<I extends Exact<DeepPartial<getMailRsp>, I>>(object: I): getMailRsp {
  3000. const message = createBasegetMailRsp();
  3001. message.errno = object.errno ?? 0;
  3002. message.list = object.list?.map((e) => mail.fromPartial(e)) || [];
  3003. return message;
  3004. },
  3005. };
  3006. function createBasegetMailGoods(): getMailGoods {
  3007. return { list: [], bonekey: false };
  3008. }
  3009. export const getMailGoods = {
  3010. fromJSON(object: any): getMailGoods {
  3011. return {
  3012. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [],
  3013. bonekey: isSet(object.bonekey) ? globalThis.Boolean(object.bonekey) : false,
  3014. };
  3015. },
  3016. toJSON(message: getMailGoods): unknown {
  3017. const obj: any = {};
  3018. if (message.list?.length) {
  3019. obj.list = message.list;
  3020. }
  3021. if (message.bonekey !== false) {
  3022. obj.bonekey = message.bonekey;
  3023. }
  3024. return obj;
  3025. },
  3026. create<I extends Exact<DeepPartial<getMailGoods>, I>>(base?: I): getMailGoods {
  3027. return getMailGoods.fromPartial(base ?? ({} as any));
  3028. },
  3029. fromPartial<I extends Exact<DeepPartial<getMailGoods>, I>>(object: I): getMailGoods {
  3030. const message = createBasegetMailGoods();
  3031. message.list = object.list?.map((e) => e) || [];
  3032. message.bonekey = object.bonekey ?? false;
  3033. return message;
  3034. },
  3035. };
  3036. function createBasegetMailGoodsRsp(): getMailGoodsRsp {
  3037. return { errno: 0, list: [] };
  3038. }
  3039. export const getMailGoodsRsp = {
  3040. fromJSON(object: any): getMailGoodsRsp {
  3041. return {
  3042. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3043. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [],
  3044. };
  3045. },
  3046. toJSON(message: getMailGoodsRsp): unknown {
  3047. const obj: any = {};
  3048. if (message.errno !== 0) {
  3049. obj.errno = Math.round(message.errno);
  3050. }
  3051. if (message.list?.length) {
  3052. obj.list = message.list;
  3053. }
  3054. return obj;
  3055. },
  3056. create<I extends Exact<DeepPartial<getMailGoodsRsp>, I>>(base?: I): getMailGoodsRsp {
  3057. return getMailGoodsRsp.fromPartial(base ?? ({} as any));
  3058. },
  3059. fromPartial<I extends Exact<DeepPartial<getMailGoodsRsp>, I>>(object: I): getMailGoodsRsp {
  3060. const message = createBasegetMailGoodsRsp();
  3061. message.errno = object.errno ?? 0;
  3062. message.list = object.list?.map((e) => e) || [];
  3063. return message;
  3064. },
  3065. };
  3066. function createBasedelMail(): delMail {
  3067. return { list: [] };
  3068. }
  3069. export const delMail = {
  3070. fromJSON(object: any): delMail {
  3071. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [] };
  3072. },
  3073. toJSON(message: delMail): unknown {
  3074. const obj: any = {};
  3075. if (message.list?.length) {
  3076. obj.list = message.list;
  3077. }
  3078. return obj;
  3079. },
  3080. create<I extends Exact<DeepPartial<delMail>, I>>(base?: I): delMail {
  3081. return delMail.fromPartial(base ?? ({} as any));
  3082. },
  3083. fromPartial<I extends Exact<DeepPartial<delMail>, I>>(object: I): delMail {
  3084. const message = createBasedelMail();
  3085. message.list = object.list?.map((e) => e) || [];
  3086. return message;
  3087. },
  3088. };
  3089. function createBasedelMailRsp(): delMailRsp {
  3090. return { errno: 0, list: [] };
  3091. }
  3092. export const delMailRsp = {
  3093. fromJSON(object: any): delMailRsp {
  3094. return {
  3095. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3096. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [],
  3097. };
  3098. },
  3099. toJSON(message: delMailRsp): unknown {
  3100. const obj: any = {};
  3101. if (message.errno !== 0) {
  3102. obj.errno = Math.round(message.errno);
  3103. }
  3104. if (message.list?.length) {
  3105. obj.list = message.list;
  3106. }
  3107. return obj;
  3108. },
  3109. create<I extends Exact<DeepPartial<delMailRsp>, I>>(base?: I): delMailRsp {
  3110. return delMailRsp.fromPartial(base ?? ({} as any));
  3111. },
  3112. fromPartial<I extends Exact<DeepPartial<delMailRsp>, I>>(object: I): delMailRsp {
  3113. const message = createBasedelMailRsp();
  3114. message.errno = object.errno ?? 0;
  3115. message.list = object.list?.map((e) => e) || [];
  3116. return message;
  3117. },
  3118. };
  3119. function createBaseflagMail(): flagMail {
  3120. return { list: [] };
  3121. }
  3122. export const flagMail = {
  3123. fromJSON(object: any): flagMail {
  3124. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [] };
  3125. },
  3126. toJSON(message: flagMail): unknown {
  3127. const obj: any = {};
  3128. if (message.list?.length) {
  3129. obj.list = message.list;
  3130. }
  3131. return obj;
  3132. },
  3133. create<I extends Exact<DeepPartial<flagMail>, I>>(base?: I): flagMail {
  3134. return flagMail.fromPartial(base ?? ({} as any));
  3135. },
  3136. fromPartial<I extends Exact<DeepPartial<flagMail>, I>>(object: I): flagMail {
  3137. const message = createBaseflagMail();
  3138. message.list = object.list?.map((e) => e) || [];
  3139. return message;
  3140. },
  3141. };
  3142. function createBaseflagMailRsp(): flagMailRsp {
  3143. return { errno: 0 };
  3144. }
  3145. export const flagMailRsp = {
  3146. fromJSON(object: any): flagMailRsp {
  3147. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  3148. },
  3149. toJSON(message: flagMailRsp): unknown {
  3150. const obj: any = {};
  3151. if (message.errno !== 0) {
  3152. obj.errno = Math.round(message.errno);
  3153. }
  3154. return obj;
  3155. },
  3156. create<I extends Exact<DeepPartial<flagMailRsp>, I>>(base?: I): flagMailRsp {
  3157. return flagMailRsp.fromPartial(base ?? ({} as any));
  3158. },
  3159. fromPartial<I extends Exact<DeepPartial<flagMailRsp>, I>>(object: I): flagMailRsp {
  3160. const message = createBaseflagMailRsp();
  3161. message.errno = object.errno ?? 0;
  3162. return message;
  3163. },
  3164. };
  3165. function createBasesendMail(): sendMail {
  3166. return { list: [] };
  3167. }
  3168. export const sendMail = {
  3169. fromJSON(object: any): sendMail {
  3170. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => mail.fromJSON(e)) : [] };
  3171. },
  3172. toJSON(message: sendMail): unknown {
  3173. const obj: any = {};
  3174. if (message.list?.length) {
  3175. obj.list = message.list.map((e) => mail.toJSON(e));
  3176. }
  3177. return obj;
  3178. },
  3179. create<I extends Exact<DeepPartial<sendMail>, I>>(base?: I): sendMail {
  3180. return sendMail.fromPartial(base ?? ({} as any));
  3181. },
  3182. fromPartial<I extends Exact<DeepPartial<sendMail>, I>>(object: I): sendMail {
  3183. const message = createBasesendMail();
  3184. message.list = object.list?.map((e) => mail.fromPartial(e)) || [];
  3185. return message;
  3186. },
  3187. };
  3188. function createBasesimpleMail(): simpleMail {
  3189. return { num: 0, noread: 0, needread: 0 };
  3190. }
  3191. export const simpleMail = {
  3192. fromJSON(object: any): simpleMail {
  3193. return {
  3194. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  3195. noread: isSet(object.noread) ? globalThis.Number(object.noread) : 0,
  3196. needread: isSet(object.needread) ? globalThis.Number(object.needread) : 0,
  3197. };
  3198. },
  3199. toJSON(message: simpleMail): unknown {
  3200. const obj: any = {};
  3201. if (message.num !== 0) {
  3202. obj.num = Math.round(message.num);
  3203. }
  3204. if (message.noread !== 0) {
  3205. obj.noread = Math.round(message.noread);
  3206. }
  3207. if (message.needread !== 0) {
  3208. obj.needread = Math.round(message.needread);
  3209. }
  3210. return obj;
  3211. },
  3212. create<I extends Exact<DeepPartial<simpleMail>, I>>(base?: I): simpleMail {
  3213. return simpleMail.fromPartial(base ?? ({} as any));
  3214. },
  3215. fromPartial<I extends Exact<DeepPartial<simpleMail>, I>>(object: I): simpleMail {
  3216. const message = createBasesimpleMail();
  3217. message.num = object.num ?? 0;
  3218. message.noread = object.noread ?? 0;
  3219. message.needread = object.needread ?? 0;
  3220. return message;
  3221. },
  3222. };
  3223. function createBaseembattleGetData(): embattleGetData {
  3224. return {};
  3225. }
  3226. export const embattleGetData = {
  3227. fromJSON(_: any): embattleGetData {
  3228. return {};
  3229. },
  3230. toJSON(_: embattleGetData): unknown {
  3231. const obj: any = {};
  3232. return obj;
  3233. },
  3234. create<I extends Exact<DeepPartial<embattleGetData>, I>>(base?: I): embattleGetData {
  3235. return embattleGetData.fromPartial(base ?? ({} as any));
  3236. },
  3237. fromPartial<I extends Exact<DeepPartial<embattleGetData>, I>>(_: I): embattleGetData {
  3238. const message = createBaseembattleGetData();
  3239. return message;
  3240. },
  3241. };
  3242. function createBaseembattleGetDataRsp(): embattleGetDataRsp {
  3243. return { errno: 0, list: [], cardList: [] };
  3244. }
  3245. export const embattleGetDataRsp = {
  3246. fromJSON(object: any): embattleGetDataRsp {
  3247. return {
  3248. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3249. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => sidPos.fromJSON(e)) : [],
  3250. cardList: globalThis.Array.isArray(object?.cardList) ? object.cardList.map((e: any) => sidPos.fromJSON(e)) : [],
  3251. };
  3252. },
  3253. toJSON(message: embattleGetDataRsp): unknown {
  3254. const obj: any = {};
  3255. if (message.errno !== 0) {
  3256. obj.errno = Math.round(message.errno);
  3257. }
  3258. if (message.list?.length) {
  3259. obj.list = message.list.map((e) => sidPos.toJSON(e));
  3260. }
  3261. if (message.cardList?.length) {
  3262. obj.cardList = message.cardList.map((e) => sidPos.toJSON(e));
  3263. }
  3264. return obj;
  3265. },
  3266. create<I extends Exact<DeepPartial<embattleGetDataRsp>, I>>(base?: I): embattleGetDataRsp {
  3267. return embattleGetDataRsp.fromPartial(base ?? ({} as any));
  3268. },
  3269. fromPartial<I extends Exact<DeepPartial<embattleGetDataRsp>, I>>(object: I): embattleGetDataRsp {
  3270. const message = createBaseembattleGetDataRsp();
  3271. message.errno = object.errno ?? 0;
  3272. message.list = object.list?.map((e) => sidPos.fromPartial(e)) || [];
  3273. message.cardList = object.cardList?.map((e) => sidPos.fromPartial(e)) || [];
  3274. return message;
  3275. },
  3276. };
  3277. function createBaseembattleBattle(): embattleBattle {
  3278. return { skill: false, sid: "", pos: 0 };
  3279. }
  3280. export const embattleBattle = {
  3281. fromJSON(object: any): embattleBattle {
  3282. return {
  3283. skill: isSet(object.skill) ? globalThis.Boolean(object.skill) : false,
  3284. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  3285. pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0,
  3286. };
  3287. },
  3288. toJSON(message: embattleBattle): unknown {
  3289. const obj: any = {};
  3290. if (message.skill !== false) {
  3291. obj.skill = message.skill;
  3292. }
  3293. if (message.sid !== "") {
  3294. obj.sid = message.sid;
  3295. }
  3296. if (message.pos !== 0) {
  3297. obj.pos = Math.round(message.pos);
  3298. }
  3299. return obj;
  3300. },
  3301. create<I extends Exact<DeepPartial<embattleBattle>, I>>(base?: I): embattleBattle {
  3302. return embattleBattle.fromPartial(base ?? ({} as any));
  3303. },
  3304. fromPartial<I extends Exact<DeepPartial<embattleBattle>, I>>(object: I): embattleBattle {
  3305. const message = createBaseembattleBattle();
  3306. message.skill = object.skill ?? false;
  3307. message.sid = object.sid ?? "";
  3308. message.pos = object.pos ?? 0;
  3309. return message;
  3310. },
  3311. };
  3312. function createBaseembattleBattleRsp(): embattleBattleRsp {
  3313. return { errno: 0, list: [], cardList: [] };
  3314. }
  3315. export const embattleBattleRsp = {
  3316. fromJSON(object: any): embattleBattleRsp {
  3317. return {
  3318. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3319. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => sidPos.fromJSON(e)) : [],
  3320. cardList: globalThis.Array.isArray(object?.cardList) ? object.cardList.map((e: any) => sidPos.fromJSON(e)) : [],
  3321. };
  3322. },
  3323. toJSON(message: embattleBattleRsp): unknown {
  3324. const obj: any = {};
  3325. if (message.errno !== 0) {
  3326. obj.errno = Math.round(message.errno);
  3327. }
  3328. if (message.list?.length) {
  3329. obj.list = message.list.map((e) => sidPos.toJSON(e));
  3330. }
  3331. if (message.cardList?.length) {
  3332. obj.cardList = message.cardList.map((e) => sidPos.toJSON(e));
  3333. }
  3334. return obj;
  3335. },
  3336. create<I extends Exact<DeepPartial<embattleBattleRsp>, I>>(base?: I): embattleBattleRsp {
  3337. return embattleBattleRsp.fromPartial(base ?? ({} as any));
  3338. },
  3339. fromPartial<I extends Exact<DeepPartial<embattleBattleRsp>, I>>(object: I): embattleBattleRsp {
  3340. const message = createBaseembattleBattleRsp();
  3341. message.errno = object.errno ?? 0;
  3342. message.list = object.list?.map((e) => sidPos.fromPartial(e)) || [];
  3343. message.cardList = object.cardList?.map((e) => sidPos.fromPartial(e)) || [];
  3344. return message;
  3345. },
  3346. };
  3347. function createBaseheroGetData(): heroGetData {
  3348. return {};
  3349. }
  3350. export const heroGetData = {
  3351. fromJSON(_: any): heroGetData {
  3352. return {};
  3353. },
  3354. toJSON(_: heroGetData): unknown {
  3355. const obj: any = {};
  3356. return obj;
  3357. },
  3358. create<I extends Exact<DeepPartial<heroGetData>, I>>(base?: I): heroGetData {
  3359. return heroGetData.fromPartial(base ?? ({} as any));
  3360. },
  3361. fromPartial<I extends Exact<DeepPartial<heroGetData>, I>>(_: I): heroGetData {
  3362. const message = createBaseheroGetData();
  3363. return message;
  3364. },
  3365. };
  3366. function createBaseheroGetDataRsp(): heroGetDataRsp {
  3367. return { errno: 0, list: [] };
  3368. }
  3369. export const heroGetDataRsp = {
  3370. fromJSON(object: any): heroGetDataRsp {
  3371. return {
  3372. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3373. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => hero.fromJSON(e)) : [],
  3374. };
  3375. },
  3376. toJSON(message: heroGetDataRsp): unknown {
  3377. const obj: any = {};
  3378. if (message.errno !== 0) {
  3379. obj.errno = Math.round(message.errno);
  3380. }
  3381. if (message.list?.length) {
  3382. obj.list = message.list.map((e) => hero.toJSON(e));
  3383. }
  3384. return obj;
  3385. },
  3386. create<I extends Exact<DeepPartial<heroGetDataRsp>, I>>(base?: I): heroGetDataRsp {
  3387. return heroGetDataRsp.fromPartial(base ?? ({} as any));
  3388. },
  3389. fromPartial<I extends Exact<DeepPartial<heroGetDataRsp>, I>>(object: I): heroGetDataRsp {
  3390. const message = createBaseheroGetDataRsp();
  3391. message.errno = object.errno ?? 0;
  3392. message.list = object.list?.map((e) => hero.fromPartial(e)) || [];
  3393. return message;
  3394. },
  3395. };
  3396. function createBaseheroUpgrade(): heroUpgrade {
  3397. return { sid: "", num: 0 };
  3398. }
  3399. export const heroUpgrade = {
  3400. fromJSON(object: any): heroUpgrade {
  3401. return {
  3402. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  3403. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  3404. };
  3405. },
  3406. toJSON(message: heroUpgrade): unknown {
  3407. const obj: any = {};
  3408. if (message.sid !== "") {
  3409. obj.sid = message.sid;
  3410. }
  3411. if (message.num !== 0) {
  3412. obj.num = Math.round(message.num);
  3413. }
  3414. return obj;
  3415. },
  3416. create<I extends Exact<DeepPartial<heroUpgrade>, I>>(base?: I): heroUpgrade {
  3417. return heroUpgrade.fromPartial(base ?? ({} as any));
  3418. },
  3419. fromPartial<I extends Exact<DeepPartial<heroUpgrade>, I>>(object: I): heroUpgrade {
  3420. const message = createBaseheroUpgrade();
  3421. message.sid = object.sid ?? "";
  3422. message.num = object.num ?? 0;
  3423. return message;
  3424. },
  3425. };
  3426. function createBaseheroUpgradeRsp(): heroUpgradeRsp {
  3427. return { errno: 0, data: undefined };
  3428. }
  3429. export const heroUpgradeRsp = {
  3430. fromJSON(object: any): heroUpgradeRsp {
  3431. return {
  3432. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3433. data: isSet(object.data) ? hero.fromJSON(object.data) : undefined,
  3434. };
  3435. },
  3436. toJSON(message: heroUpgradeRsp): unknown {
  3437. const obj: any = {};
  3438. if (message.errno !== 0) {
  3439. obj.errno = Math.round(message.errno);
  3440. }
  3441. if (message.data !== undefined) {
  3442. obj.data = hero.toJSON(message.data);
  3443. }
  3444. return obj;
  3445. },
  3446. create<I extends Exact<DeepPartial<heroUpgradeRsp>, I>>(base?: I): heroUpgradeRsp {
  3447. return heroUpgradeRsp.fromPartial(base ?? ({} as any));
  3448. },
  3449. fromPartial<I extends Exact<DeepPartial<heroUpgradeRsp>, I>>(object: I): heroUpgradeRsp {
  3450. const message = createBaseheroUpgradeRsp();
  3451. message.errno = object.errno ?? 0;
  3452. message.data = (object.data !== undefined && object.data !== null) ? hero.fromPartial(object.data) : undefined;
  3453. return message;
  3454. },
  3455. };
  3456. function createBaseheroUpgradeStar(): heroUpgradeStar {
  3457. return { sid: "", same: [], other: [], currency: undefined };
  3458. }
  3459. export const heroUpgradeStar = {
  3460. fromJSON(object: any): heroUpgradeStar {
  3461. return {
  3462. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  3463. same: globalThis.Array.isArray(object?.same) ? object.same.map((e: any) => globalThis.String(e)) : [],
  3464. other: globalThis.Array.isArray(object?.other) ? object.other.map((e: any) => globalThis.String(e)) : [],
  3465. currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined,
  3466. };
  3467. },
  3468. toJSON(message: heroUpgradeStar): unknown {
  3469. const obj: any = {};
  3470. if (message.sid !== "") {
  3471. obj.sid = message.sid;
  3472. }
  3473. if (message.same?.length) {
  3474. obj.same = message.same;
  3475. }
  3476. if (message.other?.length) {
  3477. obj.other = message.other;
  3478. }
  3479. if (message.currency !== undefined) {
  3480. obj.currency = idNum.toJSON(message.currency);
  3481. }
  3482. return obj;
  3483. },
  3484. create<I extends Exact<DeepPartial<heroUpgradeStar>, I>>(base?: I): heroUpgradeStar {
  3485. return heroUpgradeStar.fromPartial(base ?? ({} as any));
  3486. },
  3487. fromPartial<I extends Exact<DeepPartial<heroUpgradeStar>, I>>(object: I): heroUpgradeStar {
  3488. const message = createBaseheroUpgradeStar();
  3489. message.sid = object.sid ?? "";
  3490. message.same = object.same?.map((e) => e) || [];
  3491. message.other = object.other?.map((e) => e) || [];
  3492. message.currency = (object.currency !== undefined && object.currency !== null)
  3493. ? idNum.fromPartial(object.currency)
  3494. : undefined;
  3495. return message;
  3496. },
  3497. };
  3498. function createBaseheroUpgradeStarRsp(): heroUpgradeStarRsp {
  3499. return { errno: 0, data: undefined, same: [], other: [], currency: undefined };
  3500. }
  3501. export const heroUpgradeStarRsp = {
  3502. fromJSON(object: any): heroUpgradeStarRsp {
  3503. return {
  3504. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3505. data: isSet(object.data) ? hero.fromJSON(object.data) : undefined,
  3506. same: globalThis.Array.isArray(object?.same) ? object.same.map((e: any) => globalThis.String(e)) : [],
  3507. other: globalThis.Array.isArray(object?.other) ? object.other.map((e: any) => globalThis.String(e)) : [],
  3508. currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined,
  3509. };
  3510. },
  3511. toJSON(message: heroUpgradeStarRsp): unknown {
  3512. const obj: any = {};
  3513. if (message.errno !== 0) {
  3514. obj.errno = Math.round(message.errno);
  3515. }
  3516. if (message.data !== undefined) {
  3517. obj.data = hero.toJSON(message.data);
  3518. }
  3519. if (message.same?.length) {
  3520. obj.same = message.same;
  3521. }
  3522. if (message.other?.length) {
  3523. obj.other = message.other;
  3524. }
  3525. if (message.currency !== undefined) {
  3526. obj.currency = idNum.toJSON(message.currency);
  3527. }
  3528. return obj;
  3529. },
  3530. create<I extends Exact<DeepPartial<heroUpgradeStarRsp>, I>>(base?: I): heroUpgradeStarRsp {
  3531. return heroUpgradeStarRsp.fromPartial(base ?? ({} as any));
  3532. },
  3533. fromPartial<I extends Exact<DeepPartial<heroUpgradeStarRsp>, I>>(object: I): heroUpgradeStarRsp {
  3534. const message = createBaseheroUpgradeStarRsp();
  3535. message.errno = object.errno ?? 0;
  3536. message.data = (object.data !== undefined && object.data !== null) ? hero.fromPartial(object.data) : undefined;
  3537. message.same = object.same?.map((e) => e) || [];
  3538. message.other = object.other?.map((e) => e) || [];
  3539. message.currency = (object.currency !== undefined && object.currency !== null)
  3540. ? idNum.fromPartial(object.currency)
  3541. : undefined;
  3542. return message;
  3543. },
  3544. };
  3545. function createBaseheroOnekeyUpgradeStar(): heroOnekeyUpgradeStar {
  3546. return {};
  3547. }
  3548. export const heroOnekeyUpgradeStar = {
  3549. fromJSON(_: any): heroOnekeyUpgradeStar {
  3550. return {};
  3551. },
  3552. toJSON(_: heroOnekeyUpgradeStar): unknown {
  3553. const obj: any = {};
  3554. return obj;
  3555. },
  3556. create<I extends Exact<DeepPartial<heroOnekeyUpgradeStar>, I>>(base?: I): heroOnekeyUpgradeStar {
  3557. return heroOnekeyUpgradeStar.fromPartial(base ?? ({} as any));
  3558. },
  3559. fromPartial<I extends Exact<DeepPartial<heroOnekeyUpgradeStar>, I>>(_: I): heroOnekeyUpgradeStar {
  3560. const message = createBaseheroOnekeyUpgradeStar();
  3561. return message;
  3562. },
  3563. };
  3564. function createBaseheroOnekeyUpgradeStarRsp(): heroOnekeyUpgradeStarRsp {
  3565. return { errno: 0, delList: [], changeList: [] };
  3566. }
  3567. export const heroOnekeyUpgradeStarRsp = {
  3568. fromJSON(object: any): heroOnekeyUpgradeStarRsp {
  3569. return {
  3570. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3571. delList: globalThis.Array.isArray(object?.delList) ? object.delList.map((e: any) => globalThis.String(e)) : [],
  3572. changeList: globalThis.Array.isArray(object?.changeList)
  3573. ? object.changeList.map((e: any) => hero.fromJSON(e))
  3574. : [],
  3575. };
  3576. },
  3577. toJSON(message: heroOnekeyUpgradeStarRsp): unknown {
  3578. const obj: any = {};
  3579. if (message.errno !== 0) {
  3580. obj.errno = Math.round(message.errno);
  3581. }
  3582. if (message.delList?.length) {
  3583. obj.delList = message.delList;
  3584. }
  3585. if (message.changeList?.length) {
  3586. obj.changeList = message.changeList.map((e) => hero.toJSON(e));
  3587. }
  3588. return obj;
  3589. },
  3590. create<I extends Exact<DeepPartial<heroOnekeyUpgradeStarRsp>, I>>(base?: I): heroOnekeyUpgradeStarRsp {
  3591. return heroOnekeyUpgradeStarRsp.fromPartial(base ?? ({} as any));
  3592. },
  3593. fromPartial<I extends Exact<DeepPartial<heroOnekeyUpgradeStarRsp>, I>>(object: I): heroOnekeyUpgradeStarRsp {
  3594. const message = createBaseheroOnekeyUpgradeStarRsp();
  3595. message.errno = object.errno ?? 0;
  3596. message.delList = object.delList?.map((e) => e) || [];
  3597. message.changeList = object.changeList?.map((e) => hero.fromPartial(e)) || [];
  3598. return message;
  3599. },
  3600. };
  3601. function createBaseheroReset(): heroReset {
  3602. return { level: false, sid: "" };
  3603. }
  3604. export const heroReset = {
  3605. fromJSON(object: any): heroReset {
  3606. return {
  3607. level: isSet(object.level) ? globalThis.Boolean(object.level) : false,
  3608. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  3609. };
  3610. },
  3611. toJSON(message: heroReset): unknown {
  3612. const obj: any = {};
  3613. if (message.level !== false) {
  3614. obj.level = message.level;
  3615. }
  3616. if (message.sid !== "") {
  3617. obj.sid = message.sid;
  3618. }
  3619. return obj;
  3620. },
  3621. create<I extends Exact<DeepPartial<heroReset>, I>>(base?: I): heroReset {
  3622. return heroReset.fromPartial(base ?? ({} as any));
  3623. },
  3624. fromPartial<I extends Exact<DeepPartial<heroReset>, I>>(object: I): heroReset {
  3625. const message = createBaseheroReset();
  3626. message.level = object.level ?? false;
  3627. message.sid = object.sid ?? "";
  3628. return message;
  3629. },
  3630. };
  3631. function createBaseheroResetRsp(): heroResetRsp {
  3632. return { errno: 0, data: undefined };
  3633. }
  3634. export const heroResetRsp = {
  3635. fromJSON(object: any): heroResetRsp {
  3636. return {
  3637. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3638. data: isSet(object.data) ? hero.fromJSON(object.data) : undefined,
  3639. };
  3640. },
  3641. toJSON(message: heroResetRsp): unknown {
  3642. const obj: any = {};
  3643. if (message.errno !== 0) {
  3644. obj.errno = Math.round(message.errno);
  3645. }
  3646. if (message.data !== undefined) {
  3647. obj.data = hero.toJSON(message.data);
  3648. }
  3649. return obj;
  3650. },
  3651. create<I extends Exact<DeepPartial<heroResetRsp>, I>>(base?: I): heroResetRsp {
  3652. return heroResetRsp.fromPartial(base ?? ({} as any));
  3653. },
  3654. fromPartial<I extends Exact<DeepPartial<heroResetRsp>, I>>(object: I): heroResetRsp {
  3655. const message = createBaseheroResetRsp();
  3656. message.errno = object.errno ?? 0;
  3657. message.data = (object.data !== undefined && object.data !== null) ? hero.fromPartial(object.data) : undefined;
  3658. return message;
  3659. },
  3660. };
  3661. function createBaseheroWearEquip(): heroWearEquip {
  3662. return { sid: "", list: [] };
  3663. }
  3664. export const heroWearEquip = {
  3665. fromJSON(object: any): heroWearEquip {
  3666. return {
  3667. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  3668. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [],
  3669. };
  3670. },
  3671. toJSON(message: heroWearEquip): unknown {
  3672. const obj: any = {};
  3673. if (message.sid !== "") {
  3674. obj.sid = message.sid;
  3675. }
  3676. if (message.list?.length) {
  3677. obj.list = message.list;
  3678. }
  3679. return obj;
  3680. },
  3681. create<I extends Exact<DeepPartial<heroWearEquip>, I>>(base?: I): heroWearEquip {
  3682. return heroWearEquip.fromPartial(base ?? ({} as any));
  3683. },
  3684. fromPartial<I extends Exact<DeepPartial<heroWearEquip>, I>>(object: I): heroWearEquip {
  3685. const message = createBaseheroWearEquip();
  3686. message.sid = object.sid ?? "";
  3687. message.list = object.list?.map((e) => e) || [];
  3688. return message;
  3689. },
  3690. };
  3691. function createBaseheroWearEquipRsp(): heroWearEquipRsp {
  3692. return { errno: 0, list: [], data: undefined };
  3693. }
  3694. export const heroWearEquipRsp = {
  3695. fromJSON(object: any): heroWearEquipRsp {
  3696. return {
  3697. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3698. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [],
  3699. data: isSet(object.data) ? hero.fromJSON(object.data) : undefined,
  3700. };
  3701. },
  3702. toJSON(message: heroWearEquipRsp): unknown {
  3703. const obj: any = {};
  3704. if (message.errno !== 0) {
  3705. obj.errno = Math.round(message.errno);
  3706. }
  3707. if (message.list?.length) {
  3708. obj.list = message.list;
  3709. }
  3710. if (message.data !== undefined) {
  3711. obj.data = hero.toJSON(message.data);
  3712. }
  3713. return obj;
  3714. },
  3715. create<I extends Exact<DeepPartial<heroWearEquipRsp>, I>>(base?: I): heroWearEquipRsp {
  3716. return heroWearEquipRsp.fromPartial(base ?? ({} as any));
  3717. },
  3718. fromPartial<I extends Exact<DeepPartial<heroWearEquipRsp>, I>>(object: I): heroWearEquipRsp {
  3719. const message = createBaseheroWearEquipRsp();
  3720. message.errno = object.errno ?? 0;
  3721. message.list = object.list?.map((e) => e) || [];
  3722. message.data = (object.data !== undefined && object.data !== null) ? hero.fromPartial(object.data) : undefined;
  3723. return message;
  3724. },
  3725. };
  3726. function createBaseheroChangeNty(): heroChangeNty {
  3727. return { list: [] };
  3728. }
  3729. export const heroChangeNty = {
  3730. fromJSON(object: any): heroChangeNty {
  3731. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => hero.fromJSON(e)) : [] };
  3732. },
  3733. toJSON(message: heroChangeNty): unknown {
  3734. const obj: any = {};
  3735. if (message.list?.length) {
  3736. obj.list = message.list.map((e) => hero.toJSON(e));
  3737. }
  3738. return obj;
  3739. },
  3740. create<I extends Exact<DeepPartial<heroChangeNty>, I>>(base?: I): heroChangeNty {
  3741. return heroChangeNty.fromPartial(base ?? ({} as any));
  3742. },
  3743. fromPartial<I extends Exact<DeepPartial<heroChangeNty>, I>>(object: I): heroChangeNty {
  3744. const message = createBaseheroChangeNty();
  3745. message.list = object.list?.map((e) => hero.fromPartial(e)) || [];
  3746. return message;
  3747. },
  3748. };
  3749. function createBaseskillCardGetData(): skillCardGetData {
  3750. return {};
  3751. }
  3752. export const skillCardGetData = {
  3753. fromJSON(_: any): skillCardGetData {
  3754. return {};
  3755. },
  3756. toJSON(_: skillCardGetData): unknown {
  3757. const obj: any = {};
  3758. return obj;
  3759. },
  3760. create<I extends Exact<DeepPartial<skillCardGetData>, I>>(base?: I): skillCardGetData {
  3761. return skillCardGetData.fromPartial(base ?? ({} as any));
  3762. },
  3763. fromPartial<I extends Exact<DeepPartial<skillCardGetData>, I>>(_: I): skillCardGetData {
  3764. const message = createBaseskillCardGetData();
  3765. return message;
  3766. },
  3767. };
  3768. function createBaseskillCardGetDataRsp(): skillCardGetDataRsp {
  3769. return { errno: 0, list: [] };
  3770. }
  3771. export const skillCardGetDataRsp = {
  3772. fromJSON(object: any): skillCardGetDataRsp {
  3773. return {
  3774. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3775. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => card.fromJSON(e)) : [],
  3776. };
  3777. },
  3778. toJSON(message: skillCardGetDataRsp): unknown {
  3779. const obj: any = {};
  3780. if (message.errno !== 0) {
  3781. obj.errno = Math.round(message.errno);
  3782. }
  3783. if (message.list?.length) {
  3784. obj.list = message.list.map((e) => card.toJSON(e));
  3785. }
  3786. return obj;
  3787. },
  3788. create<I extends Exact<DeepPartial<skillCardGetDataRsp>, I>>(base?: I): skillCardGetDataRsp {
  3789. return skillCardGetDataRsp.fromPartial(base ?? ({} as any));
  3790. },
  3791. fromPartial<I extends Exact<DeepPartial<skillCardGetDataRsp>, I>>(object: I): skillCardGetDataRsp {
  3792. const message = createBaseskillCardGetDataRsp();
  3793. message.errno = object.errno ?? 0;
  3794. message.list = object.list?.map((e) => card.fromPartial(e)) || [];
  3795. return message;
  3796. },
  3797. };
  3798. function createBaseskillCardUpgrade(): skillCardUpgrade {
  3799. return { sid: "", num: 0 };
  3800. }
  3801. export const skillCardUpgrade = {
  3802. fromJSON(object: any): skillCardUpgrade {
  3803. return {
  3804. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  3805. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  3806. };
  3807. },
  3808. toJSON(message: skillCardUpgrade): unknown {
  3809. const obj: any = {};
  3810. if (message.sid !== "") {
  3811. obj.sid = message.sid;
  3812. }
  3813. if (message.num !== 0) {
  3814. obj.num = Math.round(message.num);
  3815. }
  3816. return obj;
  3817. },
  3818. create<I extends Exact<DeepPartial<skillCardUpgrade>, I>>(base?: I): skillCardUpgrade {
  3819. return skillCardUpgrade.fromPartial(base ?? ({} as any));
  3820. },
  3821. fromPartial<I extends Exact<DeepPartial<skillCardUpgrade>, I>>(object: I): skillCardUpgrade {
  3822. const message = createBaseskillCardUpgrade();
  3823. message.sid = object.sid ?? "";
  3824. message.num = object.num ?? 0;
  3825. return message;
  3826. },
  3827. };
  3828. function createBaseskillCardUpgradeRsp(): skillCardUpgradeRsp {
  3829. return { errno: 0, data: undefined };
  3830. }
  3831. export const skillCardUpgradeRsp = {
  3832. fromJSON(object: any): skillCardUpgradeRsp {
  3833. return {
  3834. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3835. data: isSet(object.data) ? card.fromJSON(object.data) : undefined,
  3836. };
  3837. },
  3838. toJSON(message: skillCardUpgradeRsp): unknown {
  3839. const obj: any = {};
  3840. if (message.errno !== 0) {
  3841. obj.errno = Math.round(message.errno);
  3842. }
  3843. if (message.data !== undefined) {
  3844. obj.data = card.toJSON(message.data);
  3845. }
  3846. return obj;
  3847. },
  3848. create<I extends Exact<DeepPartial<skillCardUpgradeRsp>, I>>(base?: I): skillCardUpgradeRsp {
  3849. return skillCardUpgradeRsp.fromPartial(base ?? ({} as any));
  3850. },
  3851. fromPartial<I extends Exact<DeepPartial<skillCardUpgradeRsp>, I>>(object: I): skillCardUpgradeRsp {
  3852. const message = createBaseskillCardUpgradeRsp();
  3853. message.errno = object.errno ?? 0;
  3854. message.data = (object.data !== undefined && object.data !== null) ? card.fromPartial(object.data) : undefined;
  3855. return message;
  3856. },
  3857. };
  3858. function createBaseskillCardUpgradeStar(): skillCardUpgradeStar {
  3859. return { sid: "" };
  3860. }
  3861. export const skillCardUpgradeStar = {
  3862. fromJSON(object: any): skillCardUpgradeStar {
  3863. return { sid: isSet(object.sid) ? globalThis.String(object.sid) : "" };
  3864. },
  3865. toJSON(message: skillCardUpgradeStar): unknown {
  3866. const obj: any = {};
  3867. if (message.sid !== "") {
  3868. obj.sid = message.sid;
  3869. }
  3870. return obj;
  3871. },
  3872. create<I extends Exact<DeepPartial<skillCardUpgradeStar>, I>>(base?: I): skillCardUpgradeStar {
  3873. return skillCardUpgradeStar.fromPartial(base ?? ({} as any));
  3874. },
  3875. fromPartial<I extends Exact<DeepPartial<skillCardUpgradeStar>, I>>(object: I): skillCardUpgradeStar {
  3876. const message = createBaseskillCardUpgradeStar();
  3877. message.sid = object.sid ?? "";
  3878. return message;
  3879. },
  3880. };
  3881. function createBaseskillCardUpgradeStarRsp(): skillCardUpgradeStarRsp {
  3882. return { errno: 0, data: undefined };
  3883. }
  3884. export const skillCardUpgradeStarRsp = {
  3885. fromJSON(object: any): skillCardUpgradeStarRsp {
  3886. return {
  3887. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3888. data: isSet(object.data) ? card.fromJSON(object.data) : undefined,
  3889. };
  3890. },
  3891. toJSON(message: skillCardUpgradeStarRsp): unknown {
  3892. const obj: any = {};
  3893. if (message.errno !== 0) {
  3894. obj.errno = Math.round(message.errno);
  3895. }
  3896. if (message.data !== undefined) {
  3897. obj.data = card.toJSON(message.data);
  3898. }
  3899. return obj;
  3900. },
  3901. create<I extends Exact<DeepPartial<skillCardUpgradeStarRsp>, I>>(base?: I): skillCardUpgradeStarRsp {
  3902. return skillCardUpgradeStarRsp.fromPartial(base ?? ({} as any));
  3903. },
  3904. fromPartial<I extends Exact<DeepPartial<skillCardUpgradeStarRsp>, I>>(object: I): skillCardUpgradeStarRsp {
  3905. const message = createBaseskillCardUpgradeStarRsp();
  3906. message.errno = object.errno ?? 0;
  3907. message.data = (object.data !== undefined && object.data !== null) ? card.fromPartial(object.data) : undefined;
  3908. return message;
  3909. },
  3910. };
  3911. function createBaseroleGetData(): roleGetData {
  3912. return {};
  3913. }
  3914. export const roleGetData = {
  3915. fromJSON(_: any): roleGetData {
  3916. return {};
  3917. },
  3918. toJSON(_: roleGetData): unknown {
  3919. const obj: any = {};
  3920. return obj;
  3921. },
  3922. create<I extends Exact<DeepPartial<roleGetData>, I>>(base?: I): roleGetData {
  3923. return roleGetData.fromPartial(base ?? ({} as any));
  3924. },
  3925. fromPartial<I extends Exact<DeepPartial<roleGetData>, I>>(_: I): roleGetData {
  3926. const message = createBaseroleGetData();
  3927. return message;
  3928. },
  3929. };
  3930. function createBaseroleGetDataRsp(): roleGetDataRsp {
  3931. return { errno: 0, level: 0, exp: 0 };
  3932. }
  3933. export const roleGetDataRsp = {
  3934. fromJSON(object: any): roleGetDataRsp {
  3935. return {
  3936. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3937. level: isSet(object.level) ? globalThis.Number(object.level) : 0,
  3938. exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0,
  3939. };
  3940. },
  3941. toJSON(message: roleGetDataRsp): unknown {
  3942. const obj: any = {};
  3943. if (message.errno !== 0) {
  3944. obj.errno = Math.round(message.errno);
  3945. }
  3946. if (message.level !== 0) {
  3947. obj.level = Math.round(message.level);
  3948. }
  3949. if (message.exp !== 0) {
  3950. obj.exp = Math.round(message.exp);
  3951. }
  3952. return obj;
  3953. },
  3954. create<I extends Exact<DeepPartial<roleGetDataRsp>, I>>(base?: I): roleGetDataRsp {
  3955. return roleGetDataRsp.fromPartial(base ?? ({} as any));
  3956. },
  3957. fromPartial<I extends Exact<DeepPartial<roleGetDataRsp>, I>>(object: I): roleGetDataRsp {
  3958. const message = createBaseroleGetDataRsp();
  3959. message.errno = object.errno ?? 0;
  3960. message.level = object.level ?? 0;
  3961. message.exp = object.exp ?? 0;
  3962. return message;
  3963. },
  3964. };
  3965. function createBaseroleUpgrade(): roleUpgrade {
  3966. return {};
  3967. }
  3968. export const roleUpgrade = {
  3969. fromJSON(_: any): roleUpgrade {
  3970. return {};
  3971. },
  3972. toJSON(_: roleUpgrade): unknown {
  3973. const obj: any = {};
  3974. return obj;
  3975. },
  3976. create<I extends Exact<DeepPartial<roleUpgrade>, I>>(base?: I): roleUpgrade {
  3977. return roleUpgrade.fromPartial(base ?? ({} as any));
  3978. },
  3979. fromPartial<I extends Exact<DeepPartial<roleUpgrade>, I>>(_: I): roleUpgrade {
  3980. const message = createBaseroleUpgrade();
  3981. return message;
  3982. },
  3983. };
  3984. function createBaseroleUpgradeRsp(): roleUpgradeRsp {
  3985. return { errno: 0, level: 0, exp: 0 };
  3986. }
  3987. export const roleUpgradeRsp = {
  3988. fromJSON(object: any): roleUpgradeRsp {
  3989. return {
  3990. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  3991. level: isSet(object.level) ? globalThis.Number(object.level) : 0,
  3992. exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0,
  3993. };
  3994. },
  3995. toJSON(message: roleUpgradeRsp): unknown {
  3996. const obj: any = {};
  3997. if (message.errno !== 0) {
  3998. obj.errno = Math.round(message.errno);
  3999. }
  4000. if (message.level !== 0) {
  4001. obj.level = Math.round(message.level);
  4002. }
  4003. if (message.exp !== 0) {
  4004. obj.exp = Math.round(message.exp);
  4005. }
  4006. return obj;
  4007. },
  4008. create<I extends Exact<DeepPartial<roleUpgradeRsp>, I>>(base?: I): roleUpgradeRsp {
  4009. return roleUpgradeRsp.fromPartial(base ?? ({} as any));
  4010. },
  4011. fromPartial<I extends Exact<DeepPartial<roleUpgradeRsp>, I>>(object: I): roleUpgradeRsp {
  4012. const message = createBaseroleUpgradeRsp();
  4013. message.errno = object.errno ?? 0;
  4014. message.level = object.level ?? 0;
  4015. message.exp = object.exp ?? 0;
  4016. return message;
  4017. },
  4018. };
  4019. function createBaseroleRename(): roleRename {
  4020. return { name: "" };
  4021. }
  4022. export const roleRename = {
  4023. fromJSON(object: any): roleRename {
  4024. return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
  4025. },
  4026. toJSON(message: roleRename): unknown {
  4027. const obj: any = {};
  4028. if (message.name !== "") {
  4029. obj.name = message.name;
  4030. }
  4031. return obj;
  4032. },
  4033. create<I extends Exact<DeepPartial<roleRename>, I>>(base?: I): roleRename {
  4034. return roleRename.fromPartial(base ?? ({} as any));
  4035. },
  4036. fromPartial<I extends Exact<DeepPartial<roleRename>, I>>(object: I): roleRename {
  4037. const message = createBaseroleRename();
  4038. message.name = object.name ?? "";
  4039. return message;
  4040. },
  4041. };
  4042. function createBaseroleRenameRsp(): roleRenameRsp {
  4043. return { errno: 0, name: "", time: 0 };
  4044. }
  4045. export const roleRenameRsp = {
  4046. fromJSON(object: any): roleRenameRsp {
  4047. return {
  4048. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4049. name: isSet(object.name) ? globalThis.String(object.name) : "",
  4050. time: isSet(object.time) ? globalThis.Number(object.time) : 0,
  4051. };
  4052. },
  4053. toJSON(message: roleRenameRsp): unknown {
  4054. const obj: any = {};
  4055. if (message.errno !== 0) {
  4056. obj.errno = Math.round(message.errno);
  4057. }
  4058. if (message.name !== "") {
  4059. obj.name = message.name;
  4060. }
  4061. if (message.time !== 0) {
  4062. obj.time = Math.round(message.time);
  4063. }
  4064. return obj;
  4065. },
  4066. create<I extends Exact<DeepPartial<roleRenameRsp>, I>>(base?: I): roleRenameRsp {
  4067. return roleRenameRsp.fromPartial(base ?? ({} as any));
  4068. },
  4069. fromPartial<I extends Exact<DeepPartial<roleRenameRsp>, I>>(object: I): roleRenameRsp {
  4070. const message = createBaseroleRenameRsp();
  4071. message.errno = object.errno ?? 0;
  4072. message.name = object.name ?? "";
  4073. message.time = object.time ?? 0;
  4074. return message;
  4075. },
  4076. };
  4077. function createBasedebrisGetData(): debrisGetData {
  4078. return {};
  4079. }
  4080. export const debrisGetData = {
  4081. fromJSON(_: any): debrisGetData {
  4082. return {};
  4083. },
  4084. toJSON(_: debrisGetData): unknown {
  4085. const obj: any = {};
  4086. return obj;
  4087. },
  4088. create<I extends Exact<DeepPartial<debrisGetData>, I>>(base?: I): debrisGetData {
  4089. return debrisGetData.fromPartial(base ?? ({} as any));
  4090. },
  4091. fromPartial<I extends Exact<DeepPartial<debrisGetData>, I>>(_: I): debrisGetData {
  4092. const message = createBasedebrisGetData();
  4093. return message;
  4094. },
  4095. };
  4096. function createBasedebrisGetDataRsp(): debrisGetDataRsp {
  4097. return { errno: 0, list: [] };
  4098. }
  4099. export const debrisGetDataRsp = {
  4100. fromJSON(object: any): debrisGetDataRsp {
  4101. return {
  4102. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4103. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => idNum.fromJSON(e)) : [],
  4104. };
  4105. },
  4106. toJSON(message: debrisGetDataRsp): unknown {
  4107. const obj: any = {};
  4108. if (message.errno !== 0) {
  4109. obj.errno = Math.round(message.errno);
  4110. }
  4111. if (message.list?.length) {
  4112. obj.list = message.list.map((e) => idNum.toJSON(e));
  4113. }
  4114. return obj;
  4115. },
  4116. create<I extends Exact<DeepPartial<debrisGetDataRsp>, I>>(base?: I): debrisGetDataRsp {
  4117. return debrisGetDataRsp.fromPartial(base ?? ({} as any));
  4118. },
  4119. fromPartial<I extends Exact<DeepPartial<debrisGetDataRsp>, I>>(object: I): debrisGetDataRsp {
  4120. const message = createBasedebrisGetDataRsp();
  4121. message.errno = object.errno ?? 0;
  4122. message.list = object.list?.map((e) => idNum.fromPartial(e)) || [];
  4123. return message;
  4124. },
  4125. };
  4126. function createBasedebrisMerge(): debrisMerge {
  4127. return { id: 0 };
  4128. }
  4129. export const debrisMerge = {
  4130. fromJSON(object: any): debrisMerge {
  4131. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  4132. },
  4133. toJSON(message: debrisMerge): unknown {
  4134. const obj: any = {};
  4135. if (message.id !== 0) {
  4136. obj.id = Math.round(message.id);
  4137. }
  4138. return obj;
  4139. },
  4140. create<I extends Exact<DeepPartial<debrisMerge>, I>>(base?: I): debrisMerge {
  4141. return debrisMerge.fromPartial(base ?? ({} as any));
  4142. },
  4143. fromPartial<I extends Exact<DeepPartial<debrisMerge>, I>>(object: I): debrisMerge {
  4144. const message = createBasedebrisMerge();
  4145. message.id = object.id ?? 0;
  4146. return message;
  4147. },
  4148. };
  4149. function createBasedebrisMergeRsp(): debrisMergeRsp {
  4150. return { errno: 0 };
  4151. }
  4152. export const debrisMergeRsp = {
  4153. fromJSON(object: any): debrisMergeRsp {
  4154. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  4155. },
  4156. toJSON(message: debrisMergeRsp): unknown {
  4157. const obj: any = {};
  4158. if (message.errno !== 0) {
  4159. obj.errno = Math.round(message.errno);
  4160. }
  4161. return obj;
  4162. },
  4163. create<I extends Exact<DeepPartial<debrisMergeRsp>, I>>(base?: I): debrisMergeRsp {
  4164. return debrisMergeRsp.fromPartial(base ?? ({} as any));
  4165. },
  4166. fromPartial<I extends Exact<DeepPartial<debrisMergeRsp>, I>>(object: I): debrisMergeRsp {
  4167. const message = createBasedebrisMergeRsp();
  4168. message.errno = object.errno ?? 0;
  4169. return message;
  4170. },
  4171. };
  4172. function createBaseequipGetData(): equipGetData {
  4173. return {};
  4174. }
  4175. export const equipGetData = {
  4176. fromJSON(_: any): equipGetData {
  4177. return {};
  4178. },
  4179. toJSON(_: equipGetData): unknown {
  4180. const obj: any = {};
  4181. return obj;
  4182. },
  4183. create<I extends Exact<DeepPartial<equipGetData>, I>>(base?: I): equipGetData {
  4184. return equipGetData.fromPartial(base ?? ({} as any));
  4185. },
  4186. fromPartial<I extends Exact<DeepPartial<equipGetData>, I>>(_: I): equipGetData {
  4187. const message = createBaseequipGetData();
  4188. return message;
  4189. },
  4190. };
  4191. function createBaseequipGetDataRsp(): equipGetDataRsp {
  4192. return { errno: 0, list: [] };
  4193. }
  4194. export const equipGetDataRsp = {
  4195. fromJSON(object: any): equipGetDataRsp {
  4196. return {
  4197. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4198. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => equip.fromJSON(e)) : [],
  4199. };
  4200. },
  4201. toJSON(message: equipGetDataRsp): unknown {
  4202. const obj: any = {};
  4203. if (message.errno !== 0) {
  4204. obj.errno = Math.round(message.errno);
  4205. }
  4206. if (message.list?.length) {
  4207. obj.list = message.list.map((e) => equip.toJSON(e));
  4208. }
  4209. return obj;
  4210. },
  4211. create<I extends Exact<DeepPartial<equipGetDataRsp>, I>>(base?: I): equipGetDataRsp {
  4212. return equipGetDataRsp.fromPartial(base ?? ({} as any));
  4213. },
  4214. fromPartial<I extends Exact<DeepPartial<equipGetDataRsp>, I>>(object: I): equipGetDataRsp {
  4215. const message = createBaseequipGetDataRsp();
  4216. message.errno = object.errno ?? 0;
  4217. message.list = object.list?.map((e) => equip.fromPartial(e)) || [];
  4218. return message;
  4219. },
  4220. };
  4221. function createBaseequipUpgrade(): equipUpgrade {
  4222. return { sid: "", num: 0 };
  4223. }
  4224. export const equipUpgrade = {
  4225. fromJSON(object: any): equipUpgrade {
  4226. return {
  4227. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  4228. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  4229. };
  4230. },
  4231. toJSON(message: equipUpgrade): unknown {
  4232. const obj: any = {};
  4233. if (message.sid !== "") {
  4234. obj.sid = message.sid;
  4235. }
  4236. if (message.num !== 0) {
  4237. obj.num = Math.round(message.num);
  4238. }
  4239. return obj;
  4240. },
  4241. create<I extends Exact<DeepPartial<equipUpgrade>, I>>(base?: I): equipUpgrade {
  4242. return equipUpgrade.fromPartial(base ?? ({} as any));
  4243. },
  4244. fromPartial<I extends Exact<DeepPartial<equipUpgrade>, I>>(object: I): equipUpgrade {
  4245. const message = createBaseequipUpgrade();
  4246. message.sid = object.sid ?? "";
  4247. message.num = object.num ?? 0;
  4248. return message;
  4249. },
  4250. };
  4251. function createBaseequipUpgradeRsp(): equipUpgradeRsp {
  4252. return { errno: 0, data: undefined };
  4253. }
  4254. export const equipUpgradeRsp = {
  4255. fromJSON(object: any): equipUpgradeRsp {
  4256. return {
  4257. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4258. data: isSet(object.data) ? equip.fromJSON(object.data) : undefined,
  4259. };
  4260. },
  4261. toJSON(message: equipUpgradeRsp): unknown {
  4262. const obj: any = {};
  4263. if (message.errno !== 0) {
  4264. obj.errno = Math.round(message.errno);
  4265. }
  4266. if (message.data !== undefined) {
  4267. obj.data = equip.toJSON(message.data);
  4268. }
  4269. return obj;
  4270. },
  4271. create<I extends Exact<DeepPartial<equipUpgradeRsp>, I>>(base?: I): equipUpgradeRsp {
  4272. return equipUpgradeRsp.fromPartial(base ?? ({} as any));
  4273. },
  4274. fromPartial<I extends Exact<DeepPartial<equipUpgradeRsp>, I>>(object: I): equipUpgradeRsp {
  4275. const message = createBaseequipUpgradeRsp();
  4276. message.errno = object.errno ?? 0;
  4277. message.data = (object.data !== undefined && object.data !== null) ? equip.fromPartial(object.data) : undefined;
  4278. return message;
  4279. },
  4280. };
  4281. function createBaseequipUpgradeStar(): equipUpgradeStar {
  4282. return { sid: "", same: [], other: [], currency: undefined };
  4283. }
  4284. export const equipUpgradeStar = {
  4285. fromJSON(object: any): equipUpgradeStar {
  4286. return {
  4287. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  4288. same: globalThis.Array.isArray(object?.same) ? object.same.map((e: any) => globalThis.String(e)) : [],
  4289. other: globalThis.Array.isArray(object?.other) ? object.other.map((e: any) => globalThis.String(e)) : [],
  4290. currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined,
  4291. };
  4292. },
  4293. toJSON(message: equipUpgradeStar): unknown {
  4294. const obj: any = {};
  4295. if (message.sid !== "") {
  4296. obj.sid = message.sid;
  4297. }
  4298. if (message.same?.length) {
  4299. obj.same = message.same;
  4300. }
  4301. if (message.other?.length) {
  4302. obj.other = message.other;
  4303. }
  4304. if (message.currency !== undefined) {
  4305. obj.currency = idNum.toJSON(message.currency);
  4306. }
  4307. return obj;
  4308. },
  4309. create<I extends Exact<DeepPartial<equipUpgradeStar>, I>>(base?: I): equipUpgradeStar {
  4310. return equipUpgradeStar.fromPartial(base ?? ({} as any));
  4311. },
  4312. fromPartial<I extends Exact<DeepPartial<equipUpgradeStar>, I>>(object: I): equipUpgradeStar {
  4313. const message = createBaseequipUpgradeStar();
  4314. message.sid = object.sid ?? "";
  4315. message.same = object.same?.map((e) => e) || [];
  4316. message.other = object.other?.map((e) => e) || [];
  4317. message.currency = (object.currency !== undefined && object.currency !== null)
  4318. ? idNum.fromPartial(object.currency)
  4319. : undefined;
  4320. return message;
  4321. },
  4322. };
  4323. function createBaseequipUpgradeStarRsp(): equipUpgradeStarRsp {
  4324. return { errno: 0, data: undefined, same: [], other: [], currency: undefined };
  4325. }
  4326. export const equipUpgradeStarRsp = {
  4327. fromJSON(object: any): equipUpgradeStarRsp {
  4328. return {
  4329. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4330. data: isSet(object.data) ? equip.fromJSON(object.data) : undefined,
  4331. same: globalThis.Array.isArray(object?.same) ? object.same.map((e: any) => globalThis.String(e)) : [],
  4332. other: globalThis.Array.isArray(object?.other) ? object.other.map((e: any) => globalThis.String(e)) : [],
  4333. currency: isSet(object.currency) ? idNum.fromJSON(object.currency) : undefined,
  4334. };
  4335. },
  4336. toJSON(message: equipUpgradeStarRsp): unknown {
  4337. const obj: any = {};
  4338. if (message.errno !== 0) {
  4339. obj.errno = Math.round(message.errno);
  4340. }
  4341. if (message.data !== undefined) {
  4342. obj.data = equip.toJSON(message.data);
  4343. }
  4344. if (message.same?.length) {
  4345. obj.same = message.same;
  4346. }
  4347. if (message.other?.length) {
  4348. obj.other = message.other;
  4349. }
  4350. if (message.currency !== undefined) {
  4351. obj.currency = idNum.toJSON(message.currency);
  4352. }
  4353. return obj;
  4354. },
  4355. create<I extends Exact<DeepPartial<equipUpgradeStarRsp>, I>>(base?: I): equipUpgradeStarRsp {
  4356. return equipUpgradeStarRsp.fromPartial(base ?? ({} as any));
  4357. },
  4358. fromPartial<I extends Exact<DeepPartial<equipUpgradeStarRsp>, I>>(object: I): equipUpgradeStarRsp {
  4359. const message = createBaseequipUpgradeStarRsp();
  4360. message.errno = object.errno ?? 0;
  4361. message.data = (object.data !== undefined && object.data !== null) ? equip.fromPartial(object.data) : undefined;
  4362. message.same = object.same?.map((e) => e) || [];
  4363. message.other = object.other?.map((e) => e) || [];
  4364. message.currency = (object.currency !== undefined && object.currency !== null)
  4365. ? idNum.fromPartial(object.currency)
  4366. : undefined;
  4367. return message;
  4368. },
  4369. };
  4370. function createBaseequipOnekeyUpgradeStar(): equipOnekeyUpgradeStar {
  4371. return {};
  4372. }
  4373. export const equipOnekeyUpgradeStar = {
  4374. fromJSON(_: any): equipOnekeyUpgradeStar {
  4375. return {};
  4376. },
  4377. toJSON(_: equipOnekeyUpgradeStar): unknown {
  4378. const obj: any = {};
  4379. return obj;
  4380. },
  4381. create<I extends Exact<DeepPartial<equipOnekeyUpgradeStar>, I>>(base?: I): equipOnekeyUpgradeStar {
  4382. return equipOnekeyUpgradeStar.fromPartial(base ?? ({} as any));
  4383. },
  4384. fromPartial<I extends Exact<DeepPartial<equipOnekeyUpgradeStar>, I>>(_: I): equipOnekeyUpgradeStar {
  4385. const message = createBaseequipOnekeyUpgradeStar();
  4386. return message;
  4387. },
  4388. };
  4389. function createBaseequipOnekeyUpgradeStarRsp(): equipOnekeyUpgradeStarRsp {
  4390. return { errno: 0, delList: [], changeList: [] };
  4391. }
  4392. export const equipOnekeyUpgradeStarRsp = {
  4393. fromJSON(object: any): equipOnekeyUpgradeStarRsp {
  4394. return {
  4395. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4396. delList: globalThis.Array.isArray(object?.delList) ? object.delList.map((e: any) => globalThis.String(e)) : [],
  4397. changeList: globalThis.Array.isArray(object?.changeList)
  4398. ? object.changeList.map((e: any) => equip.fromJSON(e))
  4399. : [],
  4400. };
  4401. },
  4402. toJSON(message: equipOnekeyUpgradeStarRsp): unknown {
  4403. const obj: any = {};
  4404. if (message.errno !== 0) {
  4405. obj.errno = Math.round(message.errno);
  4406. }
  4407. if (message.delList?.length) {
  4408. obj.delList = message.delList;
  4409. }
  4410. if (message.changeList?.length) {
  4411. obj.changeList = message.changeList.map((e) => equip.toJSON(e));
  4412. }
  4413. return obj;
  4414. },
  4415. create<I extends Exact<DeepPartial<equipOnekeyUpgradeStarRsp>, I>>(base?: I): equipOnekeyUpgradeStarRsp {
  4416. return equipOnekeyUpgradeStarRsp.fromPartial(base ?? ({} as any));
  4417. },
  4418. fromPartial<I extends Exact<DeepPartial<equipOnekeyUpgradeStarRsp>, I>>(object: I): equipOnekeyUpgradeStarRsp {
  4419. const message = createBaseequipOnekeyUpgradeStarRsp();
  4420. message.errno = object.errno ?? 0;
  4421. message.delList = object.delList?.map((e) => e) || [];
  4422. message.changeList = object.changeList?.map((e) => equip.fromPartial(e)) || [];
  4423. return message;
  4424. },
  4425. };
  4426. function createBaseequipReset(): equipReset {
  4427. return { level: false, sid: "" };
  4428. }
  4429. export const equipReset = {
  4430. fromJSON(object: any): equipReset {
  4431. return {
  4432. level: isSet(object.level) ? globalThis.Boolean(object.level) : false,
  4433. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  4434. };
  4435. },
  4436. toJSON(message: equipReset): unknown {
  4437. const obj: any = {};
  4438. if (message.level !== false) {
  4439. obj.level = message.level;
  4440. }
  4441. if (message.sid !== "") {
  4442. obj.sid = message.sid;
  4443. }
  4444. return obj;
  4445. },
  4446. create<I extends Exact<DeepPartial<equipReset>, I>>(base?: I): equipReset {
  4447. return equipReset.fromPartial(base ?? ({} as any));
  4448. },
  4449. fromPartial<I extends Exact<DeepPartial<equipReset>, I>>(object: I): equipReset {
  4450. const message = createBaseequipReset();
  4451. message.level = object.level ?? false;
  4452. message.sid = object.sid ?? "";
  4453. return message;
  4454. },
  4455. };
  4456. function createBaseequipResetRsp(): equipResetRsp {
  4457. return { errno: 0, data: undefined };
  4458. }
  4459. export const equipResetRsp = {
  4460. fromJSON(object: any): equipResetRsp {
  4461. return {
  4462. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4463. data: isSet(object.data) ? equip.fromJSON(object.data) : undefined,
  4464. };
  4465. },
  4466. toJSON(message: equipResetRsp): unknown {
  4467. const obj: any = {};
  4468. if (message.errno !== 0) {
  4469. obj.errno = Math.round(message.errno);
  4470. }
  4471. if (message.data !== undefined) {
  4472. obj.data = equip.toJSON(message.data);
  4473. }
  4474. return obj;
  4475. },
  4476. create<I extends Exact<DeepPartial<equipResetRsp>, I>>(base?: I): equipResetRsp {
  4477. return equipResetRsp.fromPartial(base ?? ({} as any));
  4478. },
  4479. fromPartial<I extends Exact<DeepPartial<equipResetRsp>, I>>(object: I): equipResetRsp {
  4480. const message = createBaseequipResetRsp();
  4481. message.errno = object.errno ?? 0;
  4482. message.data = (object.data !== undefined && object.data !== null) ? equip.fromPartial(object.data) : undefined;
  4483. return message;
  4484. },
  4485. };
  4486. function createBaseequipChangeNty(): equipChangeNty {
  4487. return { list: [] };
  4488. }
  4489. export const equipChangeNty = {
  4490. fromJSON(object: any): equipChangeNty {
  4491. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => equip.fromJSON(e)) : [] };
  4492. },
  4493. toJSON(message: equipChangeNty): unknown {
  4494. const obj: any = {};
  4495. if (message.list?.length) {
  4496. obj.list = message.list.map((e) => equip.toJSON(e));
  4497. }
  4498. return obj;
  4499. },
  4500. create<I extends Exact<DeepPartial<equipChangeNty>, I>>(base?: I): equipChangeNty {
  4501. return equipChangeNty.fromPartial(base ?? ({} as any));
  4502. },
  4503. fromPartial<I extends Exact<DeepPartial<equipChangeNty>, I>>(object: I): equipChangeNty {
  4504. const message = createBaseequipChangeNty();
  4505. message.list = object.list?.map((e) => equip.fromPartial(e)) || [];
  4506. return message;
  4507. },
  4508. };
  4509. function createBasetalentGetData(): talentGetData {
  4510. return {};
  4511. }
  4512. export const talentGetData = {
  4513. fromJSON(_: any): talentGetData {
  4514. return {};
  4515. },
  4516. toJSON(_: talentGetData): unknown {
  4517. const obj: any = {};
  4518. return obj;
  4519. },
  4520. create<I extends Exact<DeepPartial<talentGetData>, I>>(base?: I): talentGetData {
  4521. return talentGetData.fromPartial(base ?? ({} as any));
  4522. },
  4523. fromPartial<I extends Exact<DeepPartial<talentGetData>, I>>(_: I): talentGetData {
  4524. const message = createBasetalentGetData();
  4525. return message;
  4526. },
  4527. };
  4528. function createBasetalentGetDataRsp(): talentGetDataRsp {
  4529. return { errno: 0, id1: 0, id2: 0 };
  4530. }
  4531. export const talentGetDataRsp = {
  4532. fromJSON(object: any): talentGetDataRsp {
  4533. return {
  4534. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4535. id1: isSet(object.id1) ? globalThis.Number(object.id1) : 0,
  4536. id2: isSet(object.id2) ? globalThis.Number(object.id2) : 0,
  4537. };
  4538. },
  4539. toJSON(message: talentGetDataRsp): unknown {
  4540. const obj: any = {};
  4541. if (message.errno !== 0) {
  4542. obj.errno = Math.round(message.errno);
  4543. }
  4544. if (message.id1 !== 0) {
  4545. obj.id1 = Math.round(message.id1);
  4546. }
  4547. if (message.id2 !== 0) {
  4548. obj.id2 = Math.round(message.id2);
  4549. }
  4550. return obj;
  4551. },
  4552. create<I extends Exact<DeepPartial<talentGetDataRsp>, I>>(base?: I): talentGetDataRsp {
  4553. return talentGetDataRsp.fromPartial(base ?? ({} as any));
  4554. },
  4555. fromPartial<I extends Exact<DeepPartial<talentGetDataRsp>, I>>(object: I): talentGetDataRsp {
  4556. const message = createBasetalentGetDataRsp();
  4557. message.errno = object.errno ?? 0;
  4558. message.id1 = object.id1 ?? 0;
  4559. message.id2 = object.id2 ?? 0;
  4560. return message;
  4561. },
  4562. };
  4563. function createBasetalentActivate(): talentActivate {
  4564. return { id: 0 };
  4565. }
  4566. export const talentActivate = {
  4567. fromJSON(object: any): talentActivate {
  4568. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  4569. },
  4570. toJSON(message: talentActivate): unknown {
  4571. const obj: any = {};
  4572. if (message.id !== 0) {
  4573. obj.id = Math.round(message.id);
  4574. }
  4575. return obj;
  4576. },
  4577. create<I extends Exact<DeepPartial<talentActivate>, I>>(base?: I): talentActivate {
  4578. return talentActivate.fromPartial(base ?? ({} as any));
  4579. },
  4580. fromPartial<I extends Exact<DeepPartial<talentActivate>, I>>(object: I): talentActivate {
  4581. const message = createBasetalentActivate();
  4582. message.id = object.id ?? 0;
  4583. return message;
  4584. },
  4585. };
  4586. function createBasetalentActivateRsp(): talentActivateRsp {
  4587. return { errno: 0, id: 0 };
  4588. }
  4589. export const talentActivateRsp = {
  4590. fromJSON(object: any): talentActivateRsp {
  4591. return {
  4592. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4593. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  4594. };
  4595. },
  4596. toJSON(message: talentActivateRsp): unknown {
  4597. const obj: any = {};
  4598. if (message.errno !== 0) {
  4599. obj.errno = Math.round(message.errno);
  4600. }
  4601. if (message.id !== 0) {
  4602. obj.id = Math.round(message.id);
  4603. }
  4604. return obj;
  4605. },
  4606. create<I extends Exact<DeepPartial<talentActivateRsp>, I>>(base?: I): talentActivateRsp {
  4607. return talentActivateRsp.fromPartial(base ?? ({} as any));
  4608. },
  4609. fromPartial<I extends Exact<DeepPartial<talentActivateRsp>, I>>(object: I): talentActivateRsp {
  4610. const message = createBasetalentActivateRsp();
  4611. message.errno = object.errno ?? 0;
  4612. message.id = object.id ?? 0;
  4613. return message;
  4614. },
  4615. };
  4616. function createBasesignInGetData(): signInGetData {
  4617. return {};
  4618. }
  4619. export const signInGetData = {
  4620. fromJSON(_: any): signInGetData {
  4621. return {};
  4622. },
  4623. toJSON(_: signInGetData): unknown {
  4624. const obj: any = {};
  4625. return obj;
  4626. },
  4627. create<I extends Exact<DeepPartial<signInGetData>, I>>(base?: I): signInGetData {
  4628. return signInGetData.fromPartial(base ?? ({} as any));
  4629. },
  4630. fromPartial<I extends Exact<DeepPartial<signInGetData>, I>>(_: I): signInGetData {
  4631. const message = createBasesignInGetData();
  4632. return message;
  4633. },
  4634. };
  4635. function createBasesignInGetDataRsp(): signInGetDataRsp {
  4636. return { errno: 0 };
  4637. }
  4638. export const signInGetDataRsp = {
  4639. fromJSON(object: any): signInGetDataRsp {
  4640. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  4641. },
  4642. toJSON(message: signInGetDataRsp): unknown {
  4643. const obj: any = {};
  4644. if (message.errno !== 0) {
  4645. obj.errno = Math.round(message.errno);
  4646. }
  4647. return obj;
  4648. },
  4649. create<I extends Exact<DeepPartial<signInGetDataRsp>, I>>(base?: I): signInGetDataRsp {
  4650. return signInGetDataRsp.fromPartial(base ?? ({} as any));
  4651. },
  4652. fromPartial<I extends Exact<DeepPartial<signInGetDataRsp>, I>>(object: I): signInGetDataRsp {
  4653. const message = createBasesignInGetDataRsp();
  4654. message.errno = object.errno ?? 0;
  4655. return message;
  4656. },
  4657. };
  4658. function createBasesignInAward(): signInAward {
  4659. return { day: 0 };
  4660. }
  4661. export const signInAward = {
  4662. fromJSON(object: any): signInAward {
  4663. return { day: isSet(object.day) ? globalThis.Number(object.day) : 0 };
  4664. },
  4665. toJSON(message: signInAward): unknown {
  4666. const obj: any = {};
  4667. if (message.day !== 0) {
  4668. obj.day = Math.round(message.day);
  4669. }
  4670. return obj;
  4671. },
  4672. create<I extends Exact<DeepPartial<signInAward>, I>>(base?: I): signInAward {
  4673. return signInAward.fromPartial(base ?? ({} as any));
  4674. },
  4675. fromPartial<I extends Exact<DeepPartial<signInAward>, I>>(object: I): signInAward {
  4676. const message = createBasesignInAward();
  4677. message.day = object.day ?? 0;
  4678. return message;
  4679. },
  4680. };
  4681. function createBasesignInAwardRsp(): signInAwardRsp {
  4682. return { errno: 0, day: 0, award: 0 };
  4683. }
  4684. export const signInAwardRsp = {
  4685. fromJSON(object: any): signInAwardRsp {
  4686. return {
  4687. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4688. day: isSet(object.day) ? globalThis.Number(object.day) : 0,
  4689. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  4690. };
  4691. },
  4692. toJSON(message: signInAwardRsp): unknown {
  4693. const obj: any = {};
  4694. if (message.errno !== 0) {
  4695. obj.errno = Math.round(message.errno);
  4696. }
  4697. if (message.day !== 0) {
  4698. obj.day = Math.round(message.day);
  4699. }
  4700. if (message.award !== 0) {
  4701. obj.award = Math.round(message.award);
  4702. }
  4703. return obj;
  4704. },
  4705. create<I extends Exact<DeepPartial<signInAwardRsp>, I>>(base?: I): signInAwardRsp {
  4706. return signInAwardRsp.fromPartial(base ?? ({} as any));
  4707. },
  4708. fromPartial<I extends Exact<DeepPartial<signInAwardRsp>, I>>(object: I): signInAwardRsp {
  4709. const message = createBasesignInAwardRsp();
  4710. message.errno = object.errno ?? 0;
  4711. message.day = object.day ?? 0;
  4712. message.award = object.award ?? 0;
  4713. return message;
  4714. },
  4715. };
  4716. function createBasesignInNty(): signInNty {
  4717. return { open: false, day: 0, award: 0, round: 0 };
  4718. }
  4719. export const signInNty = {
  4720. fromJSON(object: any): signInNty {
  4721. return {
  4722. open: isSet(object.open) ? globalThis.Boolean(object.open) : false,
  4723. day: isSet(object.day) ? globalThis.Number(object.day) : 0,
  4724. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  4725. round: isSet(object.round) ? globalThis.Number(object.round) : 0,
  4726. };
  4727. },
  4728. toJSON(message: signInNty): unknown {
  4729. const obj: any = {};
  4730. if (message.open !== false) {
  4731. obj.open = message.open;
  4732. }
  4733. if (message.day !== 0) {
  4734. obj.day = Math.round(message.day);
  4735. }
  4736. if (message.award !== 0) {
  4737. obj.award = Math.round(message.award);
  4738. }
  4739. if (message.round !== 0) {
  4740. obj.round = Math.round(message.round);
  4741. }
  4742. return obj;
  4743. },
  4744. create<I extends Exact<DeepPartial<signInNty>, I>>(base?: I): signInNty {
  4745. return signInNty.fromPartial(base ?? ({} as any));
  4746. },
  4747. fromPartial<I extends Exact<DeepPartial<signInNty>, I>>(object: I): signInNty {
  4748. const message = createBasesignInNty();
  4749. message.open = object.open ?? false;
  4750. message.day = object.day ?? 0;
  4751. message.award = object.award ?? 0;
  4752. message.round = object.round ?? 0;
  4753. return message;
  4754. },
  4755. };
  4756. function createBasequestGetData(): questGetData {
  4757. return {};
  4758. }
  4759. export const questGetData = {
  4760. fromJSON(_: any): questGetData {
  4761. return {};
  4762. },
  4763. toJSON(_: questGetData): unknown {
  4764. const obj: any = {};
  4765. return obj;
  4766. },
  4767. create<I extends Exact<DeepPartial<questGetData>, I>>(base?: I): questGetData {
  4768. return questGetData.fromPartial(base ?? ({} as any));
  4769. },
  4770. fromPartial<I extends Exact<DeepPartial<questGetData>, I>>(_: I): questGetData {
  4771. const message = createBasequestGetData();
  4772. return message;
  4773. },
  4774. };
  4775. function createBasequestGetDataRsp(): questGetDataRsp {
  4776. return {
  4777. errno: 0,
  4778. dlv: 0,
  4779. wlv: 0,
  4780. daward: 0,
  4781. waward: 0,
  4782. daily: [],
  4783. weekly: [],
  4784. achievement: [],
  4785. mainQuest: undefined,
  4786. };
  4787. }
  4788. export const questGetDataRsp = {
  4789. fromJSON(object: any): questGetDataRsp {
  4790. return {
  4791. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4792. dlv: isSet(object.dlv) ? globalThis.Number(object.dlv) : 0,
  4793. wlv: isSet(object.wlv) ? globalThis.Number(object.wlv) : 0,
  4794. daward: isSet(object.daward) ? globalThis.Number(object.daward) : 0,
  4795. waward: isSet(object.waward) ? globalThis.Number(object.waward) : 0,
  4796. daily: globalThis.Array.isArray(object?.daily) ? object.daily.map((e: any) => quest.fromJSON(e)) : [],
  4797. weekly: globalThis.Array.isArray(object?.weekly) ? object.weekly.map((e: any) => quest.fromJSON(e)) : [],
  4798. achievement: globalThis.Array.isArray(object?.achievement)
  4799. ? object.achievement.map((e: any) => quest.fromJSON(e))
  4800. : [],
  4801. mainQuest: isSet(object.mainQuest) ? quest.fromJSON(object.mainQuest) : undefined,
  4802. };
  4803. },
  4804. toJSON(message: questGetDataRsp): unknown {
  4805. const obj: any = {};
  4806. if (message.errno !== 0) {
  4807. obj.errno = Math.round(message.errno);
  4808. }
  4809. if (message.dlv !== 0) {
  4810. obj.dlv = Math.round(message.dlv);
  4811. }
  4812. if (message.wlv !== 0) {
  4813. obj.wlv = Math.round(message.wlv);
  4814. }
  4815. if (message.daward !== 0) {
  4816. obj.daward = Math.round(message.daward);
  4817. }
  4818. if (message.waward !== 0) {
  4819. obj.waward = Math.round(message.waward);
  4820. }
  4821. if (message.daily?.length) {
  4822. obj.daily = message.daily.map((e) => quest.toJSON(e));
  4823. }
  4824. if (message.weekly?.length) {
  4825. obj.weekly = message.weekly.map((e) => quest.toJSON(e));
  4826. }
  4827. if (message.achievement?.length) {
  4828. obj.achievement = message.achievement.map((e) => quest.toJSON(e));
  4829. }
  4830. if (message.mainQuest !== undefined) {
  4831. obj.mainQuest = quest.toJSON(message.mainQuest);
  4832. }
  4833. return obj;
  4834. },
  4835. create<I extends Exact<DeepPartial<questGetDataRsp>, I>>(base?: I): questGetDataRsp {
  4836. return questGetDataRsp.fromPartial(base ?? ({} as any));
  4837. },
  4838. fromPartial<I extends Exact<DeepPartial<questGetDataRsp>, I>>(object: I): questGetDataRsp {
  4839. const message = createBasequestGetDataRsp();
  4840. message.errno = object.errno ?? 0;
  4841. message.dlv = object.dlv ?? 0;
  4842. message.wlv = object.wlv ?? 0;
  4843. message.daward = object.daward ?? 0;
  4844. message.waward = object.waward ?? 0;
  4845. message.daily = object.daily?.map((e) => quest.fromPartial(e)) || [];
  4846. message.weekly = object.weekly?.map((e) => quest.fromPartial(e)) || [];
  4847. message.achievement = object.achievement?.map((e) => quest.fromPartial(e)) || [];
  4848. message.mainQuest = (object.mainQuest !== undefined && object.mainQuest !== null)
  4849. ? quest.fromPartial(object.mainQuest)
  4850. : undefined;
  4851. return message;
  4852. },
  4853. };
  4854. function createBasequestGetAward(): questGetAward {
  4855. return { id: 0 };
  4856. }
  4857. export const questGetAward = {
  4858. fromJSON(object: any): questGetAward {
  4859. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  4860. },
  4861. toJSON(message: questGetAward): unknown {
  4862. const obj: any = {};
  4863. if (message.id !== 0) {
  4864. obj.id = Math.round(message.id);
  4865. }
  4866. return obj;
  4867. },
  4868. create<I extends Exact<DeepPartial<questGetAward>, I>>(base?: I): questGetAward {
  4869. return questGetAward.fromPartial(base ?? ({} as any));
  4870. },
  4871. fromPartial<I extends Exact<DeepPartial<questGetAward>, I>>(object: I): questGetAward {
  4872. const message = createBasequestGetAward();
  4873. message.id = object.id ?? 0;
  4874. return message;
  4875. },
  4876. };
  4877. function createBasequestGetAwardRsp(): questGetAwardRsp {
  4878. return { errno: 0, id: 0, data: undefined };
  4879. }
  4880. export const questGetAwardRsp = {
  4881. fromJSON(object: any): questGetAwardRsp {
  4882. return {
  4883. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4884. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  4885. data: isSet(object.data) ? quest.fromJSON(object.data) : undefined,
  4886. };
  4887. },
  4888. toJSON(message: questGetAwardRsp): unknown {
  4889. const obj: any = {};
  4890. if (message.errno !== 0) {
  4891. obj.errno = Math.round(message.errno);
  4892. }
  4893. if (message.id !== 0) {
  4894. obj.id = Math.round(message.id);
  4895. }
  4896. if (message.data !== undefined) {
  4897. obj.data = quest.toJSON(message.data);
  4898. }
  4899. return obj;
  4900. },
  4901. create<I extends Exact<DeepPartial<questGetAwardRsp>, I>>(base?: I): questGetAwardRsp {
  4902. return questGetAwardRsp.fromPartial(base ?? ({} as any));
  4903. },
  4904. fromPartial<I extends Exact<DeepPartial<questGetAwardRsp>, I>>(object: I): questGetAwardRsp {
  4905. const message = createBasequestGetAwardRsp();
  4906. message.errno = object.errno ?? 0;
  4907. message.id = object.id ?? 0;
  4908. message.data = (object.data !== undefined && object.data !== null) ? quest.fromPartial(object.data) : undefined;
  4909. return message;
  4910. },
  4911. };
  4912. function createBasequestActiveAward(): questActiveAward {
  4913. return { type: 0 };
  4914. }
  4915. export const questActiveAward = {
  4916. fromJSON(object: any): questActiveAward {
  4917. return { type: isSet(object.type) ? globalThis.Number(object.type) : 0 };
  4918. },
  4919. toJSON(message: questActiveAward): unknown {
  4920. const obj: any = {};
  4921. if (message.type !== 0) {
  4922. obj.type = Math.round(message.type);
  4923. }
  4924. return obj;
  4925. },
  4926. create<I extends Exact<DeepPartial<questActiveAward>, I>>(base?: I): questActiveAward {
  4927. return questActiveAward.fromPartial(base ?? ({} as any));
  4928. },
  4929. fromPartial<I extends Exact<DeepPartial<questActiveAward>, I>>(object: I): questActiveAward {
  4930. const message = createBasequestActiveAward();
  4931. message.type = object.type ?? 0;
  4932. return message;
  4933. },
  4934. };
  4935. function createBasequestActiveAwardRsp(): questActiveAwardRsp {
  4936. return { errno: 0, type: 0, award: 0 };
  4937. }
  4938. export const questActiveAwardRsp = {
  4939. fromJSON(object: any): questActiveAwardRsp {
  4940. return {
  4941. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  4942. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  4943. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  4944. };
  4945. },
  4946. toJSON(message: questActiveAwardRsp): unknown {
  4947. const obj: any = {};
  4948. if (message.errno !== 0) {
  4949. obj.errno = Math.round(message.errno);
  4950. }
  4951. if (message.type !== 0) {
  4952. obj.type = Math.round(message.type);
  4953. }
  4954. if (message.award !== 0) {
  4955. obj.award = Math.round(message.award);
  4956. }
  4957. return obj;
  4958. },
  4959. create<I extends Exact<DeepPartial<questActiveAwardRsp>, I>>(base?: I): questActiveAwardRsp {
  4960. return questActiveAwardRsp.fromPartial(base ?? ({} as any));
  4961. },
  4962. fromPartial<I extends Exact<DeepPartial<questActiveAwardRsp>, I>>(object: I): questActiveAwardRsp {
  4963. const message = createBasequestActiveAwardRsp();
  4964. message.errno = object.errno ?? 0;
  4965. message.type = object.type ?? 0;
  4966. message.award = object.award ?? 0;
  4967. return message;
  4968. },
  4969. };
  4970. function createBasequestCmplateNotify(): questCmplateNotify {
  4971. return { data: undefined };
  4972. }
  4973. export const questCmplateNotify = {
  4974. fromJSON(object: any): questCmplateNotify {
  4975. return { data: isSet(object.data) ? quest.fromJSON(object.data) : undefined };
  4976. },
  4977. toJSON(message: questCmplateNotify): unknown {
  4978. const obj: any = {};
  4979. if (message.data !== undefined) {
  4980. obj.data = quest.toJSON(message.data);
  4981. }
  4982. return obj;
  4983. },
  4984. create<I extends Exact<DeepPartial<questCmplateNotify>, I>>(base?: I): questCmplateNotify {
  4985. return questCmplateNotify.fromPartial(base ?? ({} as any));
  4986. },
  4987. fromPartial<I extends Exact<DeepPartial<questCmplateNotify>, I>>(object: I): questCmplateNotify {
  4988. const message = createBasequestCmplateNotify();
  4989. message.data = (object.data !== undefined && object.data !== null) ? quest.fromPartial(object.data) : undefined;
  4990. return message;
  4991. },
  4992. };
  4993. function createBasemanualGetData(): manualGetData {
  4994. return { moduleid: 0 };
  4995. }
  4996. export const manualGetData = {
  4997. fromJSON(object: any): manualGetData {
  4998. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  4999. },
  5000. toJSON(message: manualGetData): unknown {
  5001. const obj: any = {};
  5002. if (message.moduleid !== 0) {
  5003. obj.moduleid = Math.round(message.moduleid);
  5004. }
  5005. return obj;
  5006. },
  5007. create<I extends Exact<DeepPartial<manualGetData>, I>>(base?: I): manualGetData {
  5008. return manualGetData.fromPartial(base ?? ({} as any));
  5009. },
  5010. fromPartial<I extends Exact<DeepPartial<manualGetData>, I>>(object: I): manualGetData {
  5011. const message = createBasemanualGetData();
  5012. message.moduleid = object.moduleid ?? 0;
  5013. return message;
  5014. },
  5015. };
  5016. function createBasemanualGetDataRsp(): manualGetDataRsp {
  5017. return { errno: 0, open: false, openTime: 0, level: 0, exp: 0, round: 0, list: [], moduleid: 0 };
  5018. }
  5019. export const manualGetDataRsp = {
  5020. fromJSON(object: any): manualGetDataRsp {
  5021. return {
  5022. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5023. open: isSet(object.open) ? globalThis.Boolean(object.open) : false,
  5024. openTime: isSet(object.openTime) ? globalThis.Number(object.openTime) : 0,
  5025. level: isSet(object.level) ? globalThis.Number(object.level) : 0,
  5026. exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0,
  5027. round: isSet(object.round) ? globalThis.Number(object.round) : 0,
  5028. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => manual.fromJSON(e)) : [],
  5029. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  5030. };
  5031. },
  5032. toJSON(message: manualGetDataRsp): unknown {
  5033. const obj: any = {};
  5034. if (message.errno !== 0) {
  5035. obj.errno = Math.round(message.errno);
  5036. }
  5037. if (message.open !== false) {
  5038. obj.open = message.open;
  5039. }
  5040. if (message.openTime !== 0) {
  5041. obj.openTime = Math.round(message.openTime);
  5042. }
  5043. if (message.level !== 0) {
  5044. obj.level = Math.round(message.level);
  5045. }
  5046. if (message.exp !== 0) {
  5047. obj.exp = Math.round(message.exp);
  5048. }
  5049. if (message.round !== 0) {
  5050. obj.round = Math.round(message.round);
  5051. }
  5052. if (message.list?.length) {
  5053. obj.list = message.list.map((e) => manual.toJSON(e));
  5054. }
  5055. if (message.moduleid !== 0) {
  5056. obj.moduleid = Math.round(message.moduleid);
  5057. }
  5058. return obj;
  5059. },
  5060. create<I extends Exact<DeepPartial<manualGetDataRsp>, I>>(base?: I): manualGetDataRsp {
  5061. return manualGetDataRsp.fromPartial(base ?? ({} as any));
  5062. },
  5063. fromPartial<I extends Exact<DeepPartial<manualGetDataRsp>, I>>(object: I): manualGetDataRsp {
  5064. const message = createBasemanualGetDataRsp();
  5065. message.errno = object.errno ?? 0;
  5066. message.open = object.open ?? false;
  5067. message.openTime = object.openTime ?? 0;
  5068. message.level = object.level ?? 0;
  5069. message.exp = object.exp ?? 0;
  5070. message.round = object.round ?? 0;
  5071. message.list = object.list?.map((e) => manual.fromPartial(e)) || [];
  5072. message.moduleid = object.moduleid ?? 0;
  5073. return message;
  5074. },
  5075. };
  5076. function createBasemanualBuyExp(): manualBuyExp {
  5077. return { moduleid: 0 };
  5078. }
  5079. export const manualBuyExp = {
  5080. fromJSON(object: any): manualBuyExp {
  5081. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  5082. },
  5083. toJSON(message: manualBuyExp): unknown {
  5084. const obj: any = {};
  5085. if (message.moduleid !== 0) {
  5086. obj.moduleid = Math.round(message.moduleid);
  5087. }
  5088. return obj;
  5089. },
  5090. create<I extends Exact<DeepPartial<manualBuyExp>, I>>(base?: I): manualBuyExp {
  5091. return manualBuyExp.fromPartial(base ?? ({} as any));
  5092. },
  5093. fromPartial<I extends Exact<DeepPartial<manualBuyExp>, I>>(object: I): manualBuyExp {
  5094. const message = createBasemanualBuyExp();
  5095. message.moduleid = object.moduleid ?? 0;
  5096. return message;
  5097. },
  5098. };
  5099. function createBasemanualBuyExpRsp(): manualBuyExpRsp {
  5100. return { errno: 0, level: 0, exp: 0, moduleid: 0 };
  5101. }
  5102. export const manualBuyExpRsp = {
  5103. fromJSON(object: any): manualBuyExpRsp {
  5104. return {
  5105. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5106. level: isSet(object.level) ? globalThis.Number(object.level) : 0,
  5107. exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0,
  5108. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  5109. };
  5110. },
  5111. toJSON(message: manualBuyExpRsp): unknown {
  5112. const obj: any = {};
  5113. if (message.errno !== 0) {
  5114. obj.errno = Math.round(message.errno);
  5115. }
  5116. if (message.level !== 0) {
  5117. obj.level = Math.round(message.level);
  5118. }
  5119. if (message.exp !== 0) {
  5120. obj.exp = Math.round(message.exp);
  5121. }
  5122. if (message.moduleid !== 0) {
  5123. obj.moduleid = Math.round(message.moduleid);
  5124. }
  5125. return obj;
  5126. },
  5127. create<I extends Exact<DeepPartial<manualBuyExpRsp>, I>>(base?: I): manualBuyExpRsp {
  5128. return manualBuyExpRsp.fromPartial(base ?? ({} as any));
  5129. },
  5130. fromPartial<I extends Exact<DeepPartial<manualBuyExpRsp>, I>>(object: I): manualBuyExpRsp {
  5131. const message = createBasemanualBuyExpRsp();
  5132. message.errno = object.errno ?? 0;
  5133. message.level = object.level ?? 0;
  5134. message.exp = object.exp ?? 0;
  5135. message.moduleid = object.moduleid ?? 0;
  5136. return message;
  5137. },
  5138. };
  5139. function createBasemanualGetAward(): manualGetAward {
  5140. return { moduleid: 0 };
  5141. }
  5142. export const manualGetAward = {
  5143. fromJSON(object: any): manualGetAward {
  5144. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  5145. },
  5146. toJSON(message: manualGetAward): unknown {
  5147. const obj: any = {};
  5148. if (message.moduleid !== 0) {
  5149. obj.moduleid = Math.round(message.moduleid);
  5150. }
  5151. return obj;
  5152. },
  5153. create<I extends Exact<DeepPartial<manualGetAward>, I>>(base?: I): manualGetAward {
  5154. return manualGetAward.fromPartial(base ?? ({} as any));
  5155. },
  5156. fromPartial<I extends Exact<DeepPartial<manualGetAward>, I>>(object: I): manualGetAward {
  5157. const message = createBasemanualGetAward();
  5158. message.moduleid = object.moduleid ?? 0;
  5159. return message;
  5160. },
  5161. };
  5162. function createBasemanualGetAwardRsp(): manualGetAwardRsp {
  5163. return { errno: 0, award: 0, moduleid: 0 };
  5164. }
  5165. export const manualGetAwardRsp = {
  5166. fromJSON(object: any): manualGetAwardRsp {
  5167. return {
  5168. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5169. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  5170. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  5171. };
  5172. },
  5173. toJSON(message: manualGetAwardRsp): unknown {
  5174. const obj: any = {};
  5175. if (message.errno !== 0) {
  5176. obj.errno = Math.round(message.errno);
  5177. }
  5178. if (message.award !== 0) {
  5179. obj.award = Math.round(message.award);
  5180. }
  5181. if (message.moduleid !== 0) {
  5182. obj.moduleid = Math.round(message.moduleid);
  5183. }
  5184. return obj;
  5185. },
  5186. create<I extends Exact<DeepPartial<manualGetAwardRsp>, I>>(base?: I): manualGetAwardRsp {
  5187. return manualGetAwardRsp.fromPartial(base ?? ({} as any));
  5188. },
  5189. fromPartial<I extends Exact<DeepPartial<manualGetAwardRsp>, I>>(object: I): manualGetAwardRsp {
  5190. const message = createBasemanualGetAwardRsp();
  5191. message.errno = object.errno ?? 0;
  5192. message.award = object.award ?? 0;
  5193. message.moduleid = object.moduleid ?? 0;
  5194. return message;
  5195. },
  5196. };
  5197. function createBasemanualNotify(): manualNotify {
  5198. return { open: false, openTime: 0, level: 0, exp: 0, round: 0, list: [], moduleid: 0 };
  5199. }
  5200. export const manualNotify = {
  5201. fromJSON(object: any): manualNotify {
  5202. return {
  5203. open: isSet(object.open) ? globalThis.Boolean(object.open) : false,
  5204. openTime: isSet(object.openTime) ? globalThis.Number(object.openTime) : 0,
  5205. level: isSet(object.level) ? globalThis.Number(object.level) : 0,
  5206. exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0,
  5207. round: isSet(object.round) ? globalThis.Number(object.round) : 0,
  5208. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => manual.fromJSON(e)) : [],
  5209. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  5210. };
  5211. },
  5212. toJSON(message: manualNotify): unknown {
  5213. const obj: any = {};
  5214. if (message.open !== false) {
  5215. obj.open = message.open;
  5216. }
  5217. if (message.openTime !== 0) {
  5218. obj.openTime = Math.round(message.openTime);
  5219. }
  5220. if (message.level !== 0) {
  5221. obj.level = Math.round(message.level);
  5222. }
  5223. if (message.exp !== 0) {
  5224. obj.exp = Math.round(message.exp);
  5225. }
  5226. if (message.round !== 0) {
  5227. obj.round = Math.round(message.round);
  5228. }
  5229. if (message.list?.length) {
  5230. obj.list = message.list.map((e) => manual.toJSON(e));
  5231. }
  5232. if (message.moduleid !== 0) {
  5233. obj.moduleid = Math.round(message.moduleid);
  5234. }
  5235. return obj;
  5236. },
  5237. create<I extends Exact<DeepPartial<manualNotify>, I>>(base?: I): manualNotify {
  5238. return manualNotify.fromPartial(base ?? ({} as any));
  5239. },
  5240. fromPartial<I extends Exact<DeepPartial<manualNotify>, I>>(object: I): manualNotify {
  5241. const message = createBasemanualNotify();
  5242. message.open = object.open ?? false;
  5243. message.openTime = object.openTime ?? 0;
  5244. message.level = object.level ?? 0;
  5245. message.exp = object.exp ?? 0;
  5246. message.round = object.round ?? 0;
  5247. message.list = object.list?.map((e) => manual.fromPartial(e)) || [];
  5248. message.moduleid = object.moduleid ?? 0;
  5249. return message;
  5250. },
  5251. };
  5252. function createBasemanualBuy(): manualBuy {
  5253. return { giftid: 0, moduleid: 0 };
  5254. }
  5255. export const manualBuy = {
  5256. fromJSON(object: any): manualBuy {
  5257. return {
  5258. giftid: isSet(object.giftid) ? globalThis.Number(object.giftid) : 0,
  5259. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  5260. };
  5261. },
  5262. toJSON(message: manualBuy): unknown {
  5263. const obj: any = {};
  5264. if (message.giftid !== 0) {
  5265. obj.giftid = Math.round(message.giftid);
  5266. }
  5267. if (message.moduleid !== 0) {
  5268. obj.moduleid = Math.round(message.moduleid);
  5269. }
  5270. return obj;
  5271. },
  5272. create<I extends Exact<DeepPartial<manualBuy>, I>>(base?: I): manualBuy {
  5273. return manualBuy.fromPartial(base ?? ({} as any));
  5274. },
  5275. fromPartial<I extends Exact<DeepPartial<manualBuy>, I>>(object: I): manualBuy {
  5276. const message = createBasemanualBuy();
  5277. message.giftid = object.giftid ?? 0;
  5278. message.moduleid = object.moduleid ?? 0;
  5279. return message;
  5280. },
  5281. };
  5282. function createBasemanualBuyRsp(): manualBuyRsp {
  5283. return { errno: 0, moduleid: 0 };
  5284. }
  5285. export const manualBuyRsp = {
  5286. fromJSON(object: any): manualBuyRsp {
  5287. return {
  5288. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5289. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  5290. };
  5291. },
  5292. toJSON(message: manualBuyRsp): unknown {
  5293. const obj: any = {};
  5294. if (message.errno !== 0) {
  5295. obj.errno = Math.round(message.errno);
  5296. }
  5297. if (message.moduleid !== 0) {
  5298. obj.moduleid = Math.round(message.moduleid);
  5299. }
  5300. return obj;
  5301. },
  5302. create<I extends Exact<DeepPartial<manualBuyRsp>, I>>(base?: I): manualBuyRsp {
  5303. return manualBuyRsp.fromPartial(base ?? ({} as any));
  5304. },
  5305. fromPartial<I extends Exact<DeepPartial<manualBuyRsp>, I>>(object: I): manualBuyRsp {
  5306. const message = createBasemanualBuyRsp();
  5307. message.errno = object.errno ?? 0;
  5308. message.moduleid = object.moduleid ?? 0;
  5309. return message;
  5310. },
  5311. };
  5312. function createBasedraw(): draw {
  5313. return { drawType: 0, payType: 0, num: 0 };
  5314. }
  5315. export const draw = {
  5316. fromJSON(object: any): draw {
  5317. return {
  5318. drawType: isSet(object.drawType) ? globalThis.Number(object.drawType) : 0,
  5319. payType: isSet(object.payType) ? globalThis.Number(object.payType) : 0,
  5320. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  5321. };
  5322. },
  5323. toJSON(message: draw): unknown {
  5324. const obj: any = {};
  5325. if (message.drawType !== 0) {
  5326. obj.drawType = Math.round(message.drawType);
  5327. }
  5328. if (message.payType !== 0) {
  5329. obj.payType = Math.round(message.payType);
  5330. }
  5331. if (message.num !== 0) {
  5332. obj.num = Math.round(message.num);
  5333. }
  5334. return obj;
  5335. },
  5336. create<I extends Exact<DeepPartial<draw>, I>>(base?: I): draw {
  5337. return draw.fromPartial(base ?? ({} as any));
  5338. },
  5339. fromPartial<I extends Exact<DeepPartial<draw>, I>>(object: I): draw {
  5340. const message = createBasedraw();
  5341. message.drawType = object.drawType ?? 0;
  5342. message.payType = object.payType ?? 0;
  5343. message.num = object.num ?? 0;
  5344. return message;
  5345. },
  5346. };
  5347. function createBasedrawRsp(): drawRsp {
  5348. return { errno: 0, drawType: 0, daily: 0, free: 0, list: [], awardList: [] };
  5349. }
  5350. export const drawRsp = {
  5351. fromJSON(object: any): drawRsp {
  5352. return {
  5353. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5354. drawType: isSet(object.drawType) ? globalThis.Number(object.drawType) : 0,
  5355. daily: isSet(object.daily) ? globalThis.Number(object.daily) : 0,
  5356. free: isSet(object.free) ? globalThis.Number(object.free) : 0,
  5357. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.Number(e)) : [],
  5358. awardList: globalThis.Array.isArray(object?.awardList)
  5359. ? object.awardList.map((e: any) => drawAwardInfo.fromJSON(e))
  5360. : [],
  5361. };
  5362. },
  5363. toJSON(message: drawRsp): unknown {
  5364. const obj: any = {};
  5365. if (message.errno !== 0) {
  5366. obj.errno = Math.round(message.errno);
  5367. }
  5368. if (message.drawType !== 0) {
  5369. obj.drawType = Math.round(message.drawType);
  5370. }
  5371. if (message.daily !== 0) {
  5372. obj.daily = Math.round(message.daily);
  5373. }
  5374. if (message.free !== 0) {
  5375. obj.free = Math.round(message.free);
  5376. }
  5377. if (message.list?.length) {
  5378. obj.list = message.list.map((e) => Math.round(e));
  5379. }
  5380. if (message.awardList?.length) {
  5381. obj.awardList = message.awardList.map((e) => drawAwardInfo.toJSON(e));
  5382. }
  5383. return obj;
  5384. },
  5385. create<I extends Exact<DeepPartial<drawRsp>, I>>(base?: I): drawRsp {
  5386. return drawRsp.fromPartial(base ?? ({} as any));
  5387. },
  5388. fromPartial<I extends Exact<DeepPartial<drawRsp>, I>>(object: I): drawRsp {
  5389. const message = createBasedrawRsp();
  5390. message.errno = object.errno ?? 0;
  5391. message.drawType = object.drawType ?? 0;
  5392. message.daily = object.daily ?? 0;
  5393. message.free = object.free ?? 0;
  5394. message.list = object.list?.map((e) => e) || [];
  5395. message.awardList = object.awardList?.map((e) => drawAwardInfo.fromPartial(e)) || [];
  5396. return message;
  5397. },
  5398. };
  5399. function createBasedrawGetData(): drawGetData {
  5400. return {};
  5401. }
  5402. export const drawGetData = {
  5403. fromJSON(_: any): drawGetData {
  5404. return {};
  5405. },
  5406. toJSON(_: drawGetData): unknown {
  5407. const obj: any = {};
  5408. return obj;
  5409. },
  5410. create<I extends Exact<DeepPartial<drawGetData>, I>>(base?: I): drawGetData {
  5411. return drawGetData.fromPartial(base ?? ({} as any));
  5412. },
  5413. fromPartial<I extends Exact<DeepPartial<drawGetData>, I>>(_: I): drawGetData {
  5414. const message = createBasedrawGetData();
  5415. return message;
  5416. },
  5417. };
  5418. function createBasedrawGetDataRsp(): drawGetDataRsp {
  5419. return { errno: 0, hero: undefined, hero2: undefined, equip: undefined };
  5420. }
  5421. export const drawGetDataRsp = {
  5422. fromJSON(object: any): drawGetDataRsp {
  5423. return {
  5424. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5425. hero: isSet(object.hero) ? drawInfo.fromJSON(object.hero) : undefined,
  5426. hero2: isSet(object.hero2) ? drawInfo.fromJSON(object.hero2) : undefined,
  5427. equip: isSet(object.equip) ? drawInfo.fromJSON(object.equip) : undefined,
  5428. };
  5429. },
  5430. toJSON(message: drawGetDataRsp): unknown {
  5431. const obj: any = {};
  5432. if (message.errno !== 0) {
  5433. obj.errno = Math.round(message.errno);
  5434. }
  5435. if (message.hero !== undefined) {
  5436. obj.hero = drawInfo.toJSON(message.hero);
  5437. }
  5438. if (message.hero2 !== undefined) {
  5439. obj.hero2 = drawInfo.toJSON(message.hero2);
  5440. }
  5441. if (message.equip !== undefined) {
  5442. obj.equip = drawInfo.toJSON(message.equip);
  5443. }
  5444. return obj;
  5445. },
  5446. create<I extends Exact<DeepPartial<drawGetDataRsp>, I>>(base?: I): drawGetDataRsp {
  5447. return drawGetDataRsp.fromPartial(base ?? ({} as any));
  5448. },
  5449. fromPartial<I extends Exact<DeepPartial<drawGetDataRsp>, I>>(object: I): drawGetDataRsp {
  5450. const message = createBasedrawGetDataRsp();
  5451. message.errno = object.errno ?? 0;
  5452. message.hero = (object.hero !== undefined && object.hero !== null) ? drawInfo.fromPartial(object.hero) : undefined;
  5453. message.hero2 = (object.hero2 !== undefined && object.hero2 !== null)
  5454. ? drawInfo.fromPartial(object.hero2)
  5455. : undefined;
  5456. message.equip = (object.equip !== undefined && object.equip !== null)
  5457. ? drawInfo.fromPartial(object.equip)
  5458. : undefined;
  5459. return message;
  5460. },
  5461. };
  5462. function createBaseshopData(): shopData {
  5463. return {};
  5464. }
  5465. export const shopData = {
  5466. fromJSON(_: any): shopData {
  5467. return {};
  5468. },
  5469. toJSON(_: shopData): unknown {
  5470. const obj: any = {};
  5471. return obj;
  5472. },
  5473. create<I extends Exact<DeepPartial<shopData>, I>>(base?: I): shopData {
  5474. return shopData.fromPartial(base ?? ({} as any));
  5475. },
  5476. fromPartial<I extends Exact<DeepPartial<shopData>, I>>(_: I): shopData {
  5477. const message = createBaseshopData();
  5478. return message;
  5479. },
  5480. };
  5481. function createBaseshopDataRsp(): shopDataRsp {
  5482. return { errno: 0, list: [] };
  5483. }
  5484. export const shopDataRsp = {
  5485. fromJSON(object: any): shopDataRsp {
  5486. return {
  5487. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5488. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => shopInfo.fromJSON(e)) : [],
  5489. };
  5490. },
  5491. toJSON(message: shopDataRsp): unknown {
  5492. const obj: any = {};
  5493. if (message.errno !== 0) {
  5494. obj.errno = Math.round(message.errno);
  5495. }
  5496. if (message.list?.length) {
  5497. obj.list = message.list.map((e) => shopInfo.toJSON(e));
  5498. }
  5499. return obj;
  5500. },
  5501. create<I extends Exact<DeepPartial<shopDataRsp>, I>>(base?: I): shopDataRsp {
  5502. return shopDataRsp.fromPartial(base ?? ({} as any));
  5503. },
  5504. fromPartial<I extends Exact<DeepPartial<shopDataRsp>, I>>(object: I): shopDataRsp {
  5505. const message = createBaseshopDataRsp();
  5506. message.errno = object.errno ?? 0;
  5507. message.list = object.list?.map((e) => shopInfo.fromPartial(e)) || [];
  5508. return message;
  5509. },
  5510. };
  5511. function createBaseshopBuy(): shopBuy {
  5512. return { type: 0, id: 0, num: 0 };
  5513. }
  5514. export const shopBuy = {
  5515. fromJSON(object: any): shopBuy {
  5516. return {
  5517. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  5518. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  5519. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  5520. };
  5521. },
  5522. toJSON(message: shopBuy): unknown {
  5523. const obj: any = {};
  5524. if (message.type !== 0) {
  5525. obj.type = Math.round(message.type);
  5526. }
  5527. if (message.id !== 0) {
  5528. obj.id = Math.round(message.id);
  5529. }
  5530. if (message.num !== 0) {
  5531. obj.num = Math.round(message.num);
  5532. }
  5533. return obj;
  5534. },
  5535. create<I extends Exact<DeepPartial<shopBuy>, I>>(base?: I): shopBuy {
  5536. return shopBuy.fromPartial(base ?? ({} as any));
  5537. },
  5538. fromPartial<I extends Exact<DeepPartial<shopBuy>, I>>(object: I): shopBuy {
  5539. const message = createBaseshopBuy();
  5540. message.type = object.type ?? 0;
  5541. message.id = object.id ?? 0;
  5542. message.num = object.num ?? 0;
  5543. return message;
  5544. },
  5545. };
  5546. function createBaseshopBuyRsp(): shopBuyRsp {
  5547. return { errno: 0 };
  5548. }
  5549. export const shopBuyRsp = {
  5550. fromJSON(object: any): shopBuyRsp {
  5551. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  5552. },
  5553. toJSON(message: shopBuyRsp): unknown {
  5554. const obj: any = {};
  5555. if (message.errno !== 0) {
  5556. obj.errno = Math.round(message.errno);
  5557. }
  5558. return obj;
  5559. },
  5560. create<I extends Exact<DeepPartial<shopBuyRsp>, I>>(base?: I): shopBuyRsp {
  5561. return shopBuyRsp.fromPartial(base ?? ({} as any));
  5562. },
  5563. fromPartial<I extends Exact<DeepPartial<shopBuyRsp>, I>>(object: I): shopBuyRsp {
  5564. const message = createBaseshopBuyRsp();
  5565. message.errno = object.errno ?? 0;
  5566. return message;
  5567. },
  5568. };
  5569. function createBaseshopNotify(): shopNotify {
  5570. return { type: 0, id: 0, num: 0 };
  5571. }
  5572. export const shopNotify = {
  5573. fromJSON(object: any): shopNotify {
  5574. return {
  5575. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  5576. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  5577. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  5578. };
  5579. },
  5580. toJSON(message: shopNotify): unknown {
  5581. const obj: any = {};
  5582. if (message.type !== 0) {
  5583. obj.type = Math.round(message.type);
  5584. }
  5585. if (message.id !== 0) {
  5586. obj.id = Math.round(message.id);
  5587. }
  5588. if (message.num !== 0) {
  5589. obj.num = Math.round(message.num);
  5590. }
  5591. return obj;
  5592. },
  5593. create<I extends Exact<DeepPartial<shopNotify>, I>>(base?: I): shopNotify {
  5594. return shopNotify.fromPartial(base ?? ({} as any));
  5595. },
  5596. fromPartial<I extends Exact<DeepPartial<shopNotify>, I>>(object: I): shopNotify {
  5597. const message = createBaseshopNotify();
  5598. message.type = object.type ?? 0;
  5599. message.id = object.id ?? 0;
  5600. message.num = object.num ?? 0;
  5601. return message;
  5602. },
  5603. };
  5604. function createBaserankingData(): rankingData {
  5605. return { type: 0 };
  5606. }
  5607. export const rankingData = {
  5608. fromJSON(object: any): rankingData {
  5609. return { type: isSet(object.type) ? globalThis.Number(object.type) : 0 };
  5610. },
  5611. toJSON(message: rankingData): unknown {
  5612. const obj: any = {};
  5613. if (message.type !== 0) {
  5614. obj.type = Math.round(message.type);
  5615. }
  5616. return obj;
  5617. },
  5618. create<I extends Exact<DeepPartial<rankingData>, I>>(base?: I): rankingData {
  5619. return rankingData.fromPartial(base ?? ({} as any));
  5620. },
  5621. fromPartial<I extends Exact<DeepPartial<rankingData>, I>>(object: I): rankingData {
  5622. const message = createBaserankingData();
  5623. message.type = object.type ?? 0;
  5624. return message;
  5625. },
  5626. };
  5627. function createBaserankingDataRsp(): rankingDataRsp {
  5628. return { errno: 0, type: 0, list: [], myslef: undefined };
  5629. }
  5630. export const rankingDataRsp = {
  5631. fromJSON(object: any): rankingDataRsp {
  5632. return {
  5633. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5634. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  5635. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => rankingInfo.fromJSON(e)) : [],
  5636. myslef: isSet(object.myslef) ? rankingInfo.fromJSON(object.myslef) : undefined,
  5637. };
  5638. },
  5639. toJSON(message: rankingDataRsp): unknown {
  5640. const obj: any = {};
  5641. if (message.errno !== 0) {
  5642. obj.errno = Math.round(message.errno);
  5643. }
  5644. if (message.type !== 0) {
  5645. obj.type = Math.round(message.type);
  5646. }
  5647. if (message.list?.length) {
  5648. obj.list = message.list.map((e) => rankingInfo.toJSON(e));
  5649. }
  5650. if (message.myslef !== undefined) {
  5651. obj.myslef = rankingInfo.toJSON(message.myslef);
  5652. }
  5653. return obj;
  5654. },
  5655. create<I extends Exact<DeepPartial<rankingDataRsp>, I>>(base?: I): rankingDataRsp {
  5656. return rankingDataRsp.fromPartial(base ?? ({} as any));
  5657. },
  5658. fromPartial<I extends Exact<DeepPartial<rankingDataRsp>, I>>(object: I): rankingDataRsp {
  5659. const message = createBaserankingDataRsp();
  5660. message.errno = object.errno ?? 0;
  5661. message.type = object.type ?? 0;
  5662. message.list = object.list?.map((e) => rankingInfo.fromPartial(e)) || [];
  5663. message.myslef = (object.myslef !== undefined && object.myslef !== null)
  5664. ? rankingInfo.fromPartial(object.myslef)
  5665. : undefined;
  5666. return message;
  5667. },
  5668. };
  5669. function createBasegroceryData(): groceryData {
  5670. return { type: 0 };
  5671. }
  5672. export const groceryData = {
  5673. fromJSON(object: any): groceryData {
  5674. return { type: isSet(object.type) ? globalThis.Number(object.type) : 0 };
  5675. },
  5676. toJSON(message: groceryData): unknown {
  5677. const obj: any = {};
  5678. if (message.type !== 0) {
  5679. obj.type = Math.round(message.type);
  5680. }
  5681. return obj;
  5682. },
  5683. create<I extends Exact<DeepPartial<groceryData>, I>>(base?: I): groceryData {
  5684. return groceryData.fromPartial(base ?? ({} as any));
  5685. },
  5686. fromPartial<I extends Exact<DeepPartial<groceryData>, I>>(object: I): groceryData {
  5687. const message = createBasegroceryData();
  5688. message.type = object.type ?? 0;
  5689. return message;
  5690. },
  5691. };
  5692. function createBasegroceryDataRsp(): groceryDataRsp {
  5693. return { errno: 0, data: undefined };
  5694. }
  5695. export const groceryDataRsp = {
  5696. fromJSON(object: any): groceryDataRsp {
  5697. return {
  5698. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5699. data: isSet(object.data) ? groceryInfo.fromJSON(object.data) : undefined,
  5700. };
  5701. },
  5702. toJSON(message: groceryDataRsp): unknown {
  5703. const obj: any = {};
  5704. if (message.errno !== 0) {
  5705. obj.errno = Math.round(message.errno);
  5706. }
  5707. if (message.data !== undefined) {
  5708. obj.data = groceryInfo.toJSON(message.data);
  5709. }
  5710. return obj;
  5711. },
  5712. create<I extends Exact<DeepPartial<groceryDataRsp>, I>>(base?: I): groceryDataRsp {
  5713. return groceryDataRsp.fromPartial(base ?? ({} as any));
  5714. },
  5715. fromPartial<I extends Exact<DeepPartial<groceryDataRsp>, I>>(object: I): groceryDataRsp {
  5716. const message = createBasegroceryDataRsp();
  5717. message.errno = object.errno ?? 0;
  5718. message.data = (object.data !== undefined && object.data !== null)
  5719. ? groceryInfo.fromPartial(object.data)
  5720. : undefined;
  5721. return message;
  5722. },
  5723. };
  5724. function createBasegroceryBuy(): groceryBuy {
  5725. return { type: 0, free: false };
  5726. }
  5727. export const groceryBuy = {
  5728. fromJSON(object: any): groceryBuy {
  5729. return {
  5730. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  5731. free: isSet(object.free) ? globalThis.Boolean(object.free) : false,
  5732. };
  5733. },
  5734. toJSON(message: groceryBuy): unknown {
  5735. const obj: any = {};
  5736. if (message.type !== 0) {
  5737. obj.type = Math.round(message.type);
  5738. }
  5739. if (message.free !== false) {
  5740. obj.free = message.free;
  5741. }
  5742. return obj;
  5743. },
  5744. create<I extends Exact<DeepPartial<groceryBuy>, I>>(base?: I): groceryBuy {
  5745. return groceryBuy.fromPartial(base ?? ({} as any));
  5746. },
  5747. fromPartial<I extends Exact<DeepPartial<groceryBuy>, I>>(object: I): groceryBuy {
  5748. const message = createBasegroceryBuy();
  5749. message.type = object.type ?? 0;
  5750. message.free = object.free ?? false;
  5751. return message;
  5752. },
  5753. };
  5754. function createBasegroceryBuyRsp(): groceryBuyRsp {
  5755. return { errno: 0, data: undefined };
  5756. }
  5757. export const groceryBuyRsp = {
  5758. fromJSON(object: any): groceryBuyRsp {
  5759. return {
  5760. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5761. data: isSet(object.data) ? groceryInfo.fromJSON(object.data) : undefined,
  5762. };
  5763. },
  5764. toJSON(message: groceryBuyRsp): unknown {
  5765. const obj: any = {};
  5766. if (message.errno !== 0) {
  5767. obj.errno = Math.round(message.errno);
  5768. }
  5769. if (message.data !== undefined) {
  5770. obj.data = groceryInfo.toJSON(message.data);
  5771. }
  5772. return obj;
  5773. },
  5774. create<I extends Exact<DeepPartial<groceryBuyRsp>, I>>(base?: I): groceryBuyRsp {
  5775. return groceryBuyRsp.fromPartial(base ?? ({} as any));
  5776. },
  5777. fromPartial<I extends Exact<DeepPartial<groceryBuyRsp>, I>>(object: I): groceryBuyRsp {
  5778. const message = createBasegroceryBuyRsp();
  5779. message.errno = object.errno ?? 0;
  5780. message.data = (object.data !== undefined && object.data !== null)
  5781. ? groceryInfo.fromPartial(object.data)
  5782. : undefined;
  5783. return message;
  5784. },
  5785. };
  5786. function createBasealtarData(): altarData {
  5787. return {};
  5788. }
  5789. export const altarData = {
  5790. fromJSON(_: any): altarData {
  5791. return {};
  5792. },
  5793. toJSON(_: altarData): unknown {
  5794. const obj: any = {};
  5795. return obj;
  5796. },
  5797. create<I extends Exact<DeepPartial<altarData>, I>>(base?: I): altarData {
  5798. return altarData.fromPartial(base ?? ({} as any));
  5799. },
  5800. fromPartial<I extends Exact<DeepPartial<altarData>, I>>(_: I): altarData {
  5801. const message = createBasealtarData();
  5802. return message;
  5803. },
  5804. };
  5805. function createBasealtarDataRsp(): altarDataRsp {
  5806. return { errno: 0, baseList: [], list: [], buyNum: 0, equipFree: 0, heroFree: 0 };
  5807. }
  5808. export const altarDataRsp = {
  5809. fromJSON(object: any): altarDataRsp {
  5810. return {
  5811. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5812. baseList: globalThis.Array.isArray(object?.baseList) ? object.baseList.map((e: any) => globalThis.String(e)) : [],
  5813. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => altarInfo.fromJSON(e)) : [],
  5814. buyNum: isSet(object.buyNum) ? globalThis.Number(object.buyNum) : 0,
  5815. equipFree: isSet(object.equipFree) ? globalThis.Number(object.equipFree) : 0,
  5816. heroFree: isSet(object.heroFree) ? globalThis.Number(object.heroFree) : 0,
  5817. };
  5818. },
  5819. toJSON(message: altarDataRsp): unknown {
  5820. const obj: any = {};
  5821. if (message.errno !== 0) {
  5822. obj.errno = Math.round(message.errno);
  5823. }
  5824. if (message.baseList?.length) {
  5825. obj.baseList = message.baseList;
  5826. }
  5827. if (message.list?.length) {
  5828. obj.list = message.list.map((e) => altarInfo.toJSON(e));
  5829. }
  5830. if (message.buyNum !== 0) {
  5831. obj.buyNum = Math.round(message.buyNum);
  5832. }
  5833. if (message.equipFree !== 0) {
  5834. obj.equipFree = Math.round(message.equipFree);
  5835. }
  5836. if (message.heroFree !== 0) {
  5837. obj.heroFree = Math.round(message.heroFree);
  5838. }
  5839. return obj;
  5840. },
  5841. create<I extends Exact<DeepPartial<altarDataRsp>, I>>(base?: I): altarDataRsp {
  5842. return altarDataRsp.fromPartial(base ?? ({} as any));
  5843. },
  5844. fromPartial<I extends Exact<DeepPartial<altarDataRsp>, I>>(object: I): altarDataRsp {
  5845. const message = createBasealtarDataRsp();
  5846. message.errno = object.errno ?? 0;
  5847. message.baseList = object.baseList?.map((e) => e) || [];
  5848. message.list = object.list?.map((e) => altarInfo.fromPartial(e)) || [];
  5849. message.buyNum = object.buyNum ?? 0;
  5850. message.equipFree = object.equipFree ?? 0;
  5851. message.heroFree = object.heroFree ?? 0;
  5852. return message;
  5853. },
  5854. };
  5855. function createBasealtarBattle(): altarBattle {
  5856. return { pos: 0, sid: "" };
  5857. }
  5858. export const altarBattle = {
  5859. fromJSON(object: any): altarBattle {
  5860. return {
  5861. pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0,
  5862. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  5863. };
  5864. },
  5865. toJSON(message: altarBattle): unknown {
  5866. const obj: any = {};
  5867. if (message.pos !== 0) {
  5868. obj.pos = Math.round(message.pos);
  5869. }
  5870. if (message.sid !== "") {
  5871. obj.sid = message.sid;
  5872. }
  5873. return obj;
  5874. },
  5875. create<I extends Exact<DeepPartial<altarBattle>, I>>(base?: I): altarBattle {
  5876. return altarBattle.fromPartial(base ?? ({} as any));
  5877. },
  5878. fromPartial<I extends Exact<DeepPartial<altarBattle>, I>>(object: I): altarBattle {
  5879. const message = createBasealtarBattle();
  5880. message.pos = object.pos ?? 0;
  5881. message.sid = object.sid ?? "";
  5882. return message;
  5883. },
  5884. };
  5885. function createBasealtarBattleRsp(): altarBattleRsp {
  5886. return { errno: 0, pos: 0, data: undefined };
  5887. }
  5888. export const altarBattleRsp = {
  5889. fromJSON(object: any): altarBattleRsp {
  5890. return {
  5891. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5892. pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0,
  5893. data: isSet(object.data) ? altarInfo.fromJSON(object.data) : undefined,
  5894. };
  5895. },
  5896. toJSON(message: altarBattleRsp): unknown {
  5897. const obj: any = {};
  5898. if (message.errno !== 0) {
  5899. obj.errno = Math.round(message.errno);
  5900. }
  5901. if (message.pos !== 0) {
  5902. obj.pos = Math.round(message.pos);
  5903. }
  5904. if (message.data !== undefined) {
  5905. obj.data = altarInfo.toJSON(message.data);
  5906. }
  5907. return obj;
  5908. },
  5909. create<I extends Exact<DeepPartial<altarBattleRsp>, I>>(base?: I): altarBattleRsp {
  5910. return altarBattleRsp.fromPartial(base ?? ({} as any));
  5911. },
  5912. fromPartial<I extends Exact<DeepPartial<altarBattleRsp>, I>>(object: I): altarBattleRsp {
  5913. const message = createBasealtarBattleRsp();
  5914. message.errno = object.errno ?? 0;
  5915. message.pos = object.pos ?? 0;
  5916. message.data = (object.data !== undefined && object.data !== null) ? altarInfo.fromPartial(object.data) : undefined;
  5917. return message;
  5918. },
  5919. };
  5920. function createBasealtarExchange(): altarExchange {
  5921. return { type: 0, sid: "" };
  5922. }
  5923. export const altarExchange = {
  5924. fromJSON(object: any): altarExchange {
  5925. return {
  5926. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  5927. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  5928. };
  5929. },
  5930. toJSON(message: altarExchange): unknown {
  5931. const obj: any = {};
  5932. if (message.type !== 0) {
  5933. obj.type = Math.round(message.type);
  5934. }
  5935. if (message.sid !== "") {
  5936. obj.sid = message.sid;
  5937. }
  5938. return obj;
  5939. },
  5940. create<I extends Exact<DeepPartial<altarExchange>, I>>(base?: I): altarExchange {
  5941. return altarExchange.fromPartial(base ?? ({} as any));
  5942. },
  5943. fromPartial<I extends Exact<DeepPartial<altarExchange>, I>>(object: I): altarExchange {
  5944. const message = createBasealtarExchange();
  5945. message.type = object.type ?? 0;
  5946. message.sid = object.sid ?? "";
  5947. return message;
  5948. },
  5949. };
  5950. function createBasealtarExchangeRsp(): altarExchangeRsp {
  5951. return { errno: 0, type: 0, sid: "", id: 0 };
  5952. }
  5953. export const altarExchangeRsp = {
  5954. fromJSON(object: any): altarExchangeRsp {
  5955. return {
  5956. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  5957. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  5958. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  5959. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  5960. };
  5961. },
  5962. toJSON(message: altarExchangeRsp): unknown {
  5963. const obj: any = {};
  5964. if (message.errno !== 0) {
  5965. obj.errno = Math.round(message.errno);
  5966. }
  5967. if (message.type !== 0) {
  5968. obj.type = Math.round(message.type);
  5969. }
  5970. if (message.sid !== "") {
  5971. obj.sid = message.sid;
  5972. }
  5973. if (message.id !== 0) {
  5974. obj.id = Math.round(message.id);
  5975. }
  5976. return obj;
  5977. },
  5978. create<I extends Exact<DeepPartial<altarExchangeRsp>, I>>(base?: I): altarExchangeRsp {
  5979. return altarExchangeRsp.fromPartial(base ?? ({} as any));
  5980. },
  5981. fromPartial<I extends Exact<DeepPartial<altarExchangeRsp>, I>>(object: I): altarExchangeRsp {
  5982. const message = createBasealtarExchangeRsp();
  5983. message.errno = object.errno ?? 0;
  5984. message.type = object.type ?? 0;
  5985. message.sid = object.sid ?? "";
  5986. message.id = object.id ?? 0;
  5987. return message;
  5988. },
  5989. };
  5990. function createBasealtarExchangeConfirm(): altarExchangeConfirm {
  5991. return { type: 0, sid: "", change: false };
  5992. }
  5993. export const altarExchangeConfirm = {
  5994. fromJSON(object: any): altarExchangeConfirm {
  5995. return {
  5996. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  5997. sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
  5998. change: isSet(object.change) ? globalThis.Boolean(object.change) : false,
  5999. };
  6000. },
  6001. toJSON(message: altarExchangeConfirm): unknown {
  6002. const obj: any = {};
  6003. if (message.type !== 0) {
  6004. obj.type = Math.round(message.type);
  6005. }
  6006. if (message.sid !== "") {
  6007. obj.sid = message.sid;
  6008. }
  6009. if (message.change !== false) {
  6010. obj.change = message.change;
  6011. }
  6012. return obj;
  6013. },
  6014. create<I extends Exact<DeepPartial<altarExchangeConfirm>, I>>(base?: I): altarExchangeConfirm {
  6015. return altarExchangeConfirm.fromPartial(base ?? ({} as any));
  6016. },
  6017. fromPartial<I extends Exact<DeepPartial<altarExchangeConfirm>, I>>(object: I): altarExchangeConfirm {
  6018. const message = createBasealtarExchangeConfirm();
  6019. message.type = object.type ?? 0;
  6020. message.sid = object.sid ?? "";
  6021. message.change = object.change ?? false;
  6022. return message;
  6023. },
  6024. };
  6025. function createBasealtarExchangeConfirmRsp(): altarExchangeConfirmRsp {
  6026. return { errno: 0 };
  6027. }
  6028. export const altarExchangeConfirmRsp = {
  6029. fromJSON(object: any): altarExchangeConfirmRsp {
  6030. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  6031. },
  6032. toJSON(message: altarExchangeConfirmRsp): unknown {
  6033. const obj: any = {};
  6034. if (message.errno !== 0) {
  6035. obj.errno = Math.round(message.errno);
  6036. }
  6037. return obj;
  6038. },
  6039. create<I extends Exact<DeepPartial<altarExchangeConfirmRsp>, I>>(base?: I): altarExchangeConfirmRsp {
  6040. return altarExchangeConfirmRsp.fromPartial(base ?? ({} as any));
  6041. },
  6042. fromPartial<I extends Exact<DeepPartial<altarExchangeConfirmRsp>, I>>(object: I): altarExchangeConfirmRsp {
  6043. const message = createBasealtarExchangeConfirmRsp();
  6044. message.errno = object.errno ?? 0;
  6045. return message;
  6046. },
  6047. };
  6048. function createBasealtarBuyBattleSpace(): altarBuyBattleSpace {
  6049. return {};
  6050. }
  6051. export const altarBuyBattleSpace = {
  6052. fromJSON(_: any): altarBuyBattleSpace {
  6053. return {};
  6054. },
  6055. toJSON(_: altarBuyBattleSpace): unknown {
  6056. const obj: any = {};
  6057. return obj;
  6058. },
  6059. create<I extends Exact<DeepPartial<altarBuyBattleSpace>, I>>(base?: I): altarBuyBattleSpace {
  6060. return altarBuyBattleSpace.fromPartial(base ?? ({} as any));
  6061. },
  6062. fromPartial<I extends Exact<DeepPartial<altarBuyBattleSpace>, I>>(_: I): altarBuyBattleSpace {
  6063. const message = createBasealtarBuyBattleSpace();
  6064. return message;
  6065. },
  6066. };
  6067. function createBasealtarBuyBattleSpaceRsp(): altarBuyBattleSpaceRsp {
  6068. return { errno: 0, pos: 0, data: undefined };
  6069. }
  6070. export const altarBuyBattleSpaceRsp = {
  6071. fromJSON(object: any): altarBuyBattleSpaceRsp {
  6072. return {
  6073. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  6074. pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0,
  6075. data: isSet(object.data) ? altarInfo.fromJSON(object.data) : undefined,
  6076. };
  6077. },
  6078. toJSON(message: altarBuyBattleSpaceRsp): unknown {
  6079. const obj: any = {};
  6080. if (message.errno !== 0) {
  6081. obj.errno = Math.round(message.errno);
  6082. }
  6083. if (message.pos !== 0) {
  6084. obj.pos = Math.round(message.pos);
  6085. }
  6086. if (message.data !== undefined) {
  6087. obj.data = altarInfo.toJSON(message.data);
  6088. }
  6089. return obj;
  6090. },
  6091. create<I extends Exact<DeepPartial<altarBuyBattleSpaceRsp>, I>>(base?: I): altarBuyBattleSpaceRsp {
  6092. return altarBuyBattleSpaceRsp.fromPartial(base ?? ({} as any));
  6093. },
  6094. fromPartial<I extends Exact<DeepPartial<altarBuyBattleSpaceRsp>, I>>(object: I): altarBuyBattleSpaceRsp {
  6095. const message = createBasealtarBuyBattleSpaceRsp();
  6096. message.errno = object.errno ?? 0;
  6097. message.pos = object.pos ?? 0;
  6098. message.data = (object.data !== undefined && object.data !== null) ? altarInfo.fromPartial(object.data) : undefined;
  6099. return message;
  6100. },
  6101. };
  6102. function createBasealtarResetCd(): altarResetCd {
  6103. return { pos: 0 };
  6104. }
  6105. export const altarResetCd = {
  6106. fromJSON(object: any): altarResetCd {
  6107. return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0 };
  6108. },
  6109. toJSON(message: altarResetCd): unknown {
  6110. const obj: any = {};
  6111. if (message.pos !== 0) {
  6112. obj.pos = Math.round(message.pos);
  6113. }
  6114. return obj;
  6115. },
  6116. create<I extends Exact<DeepPartial<altarResetCd>, I>>(base?: I): altarResetCd {
  6117. return altarResetCd.fromPartial(base ?? ({} as any));
  6118. },
  6119. fromPartial<I extends Exact<DeepPartial<altarResetCd>, I>>(object: I): altarResetCd {
  6120. const message = createBasealtarResetCd();
  6121. message.pos = object.pos ?? 0;
  6122. return message;
  6123. },
  6124. };
  6125. function createBasealtarResetCdRsp(): altarResetCdRsp {
  6126. return { errno: 0, pos: 0, data: undefined };
  6127. }
  6128. export const altarResetCdRsp = {
  6129. fromJSON(object: any): altarResetCdRsp {
  6130. return {
  6131. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  6132. pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0,
  6133. data: isSet(object.data) ? altarInfo.fromJSON(object.data) : undefined,
  6134. };
  6135. },
  6136. toJSON(message: altarResetCdRsp): unknown {
  6137. const obj: any = {};
  6138. if (message.errno !== 0) {
  6139. obj.errno = Math.round(message.errno);
  6140. }
  6141. if (message.pos !== 0) {
  6142. obj.pos = Math.round(message.pos);
  6143. }
  6144. if (message.data !== undefined) {
  6145. obj.data = altarInfo.toJSON(message.data);
  6146. }
  6147. return obj;
  6148. },
  6149. create<I extends Exact<DeepPartial<altarResetCdRsp>, I>>(base?: I): altarResetCdRsp {
  6150. return altarResetCdRsp.fromPartial(base ?? ({} as any));
  6151. },
  6152. fromPartial<I extends Exact<DeepPartial<altarResetCdRsp>, I>>(object: I): altarResetCdRsp {
  6153. const message = createBasealtarResetCdRsp();
  6154. message.errno = object.errno ?? 0;
  6155. message.pos = object.pos ?? 0;
  6156. message.data = (object.data !== undefined && object.data !== null) ? altarInfo.fromPartial(object.data) : undefined;
  6157. return message;
  6158. },
  6159. };
  6160. function createBaserelicData(): relicData {
  6161. return {};
  6162. }
  6163. export const relicData = {
  6164. fromJSON(_: any): relicData {
  6165. return {};
  6166. },
  6167. toJSON(_: relicData): unknown {
  6168. const obj: any = {};
  6169. return obj;
  6170. },
  6171. create<I extends Exact<DeepPartial<relicData>, I>>(base?: I): relicData {
  6172. return relicData.fromPartial(base ?? ({} as any));
  6173. },
  6174. fromPartial<I extends Exact<DeepPartial<relicData>, I>>(_: I): relicData {
  6175. const message = createBaserelicData();
  6176. return message;
  6177. },
  6178. };
  6179. function createBaserelicDataRsp(): relicDataRsp {
  6180. return { errno: 0 };
  6181. }
  6182. export const relicDataRsp = {
  6183. fromJSON(object: any): relicDataRsp {
  6184. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  6185. },
  6186. toJSON(message: relicDataRsp): unknown {
  6187. const obj: any = {};
  6188. if (message.errno !== 0) {
  6189. obj.errno = Math.round(message.errno);
  6190. }
  6191. return obj;
  6192. },
  6193. create<I extends Exact<DeepPartial<relicDataRsp>, I>>(base?: I): relicDataRsp {
  6194. return relicDataRsp.fromPartial(base ?? ({} as any));
  6195. },
  6196. fromPartial<I extends Exact<DeepPartial<relicDataRsp>, I>>(object: I): relicDataRsp {
  6197. const message = createBaserelicDataRsp();
  6198. message.errno = object.errno ?? 0;
  6199. return message;
  6200. },
  6201. };
  6202. function createBaserelicNextPos(): relicNextPos {
  6203. return { pos: 0 };
  6204. }
  6205. export const relicNextPos = {
  6206. fromJSON(object: any): relicNextPos {
  6207. return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0 };
  6208. },
  6209. toJSON(message: relicNextPos): unknown {
  6210. const obj: any = {};
  6211. if (message.pos !== 0) {
  6212. obj.pos = Math.round(message.pos);
  6213. }
  6214. return obj;
  6215. },
  6216. create<I extends Exact<DeepPartial<relicNextPos>, I>>(base?: I): relicNextPos {
  6217. return relicNextPos.fromPartial(base ?? ({} as any));
  6218. },
  6219. fromPartial<I extends Exact<DeepPartial<relicNextPos>, I>>(object: I): relicNextPos {
  6220. const message = createBaserelicNextPos();
  6221. message.pos = object.pos ?? 0;
  6222. return message;
  6223. },
  6224. };
  6225. function createBaserelicNextPosRsp(): relicNextPosRsp {
  6226. return { errno: 0 };
  6227. }
  6228. export const relicNextPosRsp = {
  6229. fromJSON(object: any): relicNextPosRsp {
  6230. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  6231. },
  6232. toJSON(message: relicNextPosRsp): unknown {
  6233. const obj: any = {};
  6234. if (message.errno !== 0) {
  6235. obj.errno = Math.round(message.errno);
  6236. }
  6237. return obj;
  6238. },
  6239. create<I extends Exact<DeepPartial<relicNextPosRsp>, I>>(base?: I): relicNextPosRsp {
  6240. return relicNextPosRsp.fromPartial(base ?? ({} as any));
  6241. },
  6242. fromPartial<I extends Exact<DeepPartial<relicNextPosRsp>, I>>(object: I): relicNextPosRsp {
  6243. const message = createBaserelicNextPosRsp();
  6244. message.errno = object.errno ?? 0;
  6245. return message;
  6246. },
  6247. };
  6248. function createBaserelicNextLayer(): relicNextLayer {
  6249. return {};
  6250. }
  6251. export const relicNextLayer = {
  6252. fromJSON(_: any): relicNextLayer {
  6253. return {};
  6254. },
  6255. toJSON(_: relicNextLayer): unknown {
  6256. const obj: any = {};
  6257. return obj;
  6258. },
  6259. create<I extends Exact<DeepPartial<relicNextLayer>, I>>(base?: I): relicNextLayer {
  6260. return relicNextLayer.fromPartial(base ?? ({} as any));
  6261. },
  6262. fromPartial<I extends Exact<DeepPartial<relicNextLayer>, I>>(_: I): relicNextLayer {
  6263. const message = createBaserelicNextLayer();
  6264. return message;
  6265. },
  6266. };
  6267. function createBaserelicNextLayerRsp(): relicNextLayerRsp {
  6268. return { errno: 0 };
  6269. }
  6270. export const relicNextLayerRsp = {
  6271. fromJSON(object: any): relicNextLayerRsp {
  6272. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  6273. },
  6274. toJSON(message: relicNextLayerRsp): unknown {
  6275. const obj: any = {};
  6276. if (message.errno !== 0) {
  6277. obj.errno = Math.round(message.errno);
  6278. }
  6279. return obj;
  6280. },
  6281. create<I extends Exact<DeepPartial<relicNextLayerRsp>, I>>(base?: I): relicNextLayerRsp {
  6282. return relicNextLayerRsp.fromPartial(base ?? ({} as any));
  6283. },
  6284. fromPartial<I extends Exact<DeepPartial<relicNextLayerRsp>, I>>(object: I): relicNextLayerRsp {
  6285. const message = createBaserelicNextLayerRsp();
  6286. message.errno = object.errno ?? 0;
  6287. return message;
  6288. },
  6289. };
  6290. function createBaserelicSelectBuff(): relicSelectBuff {
  6291. return {};
  6292. }
  6293. export const relicSelectBuff = {
  6294. fromJSON(_: any): relicSelectBuff {
  6295. return {};
  6296. },
  6297. toJSON(_: relicSelectBuff): unknown {
  6298. const obj: any = {};
  6299. return obj;
  6300. },
  6301. create<I extends Exact<DeepPartial<relicSelectBuff>, I>>(base?: I): relicSelectBuff {
  6302. return relicSelectBuff.fromPartial(base ?? ({} as any));
  6303. },
  6304. fromPartial<I extends Exact<DeepPartial<relicSelectBuff>, I>>(_: I): relicSelectBuff {
  6305. const message = createBaserelicSelectBuff();
  6306. return message;
  6307. },
  6308. };
  6309. function createBaserelicSelectBuffRsp(): relicSelectBuffRsp {
  6310. return { errno: 0 };
  6311. }
  6312. export const relicSelectBuffRsp = {
  6313. fromJSON(object: any): relicSelectBuffRsp {
  6314. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  6315. },
  6316. toJSON(message: relicSelectBuffRsp): unknown {
  6317. const obj: any = {};
  6318. if (message.errno !== 0) {
  6319. obj.errno = Math.round(message.errno);
  6320. }
  6321. return obj;
  6322. },
  6323. create<I extends Exact<DeepPartial<relicSelectBuffRsp>, I>>(base?: I): relicSelectBuffRsp {
  6324. return relicSelectBuffRsp.fromPartial(base ?? ({} as any));
  6325. },
  6326. fromPartial<I extends Exact<DeepPartial<relicSelectBuffRsp>, I>>(object: I): relicSelectBuffRsp {
  6327. const message = createBaserelicSelectBuffRsp();
  6328. message.errno = object.errno ?? 0;
  6329. return message;
  6330. },
  6331. };
  6332. function createBaserelicReset(): relicReset {
  6333. return { difficulty: 0 };
  6334. }
  6335. export const relicReset = {
  6336. fromJSON(object: any): relicReset {
  6337. return { difficulty: isSet(object.difficulty) ? globalThis.Number(object.difficulty) : 0 };
  6338. },
  6339. toJSON(message: relicReset): unknown {
  6340. const obj: any = {};
  6341. if (message.difficulty !== 0) {
  6342. obj.difficulty = Math.round(message.difficulty);
  6343. }
  6344. return obj;
  6345. },
  6346. create<I extends Exact<DeepPartial<relicReset>, I>>(base?: I): relicReset {
  6347. return relicReset.fromPartial(base ?? ({} as any));
  6348. },
  6349. fromPartial<I extends Exact<DeepPartial<relicReset>, I>>(object: I): relicReset {
  6350. const message = createBaserelicReset();
  6351. message.difficulty = object.difficulty ?? 0;
  6352. return message;
  6353. },
  6354. };
  6355. function createBaserelicResetRsp(): relicResetRsp {
  6356. return { errno: 0 };
  6357. }
  6358. export const relicResetRsp = {
  6359. fromJSON(object: any): relicResetRsp {
  6360. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  6361. },
  6362. toJSON(message: relicResetRsp): unknown {
  6363. const obj: any = {};
  6364. if (message.errno !== 0) {
  6365. obj.errno = Math.round(message.errno);
  6366. }
  6367. return obj;
  6368. },
  6369. create<I extends Exact<DeepPartial<relicResetRsp>, I>>(base?: I): relicResetRsp {
  6370. return relicResetRsp.fromPartial(base ?? ({} as any));
  6371. },
  6372. fromPartial<I extends Exact<DeepPartial<relicResetRsp>, I>>(object: I): relicResetRsp {
  6373. const message = createBaserelicResetRsp();
  6374. message.errno = object.errno ?? 0;
  6375. return message;
  6376. },
  6377. };
  6378. function createBaserelicEventSelect(): relicEventSelect {
  6379. return { type: 0, win: false, cost: 0, select: 0 };
  6380. }
  6381. export const relicEventSelect = {
  6382. fromJSON(object: any): relicEventSelect {
  6383. return {
  6384. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  6385. win: isSet(object.win) ? globalThis.Boolean(object.win) : false,
  6386. cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
  6387. select: isSet(object.select) ? globalThis.Number(object.select) : 0,
  6388. };
  6389. },
  6390. toJSON(message: relicEventSelect): unknown {
  6391. const obj: any = {};
  6392. if (message.type !== 0) {
  6393. obj.type = Math.round(message.type);
  6394. }
  6395. if (message.win !== false) {
  6396. obj.win = message.win;
  6397. }
  6398. if (message.cost !== 0) {
  6399. obj.cost = Math.round(message.cost);
  6400. }
  6401. if (message.select !== 0) {
  6402. obj.select = Math.round(message.select);
  6403. }
  6404. return obj;
  6405. },
  6406. create<I extends Exact<DeepPartial<relicEventSelect>, I>>(base?: I): relicEventSelect {
  6407. return relicEventSelect.fromPartial(base ?? ({} as any));
  6408. },
  6409. fromPartial<I extends Exact<DeepPartial<relicEventSelect>, I>>(object: I): relicEventSelect {
  6410. const message = createBaserelicEventSelect();
  6411. message.type = object.type ?? 0;
  6412. message.win = object.win ?? false;
  6413. message.cost = object.cost ?? 0;
  6414. message.select = object.select ?? 0;
  6415. return message;
  6416. },
  6417. };
  6418. function createBaserelicEventSelectRsp(): relicEventSelectRsp {
  6419. return { errno: 0 };
  6420. }
  6421. export const relicEventSelectRsp = {
  6422. fromJSON(object: any): relicEventSelectRsp {
  6423. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  6424. },
  6425. toJSON(message: relicEventSelectRsp): unknown {
  6426. const obj: any = {};
  6427. if (message.errno !== 0) {
  6428. obj.errno = Math.round(message.errno);
  6429. }
  6430. return obj;
  6431. },
  6432. create<I extends Exact<DeepPartial<relicEventSelectRsp>, I>>(base?: I): relicEventSelectRsp {
  6433. return relicEventSelectRsp.fromPartial(base ?? ({} as any));
  6434. },
  6435. fromPartial<I extends Exact<DeepPartial<relicEventSelectRsp>, I>>(object: I): relicEventSelectRsp {
  6436. const message = createBaserelicEventSelectRsp();
  6437. message.errno = object.errno ?? 0;
  6438. return message;
  6439. },
  6440. };
  6441. function createBaserelicDataNty(): relicDataNty {
  6442. return {
  6443. maxDiff: 0,
  6444. curDiff: 0,
  6445. buffList: [],
  6446. layer: 0,
  6447. pos: 0,
  6448. cost: 0,
  6449. state: 0,
  6450. resetTime: 0,
  6451. posList: [],
  6452. battleInfo: [],
  6453. addCost: 0,
  6454. };
  6455. }
  6456. export const relicDataNty = {
  6457. fromJSON(object: any): relicDataNty {
  6458. return {
  6459. maxDiff: isSet(object.maxDiff) ? globalThis.Number(object.maxDiff) : 0,
  6460. curDiff: isSet(object.curDiff) ? globalThis.Number(object.curDiff) : 0,
  6461. buffList: globalThis.Array.isArray(object?.buffList) ? object.buffList.map((e: any) => globalThis.Number(e)) : [],
  6462. layer: isSet(object.layer) ? globalThis.Number(object.layer) : 0,
  6463. pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0,
  6464. cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
  6465. state: isSet(object.state) ? globalThis.Number(object.state) : 0,
  6466. resetTime: isSet(object.resetTime) ? globalThis.Number(object.resetTime) : 0,
  6467. posList: globalThis.Array.isArray(object?.posList) ? object.posList.map((e: any) => globalThis.Number(e)) : [],
  6468. battleInfo: globalThis.Array.isArray(object?.battleInfo)
  6469. ? object.battleInfo.map((e: any) => globalThis.Number(e))
  6470. : [],
  6471. addCost: isSet(object.addCost) ? globalThis.Number(object.addCost) : 0,
  6472. };
  6473. },
  6474. toJSON(message: relicDataNty): unknown {
  6475. const obj: any = {};
  6476. if (message.maxDiff !== 0) {
  6477. obj.maxDiff = Math.round(message.maxDiff);
  6478. }
  6479. if (message.curDiff !== 0) {
  6480. obj.curDiff = Math.round(message.curDiff);
  6481. }
  6482. if (message.buffList?.length) {
  6483. obj.buffList = message.buffList.map((e) => Math.round(e));
  6484. }
  6485. if (message.layer !== 0) {
  6486. obj.layer = Math.round(message.layer);
  6487. }
  6488. if (message.pos !== 0) {
  6489. obj.pos = Math.round(message.pos);
  6490. }
  6491. if (message.cost !== 0) {
  6492. obj.cost = Math.round(message.cost);
  6493. }
  6494. if (message.state !== 0) {
  6495. obj.state = Math.round(message.state);
  6496. }
  6497. if (message.resetTime !== 0) {
  6498. obj.resetTime = Math.round(message.resetTime);
  6499. }
  6500. if (message.posList?.length) {
  6501. obj.posList = message.posList.map((e) => Math.round(e));
  6502. }
  6503. if (message.battleInfo?.length) {
  6504. obj.battleInfo = message.battleInfo.map((e) => Math.round(e));
  6505. }
  6506. if (message.addCost !== 0) {
  6507. obj.addCost = Math.round(message.addCost);
  6508. }
  6509. return obj;
  6510. },
  6511. create<I extends Exact<DeepPartial<relicDataNty>, I>>(base?: I): relicDataNty {
  6512. return relicDataNty.fromPartial(base ?? ({} as any));
  6513. },
  6514. fromPartial<I extends Exact<DeepPartial<relicDataNty>, I>>(object: I): relicDataNty {
  6515. const message = createBaserelicDataNty();
  6516. message.maxDiff = object.maxDiff ?? 0;
  6517. message.curDiff = object.curDiff ?? 0;
  6518. message.buffList = object.buffList?.map((e) => e) || [];
  6519. message.layer = object.layer ?? 0;
  6520. message.pos = object.pos ?? 0;
  6521. message.cost = object.cost ?? 0;
  6522. message.state = object.state ?? 0;
  6523. message.resetTime = object.resetTime ?? 0;
  6524. message.posList = object.posList?.map((e) => e) || [];
  6525. message.battleInfo = object.battleInfo?.map((e) => e) || [];
  6526. message.addCost = object.addCost ?? 0;
  6527. return message;
  6528. },
  6529. };
  6530. function createBaserelicEventNty(): relicEventNty {
  6531. return { type: 0, battleId: 0, battleType: 0, selectBuff: [] };
  6532. }
  6533. export const relicEventNty = {
  6534. fromJSON(object: any): relicEventNty {
  6535. return {
  6536. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  6537. battleId: isSet(object.battleId) ? globalThis.Number(object.battleId) : 0,
  6538. battleType: isSet(object.battleType) ? globalThis.Number(object.battleType) : 0,
  6539. selectBuff: globalThis.Array.isArray(object?.selectBuff)
  6540. ? object.selectBuff.map((e: any) => globalThis.Number(e))
  6541. : [],
  6542. };
  6543. },
  6544. toJSON(message: relicEventNty): unknown {
  6545. const obj: any = {};
  6546. if (message.type !== 0) {
  6547. obj.type = Math.round(message.type);
  6548. }
  6549. if (message.battleId !== 0) {
  6550. obj.battleId = Math.round(message.battleId);
  6551. }
  6552. if (message.battleType !== 0) {
  6553. obj.battleType = Math.round(message.battleType);
  6554. }
  6555. if (message.selectBuff?.length) {
  6556. obj.selectBuff = message.selectBuff.map((e) => Math.round(e));
  6557. }
  6558. return obj;
  6559. },
  6560. create<I extends Exact<DeepPartial<relicEventNty>, I>>(base?: I): relicEventNty {
  6561. return relicEventNty.fromPartial(base ?? ({} as any));
  6562. },
  6563. fromPartial<I extends Exact<DeepPartial<relicEventNty>, I>>(object: I): relicEventNty {
  6564. const message = createBaserelicEventNty();
  6565. message.type = object.type ?? 0;
  6566. message.battleId = object.battleId ?? 0;
  6567. message.battleType = object.battleType ?? 0;
  6568. message.selectBuff = object.selectBuff?.map((e) => e) || [];
  6569. return message;
  6570. },
  6571. };
  6572. function createBaseactivityTimeListNty(): activityTimeListNty {
  6573. return { list: [] };
  6574. }
  6575. export const activityTimeListNty = {
  6576. fromJSON(object: any): activityTimeListNty {
  6577. return {
  6578. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => activityTimeInfo.fromJSON(e)) : [],
  6579. };
  6580. },
  6581. toJSON(message: activityTimeListNty): unknown {
  6582. const obj: any = {};
  6583. if (message.list?.length) {
  6584. obj.list = message.list.map((e) => activityTimeInfo.toJSON(e));
  6585. }
  6586. return obj;
  6587. },
  6588. create<I extends Exact<DeepPartial<activityTimeListNty>, I>>(base?: I): activityTimeListNty {
  6589. return activityTimeListNty.fromPartial(base ?? ({} as any));
  6590. },
  6591. fromPartial<I extends Exact<DeepPartial<activityTimeListNty>, I>>(object: I): activityTimeListNty {
  6592. const message = createBaseactivityTimeListNty();
  6593. message.list = object.list?.map((e) => activityTimeInfo.fromPartial(e)) || [];
  6594. return message;
  6595. },
  6596. };
  6597. function createBaseactivityGetConfList(): activityGetConfList {
  6598. return { list: [] };
  6599. }
  6600. export const activityGetConfList = {
  6601. fromJSON(object: any): activityGetConfList {
  6602. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [] };
  6603. },
  6604. toJSON(message: activityGetConfList): unknown {
  6605. const obj: any = {};
  6606. if (message.list?.length) {
  6607. obj.list = message.list;
  6608. }
  6609. return obj;
  6610. },
  6611. create<I extends Exact<DeepPartial<activityGetConfList>, I>>(base?: I): activityGetConfList {
  6612. return activityGetConfList.fromPartial(base ?? ({} as any));
  6613. },
  6614. fromPartial<I extends Exact<DeepPartial<activityGetConfList>, I>>(object: I): activityGetConfList {
  6615. const message = createBaseactivityGetConfList();
  6616. message.list = object.list?.map((e) => e) || [];
  6617. return message;
  6618. },
  6619. };
  6620. function createBaseactivityGetConfListRsp(): activityGetConfListRsp {
  6621. return { errno: 0, list: [] };
  6622. }
  6623. export const activityGetConfListRsp = {
  6624. fromJSON(object: any): activityGetConfListRsp {
  6625. return {
  6626. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  6627. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => activityConfInfo.fromJSON(e)) : [],
  6628. };
  6629. },
  6630. toJSON(message: activityGetConfListRsp): unknown {
  6631. const obj: any = {};
  6632. if (message.errno !== 0) {
  6633. obj.errno = Math.round(message.errno);
  6634. }
  6635. if (message.list?.length) {
  6636. obj.list = message.list.map((e) => activityConfInfo.toJSON(e));
  6637. }
  6638. return obj;
  6639. },
  6640. create<I extends Exact<DeepPartial<activityGetConfListRsp>, I>>(base?: I): activityGetConfListRsp {
  6641. return activityGetConfListRsp.fromPartial(base ?? ({} as any));
  6642. },
  6643. fromPartial<I extends Exact<DeepPartial<activityGetConfListRsp>, I>>(object: I): activityGetConfListRsp {
  6644. const message = createBaseactivityGetConfListRsp();
  6645. message.errno = object.errno ?? 0;
  6646. message.list = object.list?.map((e) => activityConfInfo.fromPartial(e)) || [];
  6647. return message;
  6648. },
  6649. };
  6650. function createBaseactivityGetConfNty(): activityGetConfNty {
  6651. return { list: [] };
  6652. }
  6653. export const activityGetConfNty = {
  6654. fromJSON(object: any): activityGetConfNty {
  6655. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.Number(e)) : [] };
  6656. },
  6657. toJSON(message: activityGetConfNty): unknown {
  6658. const obj: any = {};
  6659. if (message.list?.length) {
  6660. obj.list = message.list.map((e) => Math.round(e));
  6661. }
  6662. return obj;
  6663. },
  6664. create<I extends Exact<DeepPartial<activityGetConfNty>, I>>(base?: I): activityGetConfNty {
  6665. return activityGetConfNty.fromPartial(base ?? ({} as any));
  6666. },
  6667. fromPartial<I extends Exact<DeepPartial<activityGetConfNty>, I>>(object: I): activityGetConfNty {
  6668. const message = createBaseactivityGetConfNty();
  6669. message.list = object.list?.map((e) => e) || [];
  6670. return message;
  6671. },
  6672. };
  6673. function createBaseprivilegeCardData(): privilegeCardData {
  6674. return {};
  6675. }
  6676. export const privilegeCardData = {
  6677. fromJSON(_: any): privilegeCardData {
  6678. return {};
  6679. },
  6680. toJSON(_: privilegeCardData): unknown {
  6681. const obj: any = {};
  6682. return obj;
  6683. },
  6684. create<I extends Exact<DeepPartial<privilegeCardData>, I>>(base?: I): privilegeCardData {
  6685. return privilegeCardData.fromPartial(base ?? ({} as any));
  6686. },
  6687. fromPartial<I extends Exact<DeepPartial<privilegeCardData>, I>>(_: I): privilegeCardData {
  6688. const message = createBaseprivilegeCardData();
  6689. return message;
  6690. },
  6691. };
  6692. function createBaseprivilegeCardDataRsp(): privilegeCardDataRsp {
  6693. return { errno: 0, list: [] };
  6694. }
  6695. export const privilegeCardDataRsp = {
  6696. fromJSON(object: any): privilegeCardDataRsp {
  6697. return {
  6698. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  6699. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => privilegeCardInfo.fromJSON(e)) : [],
  6700. };
  6701. },
  6702. toJSON(message: privilegeCardDataRsp): unknown {
  6703. const obj: any = {};
  6704. if (message.errno !== 0) {
  6705. obj.errno = Math.round(message.errno);
  6706. }
  6707. if (message.list?.length) {
  6708. obj.list = message.list.map((e) => privilegeCardInfo.toJSON(e));
  6709. }
  6710. return obj;
  6711. },
  6712. create<I extends Exact<DeepPartial<privilegeCardDataRsp>, I>>(base?: I): privilegeCardDataRsp {
  6713. return privilegeCardDataRsp.fromPartial(base ?? ({} as any));
  6714. },
  6715. fromPartial<I extends Exact<DeepPartial<privilegeCardDataRsp>, I>>(object: I): privilegeCardDataRsp {
  6716. const message = createBaseprivilegeCardDataRsp();
  6717. message.errno = object.errno ?? 0;
  6718. message.list = object.list?.map((e) => privilegeCardInfo.fromPartial(e)) || [];
  6719. return message;
  6720. },
  6721. };
  6722. function createBaseprivilegeCardBuy(): privilegeCardBuy {
  6723. return { moduleid: 0 };
  6724. }
  6725. export const privilegeCardBuy = {
  6726. fromJSON(object: any): privilegeCardBuy {
  6727. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  6728. },
  6729. toJSON(message: privilegeCardBuy): unknown {
  6730. const obj: any = {};
  6731. if (message.moduleid !== 0) {
  6732. obj.moduleid = Math.round(message.moduleid);
  6733. }
  6734. return obj;
  6735. },
  6736. create<I extends Exact<DeepPartial<privilegeCardBuy>, I>>(base?: I): privilegeCardBuy {
  6737. return privilegeCardBuy.fromPartial(base ?? ({} as any));
  6738. },
  6739. fromPartial<I extends Exact<DeepPartial<privilegeCardBuy>, I>>(object: I): privilegeCardBuy {
  6740. const message = createBaseprivilegeCardBuy();
  6741. message.moduleid = object.moduleid ?? 0;
  6742. return message;
  6743. },
  6744. };
  6745. function createBaseprivilegeCardBuyRsp(): privilegeCardBuyRsp {
  6746. return { errno: 0 };
  6747. }
  6748. export const privilegeCardBuyRsp = {
  6749. fromJSON(object: any): privilegeCardBuyRsp {
  6750. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  6751. },
  6752. toJSON(message: privilegeCardBuyRsp): unknown {
  6753. const obj: any = {};
  6754. if (message.errno !== 0) {
  6755. obj.errno = Math.round(message.errno);
  6756. }
  6757. return obj;
  6758. },
  6759. create<I extends Exact<DeepPartial<privilegeCardBuyRsp>, I>>(base?: I): privilegeCardBuyRsp {
  6760. return privilegeCardBuyRsp.fromPartial(base ?? ({} as any));
  6761. },
  6762. fromPartial<I extends Exact<DeepPartial<privilegeCardBuyRsp>, I>>(object: I): privilegeCardBuyRsp {
  6763. const message = createBaseprivilegeCardBuyRsp();
  6764. message.errno = object.errno ?? 0;
  6765. return message;
  6766. },
  6767. };
  6768. function createBaseprivilegeCardUnlockNty(): privilegeCardUnlockNty {
  6769. return { data: undefined };
  6770. }
  6771. export const privilegeCardUnlockNty = {
  6772. fromJSON(object: any): privilegeCardUnlockNty {
  6773. return { data: isSet(object.data) ? privilegeCardInfo.fromJSON(object.data) : undefined };
  6774. },
  6775. toJSON(message: privilegeCardUnlockNty): unknown {
  6776. const obj: any = {};
  6777. if (message.data !== undefined) {
  6778. obj.data = privilegeCardInfo.toJSON(message.data);
  6779. }
  6780. return obj;
  6781. },
  6782. create<I extends Exact<DeepPartial<privilegeCardUnlockNty>, I>>(base?: I): privilegeCardUnlockNty {
  6783. return privilegeCardUnlockNty.fromPartial(base ?? ({} as any));
  6784. },
  6785. fromPartial<I extends Exact<DeepPartial<privilegeCardUnlockNty>, I>>(object: I): privilegeCardUnlockNty {
  6786. const message = createBaseprivilegeCardUnlockNty();
  6787. message.data = (object.data !== undefined && object.data !== null)
  6788. ? privilegeCardInfo.fromPartial(object.data)
  6789. : undefined;
  6790. return message;
  6791. },
  6792. };
  6793. function createBaseprivilegeCardAward(): privilegeCardAward {
  6794. return { moduleid: 0 };
  6795. }
  6796. export const privilegeCardAward = {
  6797. fromJSON(object: any): privilegeCardAward {
  6798. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  6799. },
  6800. toJSON(message: privilegeCardAward): unknown {
  6801. const obj: any = {};
  6802. if (message.moduleid !== 0) {
  6803. obj.moduleid = Math.round(message.moduleid);
  6804. }
  6805. return obj;
  6806. },
  6807. create<I extends Exact<DeepPartial<privilegeCardAward>, I>>(base?: I): privilegeCardAward {
  6808. return privilegeCardAward.fromPartial(base ?? ({} as any));
  6809. },
  6810. fromPartial<I extends Exact<DeepPartial<privilegeCardAward>, I>>(object: I): privilegeCardAward {
  6811. const message = createBaseprivilegeCardAward();
  6812. message.moduleid = object.moduleid ?? 0;
  6813. return message;
  6814. },
  6815. };
  6816. function createBaseprivilegeCardAwardRsp(): privilegeCardAwardRsp {
  6817. return { errno: 0, moduleid: 0, award: false };
  6818. }
  6819. export const privilegeCardAwardRsp = {
  6820. fromJSON(object: any): privilegeCardAwardRsp {
  6821. return {
  6822. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  6823. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  6824. award: isSet(object.award) ? globalThis.Boolean(object.award) : false,
  6825. };
  6826. },
  6827. toJSON(message: privilegeCardAwardRsp): unknown {
  6828. const obj: any = {};
  6829. if (message.errno !== 0) {
  6830. obj.errno = Math.round(message.errno);
  6831. }
  6832. if (message.moduleid !== 0) {
  6833. obj.moduleid = Math.round(message.moduleid);
  6834. }
  6835. if (message.award !== false) {
  6836. obj.award = message.award;
  6837. }
  6838. return obj;
  6839. },
  6840. create<I extends Exact<DeepPartial<privilegeCardAwardRsp>, I>>(base?: I): privilegeCardAwardRsp {
  6841. return privilegeCardAwardRsp.fromPartial(base ?? ({} as any));
  6842. },
  6843. fromPartial<I extends Exact<DeepPartial<privilegeCardAwardRsp>, I>>(object: I): privilegeCardAwardRsp {
  6844. const message = createBaseprivilegeCardAwardRsp();
  6845. message.errno = object.errno ?? 0;
  6846. message.moduleid = object.moduleid ?? 0;
  6847. message.award = object.award ?? false;
  6848. return message;
  6849. },
  6850. };
  6851. function createBaseboxGetAward(): boxGetAward {
  6852. return { id: 0, select: 0, type: 0, num: 0 };
  6853. }
  6854. export const boxGetAward = {
  6855. fromJSON(object: any): boxGetAward {
  6856. return {
  6857. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  6858. select: isSet(object.select) ? globalThis.Number(object.select) : 0,
  6859. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  6860. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  6861. };
  6862. },
  6863. toJSON(message: boxGetAward): unknown {
  6864. const obj: any = {};
  6865. if (message.id !== 0) {
  6866. obj.id = Math.round(message.id);
  6867. }
  6868. if (message.select !== 0) {
  6869. obj.select = Math.round(message.select);
  6870. }
  6871. if (message.type !== 0) {
  6872. obj.type = Math.round(message.type);
  6873. }
  6874. if (message.num !== 0) {
  6875. obj.num = Math.round(message.num);
  6876. }
  6877. return obj;
  6878. },
  6879. create<I extends Exact<DeepPartial<boxGetAward>, I>>(base?: I): boxGetAward {
  6880. return boxGetAward.fromPartial(base ?? ({} as any));
  6881. },
  6882. fromPartial<I extends Exact<DeepPartial<boxGetAward>, I>>(object: I): boxGetAward {
  6883. const message = createBaseboxGetAward();
  6884. message.id = object.id ?? 0;
  6885. message.select = object.select ?? 0;
  6886. message.type = object.type ?? 0;
  6887. message.num = object.num ?? 0;
  6888. return message;
  6889. },
  6890. };
  6891. function createBaseboxGetAwardRsp(): boxGetAwardRsp {
  6892. return { errno: 0, type: 0 };
  6893. }
  6894. export const boxGetAwardRsp = {
  6895. fromJSON(object: any): boxGetAwardRsp {
  6896. return {
  6897. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  6898. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  6899. };
  6900. },
  6901. toJSON(message: boxGetAwardRsp): unknown {
  6902. const obj: any = {};
  6903. if (message.errno !== 0) {
  6904. obj.errno = Math.round(message.errno);
  6905. }
  6906. if (message.type !== 0) {
  6907. obj.type = Math.round(message.type);
  6908. }
  6909. return obj;
  6910. },
  6911. create<I extends Exact<DeepPartial<boxGetAwardRsp>, I>>(base?: I): boxGetAwardRsp {
  6912. return boxGetAwardRsp.fromPartial(base ?? ({} as any));
  6913. },
  6914. fromPartial<I extends Exact<DeepPartial<boxGetAwardRsp>, I>>(object: I): boxGetAwardRsp {
  6915. const message = createBaseboxGetAwardRsp();
  6916. message.errno = object.errno ?? 0;
  6917. message.type = object.type ?? 0;
  6918. return message;
  6919. },
  6920. };
  6921. function createBasefirstRechargeData(): firstRechargeData {
  6922. return { moduleid: 0 };
  6923. }
  6924. export const firstRechargeData = {
  6925. fromJSON(object: any): firstRechargeData {
  6926. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  6927. },
  6928. toJSON(message: firstRechargeData): unknown {
  6929. const obj: any = {};
  6930. if (message.moduleid !== 0) {
  6931. obj.moduleid = Math.round(message.moduleid);
  6932. }
  6933. return obj;
  6934. },
  6935. create<I extends Exact<DeepPartial<firstRechargeData>, I>>(base?: I): firstRechargeData {
  6936. return firstRechargeData.fromPartial(base ?? ({} as any));
  6937. },
  6938. fromPartial<I extends Exact<DeepPartial<firstRechargeData>, I>>(object: I): firstRechargeData {
  6939. const message = createBasefirstRechargeData();
  6940. message.moduleid = object.moduleid ?? 0;
  6941. return message;
  6942. },
  6943. };
  6944. function createBasefirstRechargeDataRsp(): firstRechargeDataRsp {
  6945. return { errno: 0, moduleid: 0, state: false, day: 0, award: 0 };
  6946. }
  6947. export const firstRechargeDataRsp = {
  6948. fromJSON(object: any): firstRechargeDataRsp {
  6949. return {
  6950. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  6951. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  6952. state: isSet(object.state) ? globalThis.Boolean(object.state) : false,
  6953. day: isSet(object.day) ? globalThis.Number(object.day) : 0,
  6954. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  6955. };
  6956. },
  6957. toJSON(message: firstRechargeDataRsp): unknown {
  6958. const obj: any = {};
  6959. if (message.errno !== 0) {
  6960. obj.errno = Math.round(message.errno);
  6961. }
  6962. if (message.moduleid !== 0) {
  6963. obj.moduleid = Math.round(message.moduleid);
  6964. }
  6965. if (message.state !== false) {
  6966. obj.state = message.state;
  6967. }
  6968. if (message.day !== 0) {
  6969. obj.day = Math.round(message.day);
  6970. }
  6971. if (message.award !== 0) {
  6972. obj.award = Math.round(message.award);
  6973. }
  6974. return obj;
  6975. },
  6976. create<I extends Exact<DeepPartial<firstRechargeDataRsp>, I>>(base?: I): firstRechargeDataRsp {
  6977. return firstRechargeDataRsp.fromPartial(base ?? ({} as any));
  6978. },
  6979. fromPartial<I extends Exact<DeepPartial<firstRechargeDataRsp>, I>>(object: I): firstRechargeDataRsp {
  6980. const message = createBasefirstRechargeDataRsp();
  6981. message.errno = object.errno ?? 0;
  6982. message.moduleid = object.moduleid ?? 0;
  6983. message.state = object.state ?? false;
  6984. message.day = object.day ?? 0;
  6985. message.award = object.award ?? 0;
  6986. return message;
  6987. },
  6988. };
  6989. function createBasefirstRechargeBuy(): firstRechargeBuy {
  6990. return { moduleid: 0 };
  6991. }
  6992. export const firstRechargeBuy = {
  6993. fromJSON(object: any): firstRechargeBuy {
  6994. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  6995. },
  6996. toJSON(message: firstRechargeBuy): unknown {
  6997. const obj: any = {};
  6998. if (message.moduleid !== 0) {
  6999. obj.moduleid = Math.round(message.moduleid);
  7000. }
  7001. return obj;
  7002. },
  7003. create<I extends Exact<DeepPartial<firstRechargeBuy>, I>>(base?: I): firstRechargeBuy {
  7004. return firstRechargeBuy.fromPartial(base ?? ({} as any));
  7005. },
  7006. fromPartial<I extends Exact<DeepPartial<firstRechargeBuy>, I>>(object: I): firstRechargeBuy {
  7007. const message = createBasefirstRechargeBuy();
  7008. message.moduleid = object.moduleid ?? 0;
  7009. return message;
  7010. },
  7011. };
  7012. function createBasefirstRechargeBuyRsp(): firstRechargeBuyRsp {
  7013. return { errno: 0, moduleid: 0 };
  7014. }
  7015. export const firstRechargeBuyRsp = {
  7016. fromJSON(object: any): firstRechargeBuyRsp {
  7017. return {
  7018. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7019. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  7020. };
  7021. },
  7022. toJSON(message: firstRechargeBuyRsp): unknown {
  7023. const obj: any = {};
  7024. if (message.errno !== 0) {
  7025. obj.errno = Math.round(message.errno);
  7026. }
  7027. if (message.moduleid !== 0) {
  7028. obj.moduleid = Math.round(message.moduleid);
  7029. }
  7030. return obj;
  7031. },
  7032. create<I extends Exact<DeepPartial<firstRechargeBuyRsp>, I>>(base?: I): firstRechargeBuyRsp {
  7033. return firstRechargeBuyRsp.fromPartial(base ?? ({} as any));
  7034. },
  7035. fromPartial<I extends Exact<DeepPartial<firstRechargeBuyRsp>, I>>(object: I): firstRechargeBuyRsp {
  7036. const message = createBasefirstRechargeBuyRsp();
  7037. message.errno = object.errno ?? 0;
  7038. message.moduleid = object.moduleid ?? 0;
  7039. return message;
  7040. },
  7041. };
  7042. function createBasefirstRechargeAward(): firstRechargeAward {
  7043. return { moduleid: 0, day: 0 };
  7044. }
  7045. export const firstRechargeAward = {
  7046. fromJSON(object: any): firstRechargeAward {
  7047. return {
  7048. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  7049. day: isSet(object.day) ? globalThis.Number(object.day) : 0,
  7050. };
  7051. },
  7052. toJSON(message: firstRechargeAward): unknown {
  7053. const obj: any = {};
  7054. if (message.moduleid !== 0) {
  7055. obj.moduleid = Math.round(message.moduleid);
  7056. }
  7057. if (message.day !== 0) {
  7058. obj.day = Math.round(message.day);
  7059. }
  7060. return obj;
  7061. },
  7062. create<I extends Exact<DeepPartial<firstRechargeAward>, I>>(base?: I): firstRechargeAward {
  7063. return firstRechargeAward.fromPartial(base ?? ({} as any));
  7064. },
  7065. fromPartial<I extends Exact<DeepPartial<firstRechargeAward>, I>>(object: I): firstRechargeAward {
  7066. const message = createBasefirstRechargeAward();
  7067. message.moduleid = object.moduleid ?? 0;
  7068. message.day = object.day ?? 0;
  7069. return message;
  7070. },
  7071. };
  7072. function createBasefirstRechargeAwardRsp(): firstRechargeAwardRsp {
  7073. return { errno: 0, moduleid: 0, award: 0 };
  7074. }
  7075. export const firstRechargeAwardRsp = {
  7076. fromJSON(object: any): firstRechargeAwardRsp {
  7077. return {
  7078. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7079. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  7080. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  7081. };
  7082. },
  7083. toJSON(message: firstRechargeAwardRsp): unknown {
  7084. const obj: any = {};
  7085. if (message.errno !== 0) {
  7086. obj.errno = Math.round(message.errno);
  7087. }
  7088. if (message.moduleid !== 0) {
  7089. obj.moduleid = Math.round(message.moduleid);
  7090. }
  7091. if (message.award !== 0) {
  7092. obj.award = Math.round(message.award);
  7093. }
  7094. return obj;
  7095. },
  7096. create<I extends Exact<DeepPartial<firstRechargeAwardRsp>, I>>(base?: I): firstRechargeAwardRsp {
  7097. return firstRechargeAwardRsp.fromPartial(base ?? ({} as any));
  7098. },
  7099. fromPartial<I extends Exact<DeepPartial<firstRechargeAwardRsp>, I>>(object: I): firstRechargeAwardRsp {
  7100. const message = createBasefirstRechargeAwardRsp();
  7101. message.errno = object.errno ?? 0;
  7102. message.moduleid = object.moduleid ?? 0;
  7103. message.award = object.award ?? 0;
  7104. return message;
  7105. },
  7106. };
  7107. function createBasefirstRechargeNty(): firstRechargeNty {
  7108. return { moduleid: 0, state: false, day: 0, award: 0 };
  7109. }
  7110. export const firstRechargeNty = {
  7111. fromJSON(object: any): firstRechargeNty {
  7112. return {
  7113. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  7114. state: isSet(object.state) ? globalThis.Boolean(object.state) : false,
  7115. day: isSet(object.day) ? globalThis.Number(object.day) : 0,
  7116. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  7117. };
  7118. },
  7119. toJSON(message: firstRechargeNty): unknown {
  7120. const obj: any = {};
  7121. if (message.moduleid !== 0) {
  7122. obj.moduleid = Math.round(message.moduleid);
  7123. }
  7124. if (message.state !== false) {
  7125. obj.state = message.state;
  7126. }
  7127. if (message.day !== 0) {
  7128. obj.day = Math.round(message.day);
  7129. }
  7130. if (message.award !== 0) {
  7131. obj.award = Math.round(message.award);
  7132. }
  7133. return obj;
  7134. },
  7135. create<I extends Exact<DeepPartial<firstRechargeNty>, I>>(base?: I): firstRechargeNty {
  7136. return firstRechargeNty.fromPartial(base ?? ({} as any));
  7137. },
  7138. fromPartial<I extends Exact<DeepPartial<firstRechargeNty>, I>>(object: I): firstRechargeNty {
  7139. const message = createBasefirstRechargeNty();
  7140. message.moduleid = object.moduleid ?? 0;
  7141. message.state = object.state ?? false;
  7142. message.day = object.day ?? 0;
  7143. message.award = object.award ?? 0;
  7144. return message;
  7145. },
  7146. };
  7147. function createBasedailyDungeonsData(): dailyDungeonsData {
  7148. return {};
  7149. }
  7150. export const dailyDungeonsData = {
  7151. fromJSON(_: any): dailyDungeonsData {
  7152. return {};
  7153. },
  7154. toJSON(_: dailyDungeonsData): unknown {
  7155. const obj: any = {};
  7156. return obj;
  7157. },
  7158. create<I extends Exact<DeepPartial<dailyDungeonsData>, I>>(base?: I): dailyDungeonsData {
  7159. return dailyDungeonsData.fromPartial(base ?? ({} as any));
  7160. },
  7161. fromPartial<I extends Exact<DeepPartial<dailyDungeonsData>, I>>(_: I): dailyDungeonsData {
  7162. const message = createBasedailyDungeonsData();
  7163. return message;
  7164. },
  7165. };
  7166. function createBasedailyDungeonsDataRsp(): dailyDungeonsDataRsp {
  7167. return { errno: 0, list: [] };
  7168. }
  7169. export const dailyDungeonsDataRsp = {
  7170. fromJSON(object: any): dailyDungeonsDataRsp {
  7171. return {
  7172. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7173. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => dailyDungeonsInfo.fromJSON(e)) : [],
  7174. };
  7175. },
  7176. toJSON(message: dailyDungeonsDataRsp): unknown {
  7177. const obj: any = {};
  7178. if (message.errno !== 0) {
  7179. obj.errno = Math.round(message.errno);
  7180. }
  7181. if (message.list?.length) {
  7182. obj.list = message.list.map((e) => dailyDungeonsInfo.toJSON(e));
  7183. }
  7184. return obj;
  7185. },
  7186. create<I extends Exact<DeepPartial<dailyDungeonsDataRsp>, I>>(base?: I): dailyDungeonsDataRsp {
  7187. return dailyDungeonsDataRsp.fromPartial(base ?? ({} as any));
  7188. },
  7189. fromPartial<I extends Exact<DeepPartial<dailyDungeonsDataRsp>, I>>(object: I): dailyDungeonsDataRsp {
  7190. const message = createBasedailyDungeonsDataRsp();
  7191. message.errno = object.errno ?? 0;
  7192. message.list = object.list?.map((e) => dailyDungeonsInfo.fromPartial(e)) || [];
  7193. return message;
  7194. },
  7195. };
  7196. function createBasedailyDungeonsStart(): dailyDungeonsStart {
  7197. return { type: 0, diff: 0 };
  7198. }
  7199. export const dailyDungeonsStart = {
  7200. fromJSON(object: any): dailyDungeonsStart {
  7201. return {
  7202. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  7203. diff: isSet(object.diff) ? globalThis.Number(object.diff) : 0,
  7204. };
  7205. },
  7206. toJSON(message: dailyDungeonsStart): unknown {
  7207. const obj: any = {};
  7208. if (message.type !== 0) {
  7209. obj.type = Math.round(message.type);
  7210. }
  7211. if (message.diff !== 0) {
  7212. obj.diff = Math.round(message.diff);
  7213. }
  7214. return obj;
  7215. },
  7216. create<I extends Exact<DeepPartial<dailyDungeonsStart>, I>>(base?: I): dailyDungeonsStart {
  7217. return dailyDungeonsStart.fromPartial(base ?? ({} as any));
  7218. },
  7219. fromPartial<I extends Exact<DeepPartial<dailyDungeonsStart>, I>>(object: I): dailyDungeonsStart {
  7220. const message = createBasedailyDungeonsStart();
  7221. message.type = object.type ?? 0;
  7222. message.diff = object.diff ?? 0;
  7223. return message;
  7224. },
  7225. };
  7226. function createBasedailyDungeonsStartRsp(): dailyDungeonsStartRsp {
  7227. return { errno: 0, awardList: [] };
  7228. }
  7229. export const dailyDungeonsStartRsp = {
  7230. fromJSON(object: any): dailyDungeonsStartRsp {
  7231. return {
  7232. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7233. awardList: globalThis.Array.isArray(object?.awardList) ? object.awardList.map((e: any) => idNum.fromJSON(e)) : [],
  7234. };
  7235. },
  7236. toJSON(message: dailyDungeonsStartRsp): unknown {
  7237. const obj: any = {};
  7238. if (message.errno !== 0) {
  7239. obj.errno = Math.round(message.errno);
  7240. }
  7241. if (message.awardList?.length) {
  7242. obj.awardList = message.awardList.map((e) => idNum.toJSON(e));
  7243. }
  7244. return obj;
  7245. },
  7246. create<I extends Exact<DeepPartial<dailyDungeonsStartRsp>, I>>(base?: I): dailyDungeonsStartRsp {
  7247. return dailyDungeonsStartRsp.fromPartial(base ?? ({} as any));
  7248. },
  7249. fromPartial<I extends Exact<DeepPartial<dailyDungeonsStartRsp>, I>>(object: I): dailyDungeonsStartRsp {
  7250. const message = createBasedailyDungeonsStartRsp();
  7251. message.errno = object.errno ?? 0;
  7252. message.awardList = object.awardList?.map((e) => idNum.fromPartial(e)) || [];
  7253. return message;
  7254. },
  7255. };
  7256. function createBasedailyDungeonsEnd(): dailyDungeonsEnd {
  7257. return { win: false, monsterNum: 0, bossNum: 0, eliteNum: 0 };
  7258. }
  7259. export const dailyDungeonsEnd = {
  7260. fromJSON(object: any): dailyDungeonsEnd {
  7261. return {
  7262. win: isSet(object.win) ? globalThis.Boolean(object.win) : false,
  7263. monsterNum: isSet(object.monsterNum) ? globalThis.Number(object.monsterNum) : 0,
  7264. bossNum: isSet(object.bossNum) ? globalThis.Number(object.bossNum) : 0,
  7265. eliteNum: isSet(object.eliteNum) ? globalThis.Number(object.eliteNum) : 0,
  7266. };
  7267. },
  7268. toJSON(message: dailyDungeonsEnd): unknown {
  7269. const obj: any = {};
  7270. if (message.win !== false) {
  7271. obj.win = message.win;
  7272. }
  7273. if (message.monsterNum !== 0) {
  7274. obj.monsterNum = Math.round(message.monsterNum);
  7275. }
  7276. if (message.bossNum !== 0) {
  7277. obj.bossNum = Math.round(message.bossNum);
  7278. }
  7279. if (message.eliteNum !== 0) {
  7280. obj.eliteNum = Math.round(message.eliteNum);
  7281. }
  7282. return obj;
  7283. },
  7284. create<I extends Exact<DeepPartial<dailyDungeonsEnd>, I>>(base?: I): dailyDungeonsEnd {
  7285. return dailyDungeonsEnd.fromPartial(base ?? ({} as any));
  7286. },
  7287. fromPartial<I extends Exact<DeepPartial<dailyDungeonsEnd>, I>>(object: I): dailyDungeonsEnd {
  7288. const message = createBasedailyDungeonsEnd();
  7289. message.win = object.win ?? false;
  7290. message.monsterNum = object.monsterNum ?? 0;
  7291. message.bossNum = object.bossNum ?? 0;
  7292. message.eliteNum = object.eliteNum ?? 0;
  7293. return message;
  7294. },
  7295. };
  7296. function createBasedailyDungeonsEndRsp(): dailyDungeonsEndRsp {
  7297. return { errno: 0, data: undefined };
  7298. }
  7299. export const dailyDungeonsEndRsp = {
  7300. fromJSON(object: any): dailyDungeonsEndRsp {
  7301. return {
  7302. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7303. data: isSet(object.data) ? dailyDungeonsInfo.fromJSON(object.data) : undefined,
  7304. };
  7305. },
  7306. toJSON(message: dailyDungeonsEndRsp): unknown {
  7307. const obj: any = {};
  7308. if (message.errno !== 0) {
  7309. obj.errno = Math.round(message.errno);
  7310. }
  7311. if (message.data !== undefined) {
  7312. obj.data = dailyDungeonsInfo.toJSON(message.data);
  7313. }
  7314. return obj;
  7315. },
  7316. create<I extends Exact<DeepPartial<dailyDungeonsEndRsp>, I>>(base?: I): dailyDungeonsEndRsp {
  7317. return dailyDungeonsEndRsp.fromPartial(base ?? ({} as any));
  7318. },
  7319. fromPartial<I extends Exact<DeepPartial<dailyDungeonsEndRsp>, I>>(object: I): dailyDungeonsEndRsp {
  7320. const message = createBasedailyDungeonsEndRsp();
  7321. message.errno = object.errno ?? 0;
  7322. message.data = (object.data !== undefined && object.data !== null)
  7323. ? dailyDungeonsInfo.fromPartial(object.data)
  7324. : undefined;
  7325. return message;
  7326. },
  7327. };
  7328. function createBasedailyDungeonsSweep(): dailyDungeonsSweep {
  7329. return { type: 0, diff: 0 };
  7330. }
  7331. export const dailyDungeonsSweep = {
  7332. fromJSON(object: any): dailyDungeonsSweep {
  7333. return {
  7334. type: isSet(object.type) ? globalThis.Number(object.type) : 0,
  7335. diff: isSet(object.diff) ? globalThis.Number(object.diff) : 0,
  7336. };
  7337. },
  7338. toJSON(message: dailyDungeonsSweep): unknown {
  7339. const obj: any = {};
  7340. if (message.type !== 0) {
  7341. obj.type = Math.round(message.type);
  7342. }
  7343. if (message.diff !== 0) {
  7344. obj.diff = Math.round(message.diff);
  7345. }
  7346. return obj;
  7347. },
  7348. create<I extends Exact<DeepPartial<dailyDungeonsSweep>, I>>(base?: I): dailyDungeonsSweep {
  7349. return dailyDungeonsSweep.fromPartial(base ?? ({} as any));
  7350. },
  7351. fromPartial<I extends Exact<DeepPartial<dailyDungeonsSweep>, I>>(object: I): dailyDungeonsSweep {
  7352. const message = createBasedailyDungeonsSweep();
  7353. message.type = object.type ?? 0;
  7354. message.diff = object.diff ?? 0;
  7355. return message;
  7356. },
  7357. };
  7358. function createBasedailyDungeonsSweepRsp(): dailyDungeonsSweepRsp {
  7359. return { errno: 0, data: undefined };
  7360. }
  7361. export const dailyDungeonsSweepRsp = {
  7362. fromJSON(object: any): dailyDungeonsSweepRsp {
  7363. return {
  7364. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7365. data: isSet(object.data) ? dailyDungeonsInfo.fromJSON(object.data) : undefined,
  7366. };
  7367. },
  7368. toJSON(message: dailyDungeonsSweepRsp): unknown {
  7369. const obj: any = {};
  7370. if (message.errno !== 0) {
  7371. obj.errno = Math.round(message.errno);
  7372. }
  7373. if (message.data !== undefined) {
  7374. obj.data = dailyDungeonsInfo.toJSON(message.data);
  7375. }
  7376. return obj;
  7377. },
  7378. create<I extends Exact<DeepPartial<dailyDungeonsSweepRsp>, I>>(base?: I): dailyDungeonsSweepRsp {
  7379. return dailyDungeonsSweepRsp.fromPartial(base ?? ({} as any));
  7380. },
  7381. fromPartial<I extends Exact<DeepPartial<dailyDungeonsSweepRsp>, I>>(object: I): dailyDungeonsSweepRsp {
  7382. const message = createBasedailyDungeonsSweepRsp();
  7383. message.errno = object.errno ?? 0;
  7384. message.data = (object.data !== undefined && object.data !== null)
  7385. ? dailyDungeonsInfo.fromPartial(object.data)
  7386. : undefined;
  7387. return message;
  7388. },
  7389. };
  7390. function createBaseadvGiftData(): advGiftData {
  7391. return {};
  7392. }
  7393. export const advGiftData = {
  7394. fromJSON(_: any): advGiftData {
  7395. return {};
  7396. },
  7397. toJSON(_: advGiftData): unknown {
  7398. const obj: any = {};
  7399. return obj;
  7400. },
  7401. create<I extends Exact<DeepPartial<advGiftData>, I>>(base?: I): advGiftData {
  7402. return advGiftData.fromPartial(base ?? ({} as any));
  7403. },
  7404. fromPartial<I extends Exact<DeepPartial<advGiftData>, I>>(_: I): advGiftData {
  7405. const message = createBaseadvGiftData();
  7406. return message;
  7407. },
  7408. };
  7409. function createBaseadvGiftDataRsp(): advGiftDataRsp {
  7410. return { errno: 0 };
  7411. }
  7412. export const advGiftDataRsp = {
  7413. fromJSON(object: any): advGiftDataRsp {
  7414. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  7415. },
  7416. toJSON(message: advGiftDataRsp): unknown {
  7417. const obj: any = {};
  7418. if (message.errno !== 0) {
  7419. obj.errno = Math.round(message.errno);
  7420. }
  7421. return obj;
  7422. },
  7423. create<I extends Exact<DeepPartial<advGiftDataRsp>, I>>(base?: I): advGiftDataRsp {
  7424. return advGiftDataRsp.fromPartial(base ?? ({} as any));
  7425. },
  7426. fromPartial<I extends Exact<DeepPartial<advGiftDataRsp>, I>>(object: I): advGiftDataRsp {
  7427. const message = createBaseadvGiftDataRsp();
  7428. message.errno = object.errno ?? 0;
  7429. return message;
  7430. },
  7431. };
  7432. function createBaseadvGiftBuy(): advGiftBuy {
  7433. return { id: 0 };
  7434. }
  7435. export const advGiftBuy = {
  7436. fromJSON(object: any): advGiftBuy {
  7437. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  7438. },
  7439. toJSON(message: advGiftBuy): unknown {
  7440. const obj: any = {};
  7441. if (message.id !== 0) {
  7442. obj.id = Math.round(message.id);
  7443. }
  7444. return obj;
  7445. },
  7446. create<I extends Exact<DeepPartial<advGiftBuy>, I>>(base?: I): advGiftBuy {
  7447. return advGiftBuy.fromPartial(base ?? ({} as any));
  7448. },
  7449. fromPartial<I extends Exact<DeepPartial<advGiftBuy>, I>>(object: I): advGiftBuy {
  7450. const message = createBaseadvGiftBuy();
  7451. message.id = object.id ?? 0;
  7452. return message;
  7453. },
  7454. };
  7455. function createBaseadvGiftBuyRsp(): advGiftBuyRsp {
  7456. return { errno: 0 };
  7457. }
  7458. export const advGiftBuyRsp = {
  7459. fromJSON(object: any): advGiftBuyRsp {
  7460. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  7461. },
  7462. toJSON(message: advGiftBuyRsp): unknown {
  7463. const obj: any = {};
  7464. if (message.errno !== 0) {
  7465. obj.errno = Math.round(message.errno);
  7466. }
  7467. return obj;
  7468. },
  7469. create<I extends Exact<DeepPartial<advGiftBuyRsp>, I>>(base?: I): advGiftBuyRsp {
  7470. return advGiftBuyRsp.fromPartial(base ?? ({} as any));
  7471. },
  7472. fromPartial<I extends Exact<DeepPartial<advGiftBuyRsp>, I>>(object: I): advGiftBuyRsp {
  7473. const message = createBaseadvGiftBuyRsp();
  7474. message.errno = object.errno ?? 0;
  7475. return message;
  7476. },
  7477. };
  7478. function createBaseadvGiftNty(): advGiftNty {
  7479. return { list: [] };
  7480. }
  7481. export const advGiftNty = {
  7482. fromJSON(object: any): advGiftNty {
  7483. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => idNum.fromJSON(e)) : [] };
  7484. },
  7485. toJSON(message: advGiftNty): unknown {
  7486. const obj: any = {};
  7487. if (message.list?.length) {
  7488. obj.list = message.list.map((e) => idNum.toJSON(e));
  7489. }
  7490. return obj;
  7491. },
  7492. create<I extends Exact<DeepPartial<advGiftNty>, I>>(base?: I): advGiftNty {
  7493. return advGiftNty.fromPartial(base ?? ({} as any));
  7494. },
  7495. fromPartial<I extends Exact<DeepPartial<advGiftNty>, I>>(object: I): advGiftNty {
  7496. const message = createBaseadvGiftNty();
  7497. message.list = object.list?.map((e) => idNum.fromPartial(e)) || [];
  7498. return message;
  7499. },
  7500. };
  7501. function createBasepopGiftData(): popGiftData {
  7502. return {};
  7503. }
  7504. export const popGiftData = {
  7505. fromJSON(_: any): popGiftData {
  7506. return {};
  7507. },
  7508. toJSON(_: popGiftData): unknown {
  7509. const obj: any = {};
  7510. return obj;
  7511. },
  7512. create<I extends Exact<DeepPartial<popGiftData>, I>>(base?: I): popGiftData {
  7513. return popGiftData.fromPartial(base ?? ({} as any));
  7514. },
  7515. fromPartial<I extends Exact<DeepPartial<popGiftData>, I>>(_: I): popGiftData {
  7516. const message = createBasepopGiftData();
  7517. return message;
  7518. },
  7519. };
  7520. function createBasepopGiftDataRsp(): popGiftDataRsp {
  7521. return { errno: 0, list: [] };
  7522. }
  7523. export const popGiftDataRsp = {
  7524. fromJSON(object: any): popGiftDataRsp {
  7525. return {
  7526. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7527. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => popGiftInfo.fromJSON(e)) : [],
  7528. };
  7529. },
  7530. toJSON(message: popGiftDataRsp): unknown {
  7531. const obj: any = {};
  7532. if (message.errno !== 0) {
  7533. obj.errno = Math.round(message.errno);
  7534. }
  7535. if (message.list?.length) {
  7536. obj.list = message.list.map((e) => popGiftInfo.toJSON(e));
  7537. }
  7538. return obj;
  7539. },
  7540. create<I extends Exact<DeepPartial<popGiftDataRsp>, I>>(base?: I): popGiftDataRsp {
  7541. return popGiftDataRsp.fromPartial(base ?? ({} as any));
  7542. },
  7543. fromPartial<I extends Exact<DeepPartial<popGiftDataRsp>, I>>(object: I): popGiftDataRsp {
  7544. const message = createBasepopGiftDataRsp();
  7545. message.errno = object.errno ?? 0;
  7546. message.list = object.list?.map((e) => popGiftInfo.fromPartial(e)) || [];
  7547. return message;
  7548. },
  7549. };
  7550. function createBasepopGiftBuy(): popGiftBuy {
  7551. return { id: 0 };
  7552. }
  7553. export const popGiftBuy = {
  7554. fromJSON(object: any): popGiftBuy {
  7555. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  7556. },
  7557. toJSON(message: popGiftBuy): unknown {
  7558. const obj: any = {};
  7559. if (message.id !== 0) {
  7560. obj.id = Math.round(message.id);
  7561. }
  7562. return obj;
  7563. },
  7564. create<I extends Exact<DeepPartial<popGiftBuy>, I>>(base?: I): popGiftBuy {
  7565. return popGiftBuy.fromPartial(base ?? ({} as any));
  7566. },
  7567. fromPartial<I extends Exact<DeepPartial<popGiftBuy>, I>>(object: I): popGiftBuy {
  7568. const message = createBasepopGiftBuy();
  7569. message.id = object.id ?? 0;
  7570. return message;
  7571. },
  7572. };
  7573. function createBasepopGiftBuyRsp(): popGiftBuyRsp {
  7574. return { errno: 0 };
  7575. }
  7576. export const popGiftBuyRsp = {
  7577. fromJSON(object: any): popGiftBuyRsp {
  7578. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  7579. },
  7580. toJSON(message: popGiftBuyRsp): unknown {
  7581. const obj: any = {};
  7582. if (message.errno !== 0) {
  7583. obj.errno = Math.round(message.errno);
  7584. }
  7585. return obj;
  7586. },
  7587. create<I extends Exact<DeepPartial<popGiftBuyRsp>, I>>(base?: I): popGiftBuyRsp {
  7588. return popGiftBuyRsp.fromPartial(base ?? ({} as any));
  7589. },
  7590. fromPartial<I extends Exact<DeepPartial<popGiftBuyRsp>, I>>(object: I): popGiftBuyRsp {
  7591. const message = createBasepopGiftBuyRsp();
  7592. message.errno = object.errno ?? 0;
  7593. return message;
  7594. },
  7595. };
  7596. function createBasepopGiftNty(): popGiftNty {
  7597. return { data: undefined };
  7598. }
  7599. export const popGiftNty = {
  7600. fromJSON(object: any): popGiftNty {
  7601. return { data: isSet(object.data) ? popGiftInfo.fromJSON(object.data) : undefined };
  7602. },
  7603. toJSON(message: popGiftNty): unknown {
  7604. const obj: any = {};
  7605. if (message.data !== undefined) {
  7606. obj.data = popGiftInfo.toJSON(message.data);
  7607. }
  7608. return obj;
  7609. },
  7610. create<I extends Exact<DeepPartial<popGiftNty>, I>>(base?: I): popGiftNty {
  7611. return popGiftNty.fromPartial(base ?? ({} as any));
  7612. },
  7613. fromPartial<I extends Exact<DeepPartial<popGiftNty>, I>>(object: I): popGiftNty {
  7614. const message = createBasepopGiftNty();
  7615. message.data = (object.data !== undefined && object.data !== null)
  7616. ? popGiftInfo.fromPartial(object.data)
  7617. : undefined;
  7618. return message;
  7619. },
  7620. };
  7621. function createBasepopGiftChangeNty(): popGiftChangeNty {
  7622. return { data: undefined };
  7623. }
  7624. export const popGiftChangeNty = {
  7625. fromJSON(object: any): popGiftChangeNty {
  7626. return { data: isSet(object.data) ? popGiftInfo.fromJSON(object.data) : undefined };
  7627. },
  7628. toJSON(message: popGiftChangeNty): unknown {
  7629. const obj: any = {};
  7630. if (message.data !== undefined) {
  7631. obj.data = popGiftInfo.toJSON(message.data);
  7632. }
  7633. return obj;
  7634. },
  7635. create<I extends Exact<DeepPartial<popGiftChangeNty>, I>>(base?: I): popGiftChangeNty {
  7636. return popGiftChangeNty.fromPartial(base ?? ({} as any));
  7637. },
  7638. fromPartial<I extends Exact<DeepPartial<popGiftChangeNty>, I>>(object: I): popGiftChangeNty {
  7639. const message = createBasepopGiftChangeNty();
  7640. message.data = (object.data !== undefined && object.data !== null)
  7641. ? popGiftInfo.fromPartial(object.data)
  7642. : undefined;
  7643. return message;
  7644. },
  7645. };
  7646. function createBasefundData(): fundData {
  7647. return { moduleid: 0 };
  7648. }
  7649. export const fundData = {
  7650. fromJSON(object: any): fundData {
  7651. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  7652. },
  7653. toJSON(message: fundData): unknown {
  7654. const obj: any = {};
  7655. if (message.moduleid !== 0) {
  7656. obj.moduleid = Math.round(message.moduleid);
  7657. }
  7658. return obj;
  7659. },
  7660. create<I extends Exact<DeepPartial<fundData>, I>>(base?: I): fundData {
  7661. return fundData.fromPartial(base ?? ({} as any));
  7662. },
  7663. fromPartial<I extends Exact<DeepPartial<fundData>, I>>(object: I): fundData {
  7664. const message = createBasefundData();
  7665. message.moduleid = object.moduleid ?? 0;
  7666. return message;
  7667. },
  7668. };
  7669. function createBasefundDataRsp(): fundDataRsp {
  7670. return { errno: 0, moduleid: 0, state: false, award: 0, freeAward: 0, progress: 0 };
  7671. }
  7672. export const fundDataRsp = {
  7673. fromJSON(object: any): fundDataRsp {
  7674. return {
  7675. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7676. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  7677. state: isSet(object.state) ? globalThis.Boolean(object.state) : false,
  7678. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  7679. freeAward: isSet(object.freeAward) ? globalThis.Number(object.freeAward) : 0,
  7680. progress: isSet(object.progress) ? globalThis.Number(object.progress) : 0,
  7681. };
  7682. },
  7683. toJSON(message: fundDataRsp): unknown {
  7684. const obj: any = {};
  7685. if (message.errno !== 0) {
  7686. obj.errno = Math.round(message.errno);
  7687. }
  7688. if (message.moduleid !== 0) {
  7689. obj.moduleid = Math.round(message.moduleid);
  7690. }
  7691. if (message.state !== false) {
  7692. obj.state = message.state;
  7693. }
  7694. if (message.award !== 0) {
  7695. obj.award = Math.round(message.award);
  7696. }
  7697. if (message.freeAward !== 0) {
  7698. obj.freeAward = Math.round(message.freeAward);
  7699. }
  7700. if (message.progress !== 0) {
  7701. obj.progress = Math.round(message.progress);
  7702. }
  7703. return obj;
  7704. },
  7705. create<I extends Exact<DeepPartial<fundDataRsp>, I>>(base?: I): fundDataRsp {
  7706. return fundDataRsp.fromPartial(base ?? ({} as any));
  7707. },
  7708. fromPartial<I extends Exact<DeepPartial<fundDataRsp>, I>>(object: I): fundDataRsp {
  7709. const message = createBasefundDataRsp();
  7710. message.errno = object.errno ?? 0;
  7711. message.moduleid = object.moduleid ?? 0;
  7712. message.state = object.state ?? false;
  7713. message.award = object.award ?? 0;
  7714. message.freeAward = object.freeAward ?? 0;
  7715. message.progress = object.progress ?? 0;
  7716. return message;
  7717. },
  7718. };
  7719. function createBasefundBuy(): fundBuy {
  7720. return { moduleid: 0 };
  7721. }
  7722. export const fundBuy = {
  7723. fromJSON(object: any): fundBuy {
  7724. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  7725. },
  7726. toJSON(message: fundBuy): unknown {
  7727. const obj: any = {};
  7728. if (message.moduleid !== 0) {
  7729. obj.moduleid = Math.round(message.moduleid);
  7730. }
  7731. return obj;
  7732. },
  7733. create<I extends Exact<DeepPartial<fundBuy>, I>>(base?: I): fundBuy {
  7734. return fundBuy.fromPartial(base ?? ({} as any));
  7735. },
  7736. fromPartial<I extends Exact<DeepPartial<fundBuy>, I>>(object: I): fundBuy {
  7737. const message = createBasefundBuy();
  7738. message.moduleid = object.moduleid ?? 0;
  7739. return message;
  7740. },
  7741. };
  7742. function createBasefundBuyRsp(): fundBuyRsp {
  7743. return { errno: 0, moduleid: 0 };
  7744. }
  7745. export const fundBuyRsp = {
  7746. fromJSON(object: any): fundBuyRsp {
  7747. return {
  7748. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7749. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  7750. };
  7751. },
  7752. toJSON(message: fundBuyRsp): unknown {
  7753. const obj: any = {};
  7754. if (message.errno !== 0) {
  7755. obj.errno = Math.round(message.errno);
  7756. }
  7757. if (message.moduleid !== 0) {
  7758. obj.moduleid = Math.round(message.moduleid);
  7759. }
  7760. return obj;
  7761. },
  7762. create<I extends Exact<DeepPartial<fundBuyRsp>, I>>(base?: I): fundBuyRsp {
  7763. return fundBuyRsp.fromPartial(base ?? ({} as any));
  7764. },
  7765. fromPartial<I extends Exact<DeepPartial<fundBuyRsp>, I>>(object: I): fundBuyRsp {
  7766. const message = createBasefundBuyRsp();
  7767. message.errno = object.errno ?? 0;
  7768. message.moduleid = object.moduleid ?? 0;
  7769. return message;
  7770. },
  7771. };
  7772. function createBasefundAward(): fundAward {
  7773. return { moduleid: 0 };
  7774. }
  7775. export const fundAward = {
  7776. fromJSON(object: any): fundAward {
  7777. return { moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0 };
  7778. },
  7779. toJSON(message: fundAward): unknown {
  7780. const obj: any = {};
  7781. if (message.moduleid !== 0) {
  7782. obj.moduleid = Math.round(message.moduleid);
  7783. }
  7784. return obj;
  7785. },
  7786. create<I extends Exact<DeepPartial<fundAward>, I>>(base?: I): fundAward {
  7787. return fundAward.fromPartial(base ?? ({} as any));
  7788. },
  7789. fromPartial<I extends Exact<DeepPartial<fundAward>, I>>(object: I): fundAward {
  7790. const message = createBasefundAward();
  7791. message.moduleid = object.moduleid ?? 0;
  7792. return message;
  7793. },
  7794. };
  7795. function createBasefundAwardRsp(): fundAwardRsp {
  7796. return { errno: 0, moduleid: 0, award: 0, freeAward: 0 };
  7797. }
  7798. export const fundAwardRsp = {
  7799. fromJSON(object: any): fundAwardRsp {
  7800. return {
  7801. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7802. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  7803. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  7804. freeAward: isSet(object.freeAward) ? globalThis.Number(object.freeAward) : 0,
  7805. };
  7806. },
  7807. toJSON(message: fundAwardRsp): unknown {
  7808. const obj: any = {};
  7809. if (message.errno !== 0) {
  7810. obj.errno = Math.round(message.errno);
  7811. }
  7812. if (message.moduleid !== 0) {
  7813. obj.moduleid = Math.round(message.moduleid);
  7814. }
  7815. if (message.award !== 0) {
  7816. obj.award = Math.round(message.award);
  7817. }
  7818. if (message.freeAward !== 0) {
  7819. obj.freeAward = Math.round(message.freeAward);
  7820. }
  7821. return obj;
  7822. },
  7823. create<I extends Exact<DeepPartial<fundAwardRsp>, I>>(base?: I): fundAwardRsp {
  7824. return fundAwardRsp.fromPartial(base ?? ({} as any));
  7825. },
  7826. fromPartial<I extends Exact<DeepPartial<fundAwardRsp>, I>>(object: I): fundAwardRsp {
  7827. const message = createBasefundAwardRsp();
  7828. message.errno = object.errno ?? 0;
  7829. message.moduleid = object.moduleid ?? 0;
  7830. message.award = object.award ?? 0;
  7831. message.freeAward = object.freeAward ?? 0;
  7832. return message;
  7833. },
  7834. };
  7835. function createBasefundNty(): fundNty {
  7836. return { moduleid: 0, state: false, award: 0, freeAward: 0, progress: 0 };
  7837. }
  7838. export const fundNty = {
  7839. fromJSON(object: any): fundNty {
  7840. return {
  7841. moduleid: isSet(object.moduleid) ? globalThis.Number(object.moduleid) : 0,
  7842. state: isSet(object.state) ? globalThis.Boolean(object.state) : false,
  7843. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  7844. freeAward: isSet(object.freeAward) ? globalThis.Number(object.freeAward) : 0,
  7845. progress: isSet(object.progress) ? globalThis.Number(object.progress) : 0,
  7846. };
  7847. },
  7848. toJSON(message: fundNty): unknown {
  7849. const obj: any = {};
  7850. if (message.moduleid !== 0) {
  7851. obj.moduleid = Math.round(message.moduleid);
  7852. }
  7853. if (message.state !== false) {
  7854. obj.state = message.state;
  7855. }
  7856. if (message.award !== 0) {
  7857. obj.award = Math.round(message.award);
  7858. }
  7859. if (message.freeAward !== 0) {
  7860. obj.freeAward = Math.round(message.freeAward);
  7861. }
  7862. if (message.progress !== 0) {
  7863. obj.progress = Math.round(message.progress);
  7864. }
  7865. return obj;
  7866. },
  7867. create<I extends Exact<DeepPartial<fundNty>, I>>(base?: I): fundNty {
  7868. return fundNty.fromPartial(base ?? ({} as any));
  7869. },
  7870. fromPartial<I extends Exact<DeepPartial<fundNty>, I>>(object: I): fundNty {
  7871. const message = createBasefundNty();
  7872. message.moduleid = object.moduleid ?? 0;
  7873. message.state = object.state ?? false;
  7874. message.award = object.award ?? 0;
  7875. message.freeAward = object.freeAward ?? 0;
  7876. message.progress = object.progress ?? 0;
  7877. return message;
  7878. },
  7879. };
  7880. function createBasekeepRechargeData(): keepRechargeData {
  7881. return {};
  7882. }
  7883. export const keepRechargeData = {
  7884. fromJSON(_: any): keepRechargeData {
  7885. return {};
  7886. },
  7887. toJSON(_: keepRechargeData): unknown {
  7888. const obj: any = {};
  7889. return obj;
  7890. },
  7891. create<I extends Exact<DeepPartial<keepRechargeData>, I>>(base?: I): keepRechargeData {
  7892. return keepRechargeData.fromPartial(base ?? ({} as any));
  7893. },
  7894. fromPartial<I extends Exact<DeepPartial<keepRechargeData>, I>>(_: I): keepRechargeData {
  7895. const message = createBasekeepRechargeData();
  7896. return message;
  7897. },
  7898. };
  7899. function createBasekeepRechargeDataRsp(): keepRechargeDataRsp {
  7900. return { errno: 0, day: 0, num: 0, award: 0 };
  7901. }
  7902. export const keepRechargeDataRsp = {
  7903. fromJSON(object: any): keepRechargeDataRsp {
  7904. return {
  7905. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7906. day: isSet(object.day) ? globalThis.Number(object.day) : 0,
  7907. num: isSet(object.num) ? globalThis.Number(object.num) : 0,
  7908. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  7909. };
  7910. },
  7911. toJSON(message: keepRechargeDataRsp): unknown {
  7912. const obj: any = {};
  7913. if (message.errno !== 0) {
  7914. obj.errno = Math.round(message.errno);
  7915. }
  7916. if (message.day !== 0) {
  7917. obj.day = Math.round(message.day);
  7918. }
  7919. if (message.num !== 0) {
  7920. obj.num = Math.round(message.num);
  7921. }
  7922. if (message.award !== 0) {
  7923. obj.award = Math.round(message.award);
  7924. }
  7925. return obj;
  7926. },
  7927. create<I extends Exact<DeepPartial<keepRechargeDataRsp>, I>>(base?: I): keepRechargeDataRsp {
  7928. return keepRechargeDataRsp.fromPartial(base ?? ({} as any));
  7929. },
  7930. fromPartial<I extends Exact<DeepPartial<keepRechargeDataRsp>, I>>(object: I): keepRechargeDataRsp {
  7931. const message = createBasekeepRechargeDataRsp();
  7932. message.errno = object.errno ?? 0;
  7933. message.day = object.day ?? 0;
  7934. message.num = object.num ?? 0;
  7935. message.award = object.award ?? 0;
  7936. return message;
  7937. },
  7938. };
  7939. function createBasekeepRechargeAward(): keepRechargeAward {
  7940. return { day: 0 };
  7941. }
  7942. export const keepRechargeAward = {
  7943. fromJSON(object: any): keepRechargeAward {
  7944. return { day: isSet(object.day) ? globalThis.Number(object.day) : 0 };
  7945. },
  7946. toJSON(message: keepRechargeAward): unknown {
  7947. const obj: any = {};
  7948. if (message.day !== 0) {
  7949. obj.day = Math.round(message.day);
  7950. }
  7951. return obj;
  7952. },
  7953. create<I extends Exact<DeepPartial<keepRechargeAward>, I>>(base?: I): keepRechargeAward {
  7954. return keepRechargeAward.fromPartial(base ?? ({} as any));
  7955. },
  7956. fromPartial<I extends Exact<DeepPartial<keepRechargeAward>, I>>(object: I): keepRechargeAward {
  7957. const message = createBasekeepRechargeAward();
  7958. message.day = object.day ?? 0;
  7959. return message;
  7960. },
  7961. };
  7962. function createBasekeepRechargeAwardRsp(): keepRechargeAwardRsp {
  7963. return { errno: 0, award: 0 };
  7964. }
  7965. export const keepRechargeAwardRsp = {
  7966. fromJSON(object: any): keepRechargeAwardRsp {
  7967. return {
  7968. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  7969. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  7970. };
  7971. },
  7972. toJSON(message: keepRechargeAwardRsp): unknown {
  7973. const obj: any = {};
  7974. if (message.errno !== 0) {
  7975. obj.errno = Math.round(message.errno);
  7976. }
  7977. if (message.award !== 0) {
  7978. obj.award = Math.round(message.award);
  7979. }
  7980. return obj;
  7981. },
  7982. create<I extends Exact<DeepPartial<keepRechargeAwardRsp>, I>>(base?: I): keepRechargeAwardRsp {
  7983. return keepRechargeAwardRsp.fromPartial(base ?? ({} as any));
  7984. },
  7985. fromPartial<I extends Exact<DeepPartial<keepRechargeAwardRsp>, I>>(object: I): keepRechargeAwardRsp {
  7986. const message = createBasekeepRechargeAwardRsp();
  7987. message.errno = object.errno ?? 0;
  7988. message.award = object.award ?? 0;
  7989. return message;
  7990. },
  7991. };
  7992. function createBasegetRedPointList(): getRedPointList {
  7993. return {};
  7994. }
  7995. export const getRedPointList = {
  7996. fromJSON(_: any): getRedPointList {
  7997. return {};
  7998. },
  7999. toJSON(_: getRedPointList): unknown {
  8000. const obj: any = {};
  8001. return obj;
  8002. },
  8003. create<I extends Exact<DeepPartial<getRedPointList>, I>>(base?: I): getRedPointList {
  8004. return getRedPointList.fromPartial(base ?? ({} as any));
  8005. },
  8006. fromPartial<I extends Exact<DeepPartial<getRedPointList>, I>>(_: I): getRedPointList {
  8007. const message = createBasegetRedPointList();
  8008. return message;
  8009. },
  8010. };
  8011. function createBasegetRedPointListRsp(): getRedPointListRsp {
  8012. return { errno: 0, list: [] };
  8013. }
  8014. export const getRedPointListRsp = {
  8015. fromJSON(object: any): getRedPointListRsp {
  8016. return {
  8017. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8018. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => redPointInfo.fromJSON(e)) : [],
  8019. };
  8020. },
  8021. toJSON(message: getRedPointListRsp): unknown {
  8022. const obj: any = {};
  8023. if (message.errno !== 0) {
  8024. obj.errno = Math.round(message.errno);
  8025. }
  8026. if (message.list?.length) {
  8027. obj.list = message.list.map((e) => redPointInfo.toJSON(e));
  8028. }
  8029. return obj;
  8030. },
  8031. create<I extends Exact<DeepPartial<getRedPointListRsp>, I>>(base?: I): getRedPointListRsp {
  8032. return getRedPointListRsp.fromPartial(base ?? ({} as any));
  8033. },
  8034. fromPartial<I extends Exact<DeepPartial<getRedPointListRsp>, I>>(object: I): getRedPointListRsp {
  8035. const message = createBasegetRedPointListRsp();
  8036. message.errno = object.errno ?? 0;
  8037. message.list = object.list?.map((e) => redPointInfo.fromPartial(e)) || [];
  8038. return message;
  8039. },
  8040. };
  8041. function createBaserechargeResult(): rechargeResult {
  8042. return { orderId: "", payOrderId: "", purchaseToken: "", payType: "", cfgId: 0 };
  8043. }
  8044. export const rechargeResult = {
  8045. fromJSON(object: any): rechargeResult {
  8046. return {
  8047. orderId: isSet(object.orderId) ? globalThis.String(object.orderId) : "",
  8048. payOrderId: isSet(object.payOrderId) ? globalThis.String(object.payOrderId) : "",
  8049. purchaseToken: isSet(object.purchaseToken) ? globalThis.String(object.purchaseToken) : "",
  8050. payType: isSet(object.payType) ? globalThis.String(object.payType) : "",
  8051. cfgId: isSet(object.cfgId) ? globalThis.Number(object.cfgId) : 0,
  8052. };
  8053. },
  8054. toJSON(message: rechargeResult): unknown {
  8055. const obj: any = {};
  8056. if (message.orderId !== "") {
  8057. obj.orderId = message.orderId;
  8058. }
  8059. if (message.payOrderId !== "") {
  8060. obj.payOrderId = message.payOrderId;
  8061. }
  8062. if (message.purchaseToken !== "") {
  8063. obj.purchaseToken = message.purchaseToken;
  8064. }
  8065. if (message.payType !== "") {
  8066. obj.payType = message.payType;
  8067. }
  8068. if (message.cfgId !== 0) {
  8069. obj.cfgId = Math.round(message.cfgId);
  8070. }
  8071. return obj;
  8072. },
  8073. create<I extends Exact<DeepPartial<rechargeResult>, I>>(base?: I): rechargeResult {
  8074. return rechargeResult.fromPartial(base ?? ({} as any));
  8075. },
  8076. fromPartial<I extends Exact<DeepPartial<rechargeResult>, I>>(object: I): rechargeResult {
  8077. const message = createBaserechargeResult();
  8078. message.orderId = object.orderId ?? "";
  8079. message.payOrderId = object.payOrderId ?? "";
  8080. message.purchaseToken = object.purchaseToken ?? "";
  8081. message.payType = object.payType ?? "";
  8082. message.cfgId = object.cfgId ?? 0;
  8083. return message;
  8084. },
  8085. };
  8086. function createBaserechargeResultRsp(): rechargeResultRsp {
  8087. return { errno: 0 };
  8088. }
  8089. export const rechargeResultRsp = {
  8090. fromJSON(object: any): rechargeResultRsp {
  8091. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  8092. },
  8093. toJSON(message: rechargeResultRsp): unknown {
  8094. const obj: any = {};
  8095. if (message.errno !== 0) {
  8096. obj.errno = Math.round(message.errno);
  8097. }
  8098. return obj;
  8099. },
  8100. create<I extends Exact<DeepPartial<rechargeResultRsp>, I>>(base?: I): rechargeResultRsp {
  8101. return rechargeResultRsp.fromPartial(base ?? ({} as any));
  8102. },
  8103. fromPartial<I extends Exact<DeepPartial<rechargeResultRsp>, I>>(object: I): rechargeResultRsp {
  8104. const message = createBaserechargeResultRsp();
  8105. message.errno = object.errno ?? 0;
  8106. return message;
  8107. },
  8108. };
  8109. function createBaserechargeSuccess(): rechargeSuccess {
  8110. return { id: "" };
  8111. }
  8112. export const rechargeSuccess = {
  8113. fromJSON(object: any): rechargeSuccess {
  8114. return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
  8115. },
  8116. toJSON(message: rechargeSuccess): unknown {
  8117. const obj: any = {};
  8118. if (message.id !== "") {
  8119. obj.id = message.id;
  8120. }
  8121. return obj;
  8122. },
  8123. create<I extends Exact<DeepPartial<rechargeSuccess>, I>>(base?: I): rechargeSuccess {
  8124. return rechargeSuccess.fromPartial(base ?? ({} as any));
  8125. },
  8126. fromPartial<I extends Exact<DeepPartial<rechargeSuccess>, I>>(object: I): rechargeSuccess {
  8127. const message = createBaserechargeSuccess();
  8128. message.id = object.id ?? "";
  8129. return message;
  8130. },
  8131. };
  8132. function createBaseonlineAwardGetAward(): onlineAwardGetAward {
  8133. return { pos: 0 };
  8134. }
  8135. export const onlineAwardGetAward = {
  8136. fromJSON(object: any): onlineAwardGetAward {
  8137. return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0 };
  8138. },
  8139. toJSON(message: onlineAwardGetAward): unknown {
  8140. const obj: any = {};
  8141. if (message.pos !== 0) {
  8142. obj.pos = Math.round(message.pos);
  8143. }
  8144. return obj;
  8145. },
  8146. create<I extends Exact<DeepPartial<onlineAwardGetAward>, I>>(base?: I): onlineAwardGetAward {
  8147. return onlineAwardGetAward.fromPartial(base ?? ({} as any));
  8148. },
  8149. fromPartial<I extends Exact<DeepPartial<onlineAwardGetAward>, I>>(object: I): onlineAwardGetAward {
  8150. const message = createBaseonlineAwardGetAward();
  8151. message.pos = object.pos ?? 0;
  8152. return message;
  8153. },
  8154. };
  8155. function createBaseonlineAwardGetAwardRsp(): onlineAwardGetAwardRsp {
  8156. return { errno: 0, award: 0 };
  8157. }
  8158. export const onlineAwardGetAwardRsp = {
  8159. fromJSON(object: any): onlineAwardGetAwardRsp {
  8160. return {
  8161. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8162. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  8163. };
  8164. },
  8165. toJSON(message: onlineAwardGetAwardRsp): unknown {
  8166. const obj: any = {};
  8167. if (message.errno !== 0) {
  8168. obj.errno = Math.round(message.errno);
  8169. }
  8170. if (message.award !== 0) {
  8171. obj.award = Math.round(message.award);
  8172. }
  8173. return obj;
  8174. },
  8175. create<I extends Exact<DeepPartial<onlineAwardGetAwardRsp>, I>>(base?: I): onlineAwardGetAwardRsp {
  8176. return onlineAwardGetAwardRsp.fromPartial(base ?? ({} as any));
  8177. },
  8178. fromPartial<I extends Exact<DeepPartial<onlineAwardGetAwardRsp>, I>>(object: I): onlineAwardGetAwardRsp {
  8179. const message = createBaseonlineAwardGetAwardRsp();
  8180. message.errno = object.errno ?? 0;
  8181. message.award = object.award ?? 0;
  8182. return message;
  8183. },
  8184. };
  8185. function createBaseonlineAwardGetData(): onlineAwardGetData {
  8186. return {};
  8187. }
  8188. export const onlineAwardGetData = {
  8189. fromJSON(_: any): onlineAwardGetData {
  8190. return {};
  8191. },
  8192. toJSON(_: onlineAwardGetData): unknown {
  8193. const obj: any = {};
  8194. return obj;
  8195. },
  8196. create<I extends Exact<DeepPartial<onlineAwardGetData>, I>>(base?: I): onlineAwardGetData {
  8197. return onlineAwardGetData.fromPartial(base ?? ({} as any));
  8198. },
  8199. fromPartial<I extends Exact<DeepPartial<onlineAwardGetData>, I>>(_: I): onlineAwardGetData {
  8200. const message = createBaseonlineAwardGetData();
  8201. return message;
  8202. },
  8203. };
  8204. function createBaseonlineAwardGetDataRsp(): onlineAwardGetDataRsp {
  8205. return { errno: 0 };
  8206. }
  8207. export const onlineAwardGetDataRsp = {
  8208. fromJSON(object: any): onlineAwardGetDataRsp {
  8209. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  8210. },
  8211. toJSON(message: onlineAwardGetDataRsp): unknown {
  8212. const obj: any = {};
  8213. if (message.errno !== 0) {
  8214. obj.errno = Math.round(message.errno);
  8215. }
  8216. return obj;
  8217. },
  8218. create<I extends Exact<DeepPartial<onlineAwardGetDataRsp>, I>>(base?: I): onlineAwardGetDataRsp {
  8219. return onlineAwardGetDataRsp.fromPartial(base ?? ({} as any));
  8220. },
  8221. fromPartial<I extends Exact<DeepPartial<onlineAwardGetDataRsp>, I>>(object: I): onlineAwardGetDataRsp {
  8222. const message = createBaseonlineAwardGetDataRsp();
  8223. message.errno = object.errno ?? 0;
  8224. return message;
  8225. },
  8226. };
  8227. function createBaseonlineAwardNty(): onlineAwardNty {
  8228. return { open: false, time: 0, award: 0 };
  8229. }
  8230. export const onlineAwardNty = {
  8231. fromJSON(object: any): onlineAwardNty {
  8232. return {
  8233. open: isSet(object.open) ? globalThis.Boolean(object.open) : false,
  8234. time: isSet(object.time) ? globalThis.Number(object.time) : 0,
  8235. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  8236. };
  8237. },
  8238. toJSON(message: onlineAwardNty): unknown {
  8239. const obj: any = {};
  8240. if (message.open !== false) {
  8241. obj.open = message.open;
  8242. }
  8243. if (message.time !== 0) {
  8244. obj.time = Math.round(message.time);
  8245. }
  8246. if (message.award !== 0) {
  8247. obj.award = Math.round(message.award);
  8248. }
  8249. return obj;
  8250. },
  8251. create<I extends Exact<DeepPartial<onlineAwardNty>, I>>(base?: I): onlineAwardNty {
  8252. return onlineAwardNty.fromPartial(base ?? ({} as any));
  8253. },
  8254. fromPartial<I extends Exact<DeepPartial<onlineAwardNty>, I>>(object: I): onlineAwardNty {
  8255. const message = createBaseonlineAwardNty();
  8256. message.open = object.open ?? false;
  8257. message.time = object.time ?? 0;
  8258. message.award = object.award ?? 0;
  8259. return message;
  8260. },
  8261. };
  8262. function createBasespeedUpData(): speedUpData {
  8263. return {};
  8264. }
  8265. export const speedUpData = {
  8266. fromJSON(_: any): speedUpData {
  8267. return {};
  8268. },
  8269. toJSON(_: speedUpData): unknown {
  8270. const obj: any = {};
  8271. return obj;
  8272. },
  8273. create<I extends Exact<DeepPartial<speedUpData>, I>>(base?: I): speedUpData {
  8274. return speedUpData.fromPartial(base ?? ({} as any));
  8275. },
  8276. fromPartial<I extends Exact<DeepPartial<speedUpData>, I>>(_: I): speedUpData {
  8277. const message = createBasespeedUpData();
  8278. return message;
  8279. },
  8280. };
  8281. function createBasespeedUpDataRsp(): speedUpDataRsp {
  8282. return { errno: 0, time: 0 };
  8283. }
  8284. export const speedUpDataRsp = {
  8285. fromJSON(object: any): speedUpDataRsp {
  8286. return {
  8287. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8288. time: isSet(object.time) ? globalThis.Number(object.time) : 0,
  8289. };
  8290. },
  8291. toJSON(message: speedUpDataRsp): unknown {
  8292. const obj: any = {};
  8293. if (message.errno !== 0) {
  8294. obj.errno = Math.round(message.errno);
  8295. }
  8296. if (message.time !== 0) {
  8297. obj.time = Math.round(message.time);
  8298. }
  8299. return obj;
  8300. },
  8301. create<I extends Exact<DeepPartial<speedUpDataRsp>, I>>(base?: I): speedUpDataRsp {
  8302. return speedUpDataRsp.fromPartial(base ?? ({} as any));
  8303. },
  8304. fromPartial<I extends Exact<DeepPartial<speedUpDataRsp>, I>>(object: I): speedUpDataRsp {
  8305. const message = createBasespeedUpDataRsp();
  8306. message.errno = object.errno ?? 0;
  8307. message.time = object.time ?? 0;
  8308. return message;
  8309. },
  8310. };
  8311. function createBasespeedUpBuy(): speedUpBuy {
  8312. return { free: false };
  8313. }
  8314. export const speedUpBuy = {
  8315. fromJSON(object: any): speedUpBuy {
  8316. return { free: isSet(object.free) ? globalThis.Boolean(object.free) : false };
  8317. },
  8318. toJSON(message: speedUpBuy): unknown {
  8319. const obj: any = {};
  8320. if (message.free !== false) {
  8321. obj.free = message.free;
  8322. }
  8323. return obj;
  8324. },
  8325. create<I extends Exact<DeepPartial<speedUpBuy>, I>>(base?: I): speedUpBuy {
  8326. return speedUpBuy.fromPartial(base ?? ({} as any));
  8327. },
  8328. fromPartial<I extends Exact<DeepPartial<speedUpBuy>, I>>(object: I): speedUpBuy {
  8329. const message = createBasespeedUpBuy();
  8330. message.free = object.free ?? false;
  8331. return message;
  8332. },
  8333. };
  8334. function createBasespeedUpBuyRsp(): speedUpBuyRsp {
  8335. return { errno: 0, time: 0 };
  8336. }
  8337. export const speedUpBuyRsp = {
  8338. fromJSON(object: any): speedUpBuyRsp {
  8339. return {
  8340. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8341. time: isSet(object.time) ? globalThis.Number(object.time) : 0,
  8342. };
  8343. },
  8344. toJSON(message: speedUpBuyRsp): unknown {
  8345. const obj: any = {};
  8346. if (message.errno !== 0) {
  8347. obj.errno = Math.round(message.errno);
  8348. }
  8349. if (message.time !== 0) {
  8350. obj.time = Math.round(message.time);
  8351. }
  8352. return obj;
  8353. },
  8354. create<I extends Exact<DeepPartial<speedUpBuyRsp>, I>>(base?: I): speedUpBuyRsp {
  8355. return speedUpBuyRsp.fromPartial(base ?? ({} as any));
  8356. },
  8357. fromPartial<I extends Exact<DeepPartial<speedUpBuyRsp>, I>>(object: I): speedUpBuyRsp {
  8358. const message = createBasespeedUpBuyRsp();
  8359. message.errno = object.errno ?? 0;
  8360. message.time = object.time ?? 0;
  8361. return message;
  8362. },
  8363. };
  8364. function createBasecitySkillUpgrade(): citySkillUpgrade {
  8365. return { id: 0 };
  8366. }
  8367. export const citySkillUpgrade = {
  8368. fromJSON(object: any): citySkillUpgrade {
  8369. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  8370. },
  8371. toJSON(message: citySkillUpgrade): unknown {
  8372. const obj: any = {};
  8373. if (message.id !== 0) {
  8374. obj.id = Math.round(message.id);
  8375. }
  8376. return obj;
  8377. },
  8378. create<I extends Exact<DeepPartial<citySkillUpgrade>, I>>(base?: I): citySkillUpgrade {
  8379. return citySkillUpgrade.fromPartial(base ?? ({} as any));
  8380. },
  8381. fromPartial<I extends Exact<DeepPartial<citySkillUpgrade>, I>>(object: I): citySkillUpgrade {
  8382. const message = createBasecitySkillUpgrade();
  8383. message.id = object.id ?? 0;
  8384. return message;
  8385. },
  8386. };
  8387. function createBasecitySkillUpgradeRsp(): citySkillUpgradeRsp {
  8388. return { errno: 0, id: 0 };
  8389. }
  8390. export const citySkillUpgradeRsp = {
  8391. fromJSON(object: any): citySkillUpgradeRsp {
  8392. return {
  8393. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8394. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  8395. };
  8396. },
  8397. toJSON(message: citySkillUpgradeRsp): unknown {
  8398. const obj: any = {};
  8399. if (message.errno !== 0) {
  8400. obj.errno = Math.round(message.errno);
  8401. }
  8402. if (message.id !== 0) {
  8403. obj.id = Math.round(message.id);
  8404. }
  8405. return obj;
  8406. },
  8407. create<I extends Exact<DeepPartial<citySkillUpgradeRsp>, I>>(base?: I): citySkillUpgradeRsp {
  8408. return citySkillUpgradeRsp.fromPartial(base ?? ({} as any));
  8409. },
  8410. fromPartial<I extends Exact<DeepPartial<citySkillUpgradeRsp>, I>>(object: I): citySkillUpgradeRsp {
  8411. const message = createBasecitySkillUpgradeRsp();
  8412. message.errno = object.errno ?? 0;
  8413. message.id = object.id ?? 0;
  8414. return message;
  8415. },
  8416. };
  8417. function createBasecitySkillBattle(): citySkillBattle {
  8418. return { id: 0 };
  8419. }
  8420. export const citySkillBattle = {
  8421. fromJSON(object: any): citySkillBattle {
  8422. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  8423. },
  8424. toJSON(message: citySkillBattle): unknown {
  8425. const obj: any = {};
  8426. if (message.id !== 0) {
  8427. obj.id = Math.round(message.id);
  8428. }
  8429. return obj;
  8430. },
  8431. create<I extends Exact<DeepPartial<citySkillBattle>, I>>(base?: I): citySkillBattle {
  8432. return citySkillBattle.fromPartial(base ?? ({} as any));
  8433. },
  8434. fromPartial<I extends Exact<DeepPartial<citySkillBattle>, I>>(object: I): citySkillBattle {
  8435. const message = createBasecitySkillBattle();
  8436. message.id = object.id ?? 0;
  8437. return message;
  8438. },
  8439. };
  8440. function createBasecitySkillBattleRsp(): citySkillBattleRsp {
  8441. return { errno: 0, id: 0 };
  8442. }
  8443. export const citySkillBattleRsp = {
  8444. fromJSON(object: any): citySkillBattleRsp {
  8445. return {
  8446. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8447. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  8448. };
  8449. },
  8450. toJSON(message: citySkillBattleRsp): unknown {
  8451. const obj: any = {};
  8452. if (message.errno !== 0) {
  8453. obj.errno = Math.round(message.errno);
  8454. }
  8455. if (message.id !== 0) {
  8456. obj.id = Math.round(message.id);
  8457. }
  8458. return obj;
  8459. },
  8460. create<I extends Exact<DeepPartial<citySkillBattleRsp>, I>>(base?: I): citySkillBattleRsp {
  8461. return citySkillBattleRsp.fromPartial(base ?? ({} as any));
  8462. },
  8463. fromPartial<I extends Exact<DeepPartial<citySkillBattleRsp>, I>>(object: I): citySkillBattleRsp {
  8464. const message = createBasecitySkillBattleRsp();
  8465. message.errno = object.errno ?? 0;
  8466. message.id = object.id ?? 0;
  8467. return message;
  8468. },
  8469. };
  8470. function createBasebuildingExplore(): buildingExplore {
  8471. return { id: 0 };
  8472. }
  8473. export const buildingExplore = {
  8474. fromJSON(object: any): buildingExplore {
  8475. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  8476. },
  8477. toJSON(message: buildingExplore): unknown {
  8478. const obj: any = {};
  8479. if (message.id !== 0) {
  8480. obj.id = Math.round(message.id);
  8481. }
  8482. return obj;
  8483. },
  8484. create<I extends Exact<DeepPartial<buildingExplore>, I>>(base?: I): buildingExplore {
  8485. return buildingExplore.fromPartial(base ?? ({} as any));
  8486. },
  8487. fromPartial<I extends Exact<DeepPartial<buildingExplore>, I>>(object: I): buildingExplore {
  8488. const message = createBasebuildingExplore();
  8489. message.id = object.id ?? 0;
  8490. return message;
  8491. },
  8492. };
  8493. function createBasebuildingExploreRsp(): buildingExploreRsp {
  8494. return { errno: 0, data: undefined };
  8495. }
  8496. export const buildingExploreRsp = {
  8497. fromJSON(object: any): buildingExploreRsp {
  8498. return {
  8499. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8500. data: isSet(object.data) ? building.fromJSON(object.data) : undefined,
  8501. };
  8502. },
  8503. toJSON(message: buildingExploreRsp): unknown {
  8504. const obj: any = {};
  8505. if (message.errno !== 0) {
  8506. obj.errno = Math.round(message.errno);
  8507. }
  8508. if (message.data !== undefined) {
  8509. obj.data = building.toJSON(message.data);
  8510. }
  8511. return obj;
  8512. },
  8513. create<I extends Exact<DeepPartial<buildingExploreRsp>, I>>(base?: I): buildingExploreRsp {
  8514. return buildingExploreRsp.fromPartial(base ?? ({} as any));
  8515. },
  8516. fromPartial<I extends Exact<DeepPartial<buildingExploreRsp>, I>>(object: I): buildingExploreRsp {
  8517. const message = createBasebuildingExploreRsp();
  8518. message.errno = object.errno ?? 0;
  8519. message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined;
  8520. return message;
  8521. },
  8522. };
  8523. function createBasebuildingAutoExploreAward(): buildingAutoExploreAward {
  8524. return { id: 0 };
  8525. }
  8526. export const buildingAutoExploreAward = {
  8527. fromJSON(object: any): buildingAutoExploreAward {
  8528. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  8529. },
  8530. toJSON(message: buildingAutoExploreAward): unknown {
  8531. const obj: any = {};
  8532. if (message.id !== 0) {
  8533. obj.id = Math.round(message.id);
  8534. }
  8535. return obj;
  8536. },
  8537. create<I extends Exact<DeepPartial<buildingAutoExploreAward>, I>>(base?: I): buildingAutoExploreAward {
  8538. return buildingAutoExploreAward.fromPartial(base ?? ({} as any));
  8539. },
  8540. fromPartial<I extends Exact<DeepPartial<buildingAutoExploreAward>, I>>(object: I): buildingAutoExploreAward {
  8541. const message = createBasebuildingAutoExploreAward();
  8542. message.id = object.id ?? 0;
  8543. return message;
  8544. },
  8545. };
  8546. function createBasebuildingAutoExploreAwardRsp(): buildingAutoExploreAwardRsp {
  8547. return { errno: 0, data: undefined };
  8548. }
  8549. export const buildingAutoExploreAwardRsp = {
  8550. fromJSON(object: any): buildingAutoExploreAwardRsp {
  8551. return {
  8552. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8553. data: isSet(object.data) ? building.fromJSON(object.data) : undefined,
  8554. };
  8555. },
  8556. toJSON(message: buildingAutoExploreAwardRsp): unknown {
  8557. const obj: any = {};
  8558. if (message.errno !== 0) {
  8559. obj.errno = Math.round(message.errno);
  8560. }
  8561. if (message.data !== undefined) {
  8562. obj.data = building.toJSON(message.data);
  8563. }
  8564. return obj;
  8565. },
  8566. create<I extends Exact<DeepPartial<buildingAutoExploreAwardRsp>, I>>(base?: I): buildingAutoExploreAwardRsp {
  8567. return buildingAutoExploreAwardRsp.fromPartial(base ?? ({} as any));
  8568. },
  8569. fromPartial<I extends Exact<DeepPartial<buildingAutoExploreAwardRsp>, I>>(object: I): buildingAutoExploreAwardRsp {
  8570. const message = createBasebuildingAutoExploreAwardRsp();
  8571. message.errno = object.errno ?? 0;
  8572. message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined;
  8573. return message;
  8574. },
  8575. };
  8576. function createBasebuildingExploreBattle(): buildingExploreBattle {
  8577. return { id: 0, list: [] };
  8578. }
  8579. export const buildingExploreBattle = {
  8580. fromJSON(object: any): buildingExploreBattle {
  8581. return {
  8582. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  8583. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.String(e)) : [],
  8584. };
  8585. },
  8586. toJSON(message: buildingExploreBattle): unknown {
  8587. const obj: any = {};
  8588. if (message.id !== 0) {
  8589. obj.id = Math.round(message.id);
  8590. }
  8591. if (message.list?.length) {
  8592. obj.list = message.list;
  8593. }
  8594. return obj;
  8595. },
  8596. create<I extends Exact<DeepPartial<buildingExploreBattle>, I>>(base?: I): buildingExploreBattle {
  8597. return buildingExploreBattle.fromPartial(base ?? ({} as any));
  8598. },
  8599. fromPartial<I extends Exact<DeepPartial<buildingExploreBattle>, I>>(object: I): buildingExploreBattle {
  8600. const message = createBasebuildingExploreBattle();
  8601. message.id = object.id ?? 0;
  8602. message.list = object.list?.map((e) => e) || [];
  8603. return message;
  8604. },
  8605. };
  8606. function createBasebuildingExploreBattleRsp(): buildingExploreBattleRsp {
  8607. return { errno: 0, data: undefined };
  8608. }
  8609. export const buildingExploreBattleRsp = {
  8610. fromJSON(object: any): buildingExploreBattleRsp {
  8611. return {
  8612. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8613. data: isSet(object.data) ? building.fromJSON(object.data) : undefined,
  8614. };
  8615. },
  8616. toJSON(message: buildingExploreBattleRsp): unknown {
  8617. const obj: any = {};
  8618. if (message.errno !== 0) {
  8619. obj.errno = Math.round(message.errno);
  8620. }
  8621. if (message.data !== undefined) {
  8622. obj.data = building.toJSON(message.data);
  8623. }
  8624. return obj;
  8625. },
  8626. create<I extends Exact<DeepPartial<buildingExploreBattleRsp>, I>>(base?: I): buildingExploreBattleRsp {
  8627. return buildingExploreBattleRsp.fromPartial(base ?? ({} as any));
  8628. },
  8629. fromPartial<I extends Exact<DeepPartial<buildingExploreBattleRsp>, I>>(object: I): buildingExploreBattleRsp {
  8630. const message = createBasebuildingExploreBattleRsp();
  8631. message.errno = object.errno ?? 0;
  8632. message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined;
  8633. return message;
  8634. },
  8635. };
  8636. function createBasebuildingAutoExploreOption(): buildingAutoExploreOption {
  8637. return { id: 0, open: false };
  8638. }
  8639. export const buildingAutoExploreOption = {
  8640. fromJSON(object: any): buildingAutoExploreOption {
  8641. return {
  8642. id: isSet(object.id) ? globalThis.Number(object.id) : 0,
  8643. open: isSet(object.open) ? globalThis.Boolean(object.open) : false,
  8644. };
  8645. },
  8646. toJSON(message: buildingAutoExploreOption): unknown {
  8647. const obj: any = {};
  8648. if (message.id !== 0) {
  8649. obj.id = Math.round(message.id);
  8650. }
  8651. if (message.open !== false) {
  8652. obj.open = message.open;
  8653. }
  8654. return obj;
  8655. },
  8656. create<I extends Exact<DeepPartial<buildingAutoExploreOption>, I>>(base?: I): buildingAutoExploreOption {
  8657. return buildingAutoExploreOption.fromPartial(base ?? ({} as any));
  8658. },
  8659. fromPartial<I extends Exact<DeepPartial<buildingAutoExploreOption>, I>>(object: I): buildingAutoExploreOption {
  8660. const message = createBasebuildingAutoExploreOption();
  8661. message.id = object.id ?? 0;
  8662. message.open = object.open ?? false;
  8663. return message;
  8664. },
  8665. };
  8666. function createBasebuildingAutoExploreOptionRsp(): buildingAutoExploreOptionRsp {
  8667. return { errno: 0, data: undefined };
  8668. }
  8669. export const buildingAutoExploreOptionRsp = {
  8670. fromJSON(object: any): buildingAutoExploreOptionRsp {
  8671. return {
  8672. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8673. data: isSet(object.data) ? building.fromJSON(object.data) : undefined,
  8674. };
  8675. },
  8676. toJSON(message: buildingAutoExploreOptionRsp): unknown {
  8677. const obj: any = {};
  8678. if (message.errno !== 0) {
  8679. obj.errno = Math.round(message.errno);
  8680. }
  8681. if (message.data !== undefined) {
  8682. obj.data = building.toJSON(message.data);
  8683. }
  8684. return obj;
  8685. },
  8686. create<I extends Exact<DeepPartial<buildingAutoExploreOptionRsp>, I>>(base?: I): buildingAutoExploreOptionRsp {
  8687. return buildingAutoExploreOptionRsp.fromPartial(base ?? ({} as any));
  8688. },
  8689. fromPartial<I extends Exact<DeepPartial<buildingAutoExploreOptionRsp>, I>>(object: I): buildingAutoExploreOptionRsp {
  8690. const message = createBasebuildingAutoExploreOptionRsp();
  8691. message.errno = object.errno ?? 0;
  8692. message.data = (object.data !== undefined && object.data !== null) ? building.fromPartial(object.data) : undefined;
  8693. return message;
  8694. },
  8695. };
  8696. function createBaselevelGiftData(): levelGiftData {
  8697. return {};
  8698. }
  8699. export const levelGiftData = {
  8700. fromJSON(_: any): levelGiftData {
  8701. return {};
  8702. },
  8703. toJSON(_: levelGiftData): unknown {
  8704. const obj: any = {};
  8705. return obj;
  8706. },
  8707. create<I extends Exact<DeepPartial<levelGiftData>, I>>(base?: I): levelGiftData {
  8708. return levelGiftData.fromPartial(base ?? ({} as any));
  8709. },
  8710. fromPartial<I extends Exact<DeepPartial<levelGiftData>, I>>(_: I): levelGiftData {
  8711. const message = createBaselevelGiftData();
  8712. return message;
  8713. },
  8714. };
  8715. function createBaselevelGiftDataRsp(): levelGiftDataRsp {
  8716. return { errno: 0 };
  8717. }
  8718. export const levelGiftDataRsp = {
  8719. fromJSON(object: any): levelGiftDataRsp {
  8720. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  8721. },
  8722. toJSON(message: levelGiftDataRsp): unknown {
  8723. const obj: any = {};
  8724. if (message.errno !== 0) {
  8725. obj.errno = Math.round(message.errno);
  8726. }
  8727. return obj;
  8728. },
  8729. create<I extends Exact<DeepPartial<levelGiftDataRsp>, I>>(base?: I): levelGiftDataRsp {
  8730. return levelGiftDataRsp.fromPartial(base ?? ({} as any));
  8731. },
  8732. fromPartial<I extends Exact<DeepPartial<levelGiftDataRsp>, I>>(object: I): levelGiftDataRsp {
  8733. const message = createBaselevelGiftDataRsp();
  8734. message.errno = object.errno ?? 0;
  8735. return message;
  8736. },
  8737. };
  8738. function createBaselevelGiftBuy(): levelGiftBuy {
  8739. return { id: 0 };
  8740. }
  8741. export const levelGiftBuy = {
  8742. fromJSON(object: any): levelGiftBuy {
  8743. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  8744. },
  8745. toJSON(message: levelGiftBuy): unknown {
  8746. const obj: any = {};
  8747. if (message.id !== 0) {
  8748. obj.id = Math.round(message.id);
  8749. }
  8750. return obj;
  8751. },
  8752. create<I extends Exact<DeepPartial<levelGiftBuy>, I>>(base?: I): levelGiftBuy {
  8753. return levelGiftBuy.fromPartial(base ?? ({} as any));
  8754. },
  8755. fromPartial<I extends Exact<DeepPartial<levelGiftBuy>, I>>(object: I): levelGiftBuy {
  8756. const message = createBaselevelGiftBuy();
  8757. message.id = object.id ?? 0;
  8758. return message;
  8759. },
  8760. };
  8761. function createBaselevelGiftBuyRsp(): levelGiftBuyRsp {
  8762. return { errno: 0 };
  8763. }
  8764. export const levelGiftBuyRsp = {
  8765. fromJSON(object: any): levelGiftBuyRsp {
  8766. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  8767. },
  8768. toJSON(message: levelGiftBuyRsp): unknown {
  8769. const obj: any = {};
  8770. if (message.errno !== 0) {
  8771. obj.errno = Math.round(message.errno);
  8772. }
  8773. return obj;
  8774. },
  8775. create<I extends Exact<DeepPartial<levelGiftBuyRsp>, I>>(base?: I): levelGiftBuyRsp {
  8776. return levelGiftBuyRsp.fromPartial(base ?? ({} as any));
  8777. },
  8778. fromPartial<I extends Exact<DeepPartial<levelGiftBuyRsp>, I>>(object: I): levelGiftBuyRsp {
  8779. const message = createBaselevelGiftBuyRsp();
  8780. message.errno = object.errno ?? 0;
  8781. return message;
  8782. },
  8783. };
  8784. function createBaselevelGiftNty(): levelGiftNty {
  8785. return { list: [] };
  8786. }
  8787. export const levelGiftNty = {
  8788. fromJSON(object: any): levelGiftNty {
  8789. return { list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => idNum.fromJSON(e)) : [] };
  8790. },
  8791. toJSON(message: levelGiftNty): unknown {
  8792. const obj: any = {};
  8793. if (message.list?.length) {
  8794. obj.list = message.list.map((e) => idNum.toJSON(e));
  8795. }
  8796. return obj;
  8797. },
  8798. create<I extends Exact<DeepPartial<levelGiftNty>, I>>(base?: I): levelGiftNty {
  8799. return levelGiftNty.fromPartial(base ?? ({} as any));
  8800. },
  8801. fromPartial<I extends Exact<DeepPartial<levelGiftNty>, I>>(object: I): levelGiftNty {
  8802. const message = createBaselevelGiftNty();
  8803. message.list = object.list?.map((e) => idNum.fromPartial(e)) || [];
  8804. return message;
  8805. },
  8806. };
  8807. function createBaselevelGiftDelRedPoint(): levelGiftDelRedPoint {
  8808. return {};
  8809. }
  8810. export const levelGiftDelRedPoint = {
  8811. fromJSON(_: any): levelGiftDelRedPoint {
  8812. return {};
  8813. },
  8814. toJSON(_: levelGiftDelRedPoint): unknown {
  8815. const obj: any = {};
  8816. return obj;
  8817. },
  8818. create<I extends Exact<DeepPartial<levelGiftDelRedPoint>, I>>(base?: I): levelGiftDelRedPoint {
  8819. return levelGiftDelRedPoint.fromPartial(base ?? ({} as any));
  8820. },
  8821. fromPartial<I extends Exact<DeepPartial<levelGiftDelRedPoint>, I>>(_: I): levelGiftDelRedPoint {
  8822. const message = createBaselevelGiftDelRedPoint();
  8823. return message;
  8824. },
  8825. };
  8826. function createBaselevelGiftDelRedPointRsp(): levelGiftDelRedPointRsp {
  8827. return { errno: 0 };
  8828. }
  8829. export const levelGiftDelRedPointRsp = {
  8830. fromJSON(object: any): levelGiftDelRedPointRsp {
  8831. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  8832. },
  8833. toJSON(message: levelGiftDelRedPointRsp): unknown {
  8834. const obj: any = {};
  8835. if (message.errno !== 0) {
  8836. obj.errno = Math.round(message.errno);
  8837. }
  8838. return obj;
  8839. },
  8840. create<I extends Exact<DeepPartial<levelGiftDelRedPointRsp>, I>>(base?: I): levelGiftDelRedPointRsp {
  8841. return levelGiftDelRedPointRsp.fromPartial(base ?? ({} as any));
  8842. },
  8843. fromPartial<I extends Exact<DeepPartial<levelGiftDelRedPointRsp>, I>>(object: I): levelGiftDelRedPointRsp {
  8844. const message = createBaselevelGiftDelRedPointRsp();
  8845. message.errno = object.errno ?? 0;
  8846. return message;
  8847. },
  8848. };
  8849. function createBaselotteryData(): lotteryData {
  8850. return {};
  8851. }
  8852. export const lotteryData = {
  8853. fromJSON(_: any): lotteryData {
  8854. return {};
  8855. },
  8856. toJSON(_: lotteryData): unknown {
  8857. const obj: any = {};
  8858. return obj;
  8859. },
  8860. create<I extends Exact<DeepPartial<lotteryData>, I>>(base?: I): lotteryData {
  8861. return lotteryData.fromPartial(base ?? ({} as any));
  8862. },
  8863. fromPartial<I extends Exact<DeepPartial<lotteryData>, I>>(_: I): lotteryData {
  8864. const message = createBaselotteryData();
  8865. return message;
  8866. },
  8867. };
  8868. function createBaselotteryDataRsp(): lotteryDataRsp {
  8869. return { errno: 0 };
  8870. }
  8871. export const lotteryDataRsp = {
  8872. fromJSON(object: any): lotteryDataRsp {
  8873. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  8874. },
  8875. toJSON(message: lotteryDataRsp): unknown {
  8876. const obj: any = {};
  8877. if (message.errno !== 0) {
  8878. obj.errno = Math.round(message.errno);
  8879. }
  8880. return obj;
  8881. },
  8882. create<I extends Exact<DeepPartial<lotteryDataRsp>, I>>(base?: I): lotteryDataRsp {
  8883. return lotteryDataRsp.fromPartial(base ?? ({} as any));
  8884. },
  8885. fromPartial<I extends Exact<DeepPartial<lotteryDataRsp>, I>>(object: I): lotteryDataRsp {
  8886. const message = createBaselotteryDataRsp();
  8887. message.errno = object.errno ?? 0;
  8888. return message;
  8889. },
  8890. };
  8891. function createBaselotteryAward(): lotteryAward {
  8892. return { free: false };
  8893. }
  8894. export const lotteryAward = {
  8895. fromJSON(object: any): lotteryAward {
  8896. return { free: isSet(object.free) ? globalThis.Boolean(object.free) : false };
  8897. },
  8898. toJSON(message: lotteryAward): unknown {
  8899. const obj: any = {};
  8900. if (message.free !== false) {
  8901. obj.free = message.free;
  8902. }
  8903. return obj;
  8904. },
  8905. create<I extends Exact<DeepPartial<lotteryAward>, I>>(base?: I): lotteryAward {
  8906. return lotteryAward.fromPartial(base ?? ({} as any));
  8907. },
  8908. fromPartial<I extends Exact<DeepPartial<lotteryAward>, I>>(object: I): lotteryAward {
  8909. const message = createBaselotteryAward();
  8910. message.free = object.free ?? false;
  8911. return message;
  8912. },
  8913. };
  8914. function createBaselotteryAwardRsp(): lotteryAwardRsp {
  8915. return { errno: 0, free: false, award: 0 };
  8916. }
  8917. export const lotteryAwardRsp = {
  8918. fromJSON(object: any): lotteryAwardRsp {
  8919. return {
  8920. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  8921. free: isSet(object.free) ? globalThis.Boolean(object.free) : false,
  8922. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  8923. };
  8924. },
  8925. toJSON(message: lotteryAwardRsp): unknown {
  8926. const obj: any = {};
  8927. if (message.errno !== 0) {
  8928. obj.errno = Math.round(message.errno);
  8929. }
  8930. if (message.free !== false) {
  8931. obj.free = message.free;
  8932. }
  8933. if (message.award !== 0) {
  8934. obj.award = Math.round(message.award);
  8935. }
  8936. return obj;
  8937. },
  8938. create<I extends Exact<DeepPartial<lotteryAwardRsp>, I>>(base?: I): lotteryAwardRsp {
  8939. return lotteryAwardRsp.fromPartial(base ?? ({} as any));
  8940. },
  8941. fromPartial<I extends Exact<DeepPartial<lotteryAwardRsp>, I>>(object: I): lotteryAwardRsp {
  8942. const message = createBaselotteryAwardRsp();
  8943. message.errno = object.errno ?? 0;
  8944. message.free = object.free ?? false;
  8945. message.award = object.award ?? 0;
  8946. return message;
  8947. },
  8948. };
  8949. function createBaselotteryBuy(): lotteryBuy {
  8950. return {};
  8951. }
  8952. export const lotteryBuy = {
  8953. fromJSON(_: any): lotteryBuy {
  8954. return {};
  8955. },
  8956. toJSON(_: lotteryBuy): unknown {
  8957. const obj: any = {};
  8958. return obj;
  8959. },
  8960. create<I extends Exact<DeepPartial<lotteryBuy>, I>>(base?: I): lotteryBuy {
  8961. return lotteryBuy.fromPartial(base ?? ({} as any));
  8962. },
  8963. fromPartial<I extends Exact<DeepPartial<lotteryBuy>, I>>(_: I): lotteryBuy {
  8964. const message = createBaselotteryBuy();
  8965. return message;
  8966. },
  8967. };
  8968. function createBaselotteryBuyRsp(): lotteryBuyRsp {
  8969. return { errno: 0 };
  8970. }
  8971. export const lotteryBuyRsp = {
  8972. fromJSON(object: any): lotteryBuyRsp {
  8973. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  8974. },
  8975. toJSON(message: lotteryBuyRsp): unknown {
  8976. const obj: any = {};
  8977. if (message.errno !== 0) {
  8978. obj.errno = Math.round(message.errno);
  8979. }
  8980. return obj;
  8981. },
  8982. create<I extends Exact<DeepPartial<lotteryBuyRsp>, I>>(base?: I): lotteryBuyRsp {
  8983. return lotteryBuyRsp.fromPartial(base ?? ({} as any));
  8984. },
  8985. fromPartial<I extends Exact<DeepPartial<lotteryBuyRsp>, I>>(object: I): lotteryBuyRsp {
  8986. const message = createBaselotteryBuyRsp();
  8987. message.errno = object.errno ?? 0;
  8988. return message;
  8989. },
  8990. };
  8991. function createBaselotteryNty(): lotteryNty {
  8992. return { state: 0, free: 0, award: 0, day: 0 };
  8993. }
  8994. export const lotteryNty = {
  8995. fromJSON(object: any): lotteryNty {
  8996. return {
  8997. state: isSet(object.state) ? globalThis.Number(object.state) : 0,
  8998. free: isSet(object.free) ? globalThis.Number(object.free) : 0,
  8999. award: isSet(object.award) ? globalThis.Number(object.award) : 0,
  9000. day: isSet(object.day) ? globalThis.Number(object.day) : 0,
  9001. };
  9002. },
  9003. toJSON(message: lotteryNty): unknown {
  9004. const obj: any = {};
  9005. if (message.state !== 0) {
  9006. obj.state = Math.round(message.state);
  9007. }
  9008. if (message.free !== 0) {
  9009. obj.free = Math.round(message.free);
  9010. }
  9011. if (message.award !== 0) {
  9012. obj.award = Math.round(message.award);
  9013. }
  9014. if (message.day !== 0) {
  9015. obj.day = Math.round(message.day);
  9016. }
  9017. return obj;
  9018. },
  9019. create<I extends Exact<DeepPartial<lotteryNty>, I>>(base?: I): lotteryNty {
  9020. return lotteryNty.fromPartial(base ?? ({} as any));
  9021. },
  9022. fromPartial<I extends Exact<DeepPartial<lotteryNty>, I>>(object: I): lotteryNty {
  9023. const message = createBaselotteryNty();
  9024. message.state = object.state ?? 0;
  9025. message.free = object.free ?? 0;
  9026. message.award = object.award ?? 0;
  9027. message.day = object.day ?? 0;
  9028. return message;
  9029. },
  9030. };
  9031. function createBaseactRankData(): actRankData {
  9032. return { id: 0 };
  9033. }
  9034. export const actRankData = {
  9035. fromJSON(object: any): actRankData {
  9036. return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
  9037. },
  9038. toJSON(message: actRankData): unknown {
  9039. const obj: any = {};
  9040. if (message.id !== 0) {
  9041. obj.id = Math.round(message.id);
  9042. }
  9043. return obj;
  9044. },
  9045. create<I extends Exact<DeepPartial<actRankData>, I>>(base?: I): actRankData {
  9046. return actRankData.fromPartial(base ?? ({} as any));
  9047. },
  9048. fromPartial<I extends Exact<DeepPartial<actRankData>, I>>(object: I): actRankData {
  9049. const message = createBaseactRankData();
  9050. message.id = object.id ?? 0;
  9051. return message;
  9052. },
  9053. };
  9054. function createBaseactRankDataRsp(): actRankDataRsp {
  9055. return { errno: 0, list: [] };
  9056. }
  9057. export const actRankDataRsp = {
  9058. fromJSON(object: any): actRankDataRsp {
  9059. return {
  9060. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9061. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => rankingInfo.fromJSON(e)) : [],
  9062. };
  9063. },
  9064. toJSON(message: actRankDataRsp): unknown {
  9065. const obj: any = {};
  9066. if (message.errno !== 0) {
  9067. obj.errno = Math.round(message.errno);
  9068. }
  9069. if (message.list?.length) {
  9070. obj.list = message.list.map((e) => rankingInfo.toJSON(e));
  9071. }
  9072. return obj;
  9073. },
  9074. create<I extends Exact<DeepPartial<actRankDataRsp>, I>>(base?: I): actRankDataRsp {
  9075. return actRankDataRsp.fromPartial(base ?? ({} as any));
  9076. },
  9077. fromPartial<I extends Exact<DeepPartial<actRankDataRsp>, I>>(object: I): actRankDataRsp {
  9078. const message = createBaseactRankDataRsp();
  9079. message.errno = object.errno ?? 0;
  9080. message.list = object.list?.map((e) => rankingInfo.fromPartial(e)) || [];
  9081. return message;
  9082. },
  9083. };
  9084. function createBasetreasureGetData(): treasureGetData {
  9085. return {};
  9086. }
  9087. export const treasureGetData = {
  9088. fromJSON(_: any): treasureGetData {
  9089. return {};
  9090. },
  9091. toJSON(_: treasureGetData): unknown {
  9092. const obj: any = {};
  9093. return obj;
  9094. },
  9095. create<I extends Exact<DeepPartial<treasureGetData>, I>>(base?: I): treasureGetData {
  9096. return treasureGetData.fromPartial(base ?? ({} as any));
  9097. },
  9098. fromPartial<I extends Exact<DeepPartial<treasureGetData>, I>>(_: I): treasureGetData {
  9099. const message = createBasetreasureGetData();
  9100. return message;
  9101. },
  9102. };
  9103. function createBasetreasureGetDataRsp(): treasureGetDataRsp {
  9104. return { errno: 0, buy: 0, sign: 0, list: [], treasure: false };
  9105. }
  9106. export const treasureGetDataRsp = {
  9107. fromJSON(object: any): treasureGetDataRsp {
  9108. return {
  9109. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9110. buy: isSet(object.buy) ? globalThis.Number(object.buy) : 0,
  9111. sign: isSet(object.sign) ? globalThis.Number(object.sign) : 0,
  9112. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => globalThis.Number(e)) : [],
  9113. treasure: isSet(object.treasure) ? globalThis.Boolean(object.treasure) : false,
  9114. };
  9115. },
  9116. toJSON(message: treasureGetDataRsp): unknown {
  9117. const obj: any = {};
  9118. if (message.errno !== 0) {
  9119. obj.errno = Math.round(message.errno);
  9120. }
  9121. if (message.buy !== 0) {
  9122. obj.buy = Math.round(message.buy);
  9123. }
  9124. if (message.sign !== 0) {
  9125. obj.sign = Math.round(message.sign);
  9126. }
  9127. if (message.list?.length) {
  9128. obj.list = message.list.map((e) => Math.round(e));
  9129. }
  9130. if (message.treasure !== false) {
  9131. obj.treasure = message.treasure;
  9132. }
  9133. return obj;
  9134. },
  9135. create<I extends Exact<DeepPartial<treasureGetDataRsp>, I>>(base?: I): treasureGetDataRsp {
  9136. return treasureGetDataRsp.fromPartial(base ?? ({} as any));
  9137. },
  9138. fromPartial<I extends Exact<DeepPartial<treasureGetDataRsp>, I>>(object: I): treasureGetDataRsp {
  9139. const message = createBasetreasureGetDataRsp();
  9140. message.errno = object.errno ?? 0;
  9141. message.buy = object.buy ?? 0;
  9142. message.sign = object.sign ?? 0;
  9143. message.list = object.list?.map((e) => e) || [];
  9144. message.treasure = object.treasure ?? false;
  9145. return message;
  9146. },
  9147. };
  9148. function createBasetreasureDraw(): treasureDraw {
  9149. return {};
  9150. }
  9151. export const treasureDraw = {
  9152. fromJSON(_: any): treasureDraw {
  9153. return {};
  9154. },
  9155. toJSON(_: treasureDraw): unknown {
  9156. const obj: any = {};
  9157. return obj;
  9158. },
  9159. create<I extends Exact<DeepPartial<treasureDraw>, I>>(base?: I): treasureDraw {
  9160. return treasureDraw.fromPartial(base ?? ({} as any));
  9161. },
  9162. fromPartial<I extends Exact<DeepPartial<treasureDraw>, I>>(_: I): treasureDraw {
  9163. const message = createBasetreasureDraw();
  9164. return message;
  9165. },
  9166. };
  9167. function createBasetreasureDrawRsp(): treasureDrawRsp {
  9168. return { errno: 0, pos: 0 };
  9169. }
  9170. export const treasureDrawRsp = {
  9171. fromJSON(object: any): treasureDrawRsp {
  9172. return {
  9173. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9174. pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0,
  9175. };
  9176. },
  9177. toJSON(message: treasureDrawRsp): unknown {
  9178. const obj: any = {};
  9179. if (message.errno !== 0) {
  9180. obj.errno = Math.round(message.errno);
  9181. }
  9182. if (message.pos !== 0) {
  9183. obj.pos = Math.round(message.pos);
  9184. }
  9185. return obj;
  9186. },
  9187. create<I extends Exact<DeepPartial<treasureDrawRsp>, I>>(base?: I): treasureDrawRsp {
  9188. return treasureDrawRsp.fromPartial(base ?? ({} as any));
  9189. },
  9190. fromPartial<I extends Exact<DeepPartial<treasureDrawRsp>, I>>(object: I): treasureDrawRsp {
  9191. const message = createBasetreasureDrawRsp();
  9192. message.errno = object.errno ?? 0;
  9193. message.pos = object.pos ?? 0;
  9194. return message;
  9195. },
  9196. };
  9197. function createBasetreasureSign(): treasureSign {
  9198. return {};
  9199. }
  9200. export const treasureSign = {
  9201. fromJSON(_: any): treasureSign {
  9202. return {};
  9203. },
  9204. toJSON(_: treasureSign): unknown {
  9205. const obj: any = {};
  9206. return obj;
  9207. },
  9208. create<I extends Exact<DeepPartial<treasureSign>, I>>(base?: I): treasureSign {
  9209. return treasureSign.fromPartial(base ?? ({} as any));
  9210. },
  9211. fromPartial<I extends Exact<DeepPartial<treasureSign>, I>>(_: I): treasureSign {
  9212. const message = createBasetreasureSign();
  9213. return message;
  9214. },
  9215. };
  9216. function createBasetreasureSignRsp(): treasureSignRsp {
  9217. return { errno: 0, sign: 0 };
  9218. }
  9219. export const treasureSignRsp = {
  9220. fromJSON(object: any): treasureSignRsp {
  9221. return {
  9222. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9223. sign: isSet(object.sign) ? globalThis.Number(object.sign) : 0,
  9224. };
  9225. },
  9226. toJSON(message: treasureSignRsp): unknown {
  9227. const obj: any = {};
  9228. if (message.errno !== 0) {
  9229. obj.errno = Math.round(message.errno);
  9230. }
  9231. if (message.sign !== 0) {
  9232. obj.sign = Math.round(message.sign);
  9233. }
  9234. return obj;
  9235. },
  9236. create<I extends Exact<DeepPartial<treasureSignRsp>, I>>(base?: I): treasureSignRsp {
  9237. return treasureSignRsp.fromPartial(base ?? ({} as any));
  9238. },
  9239. fromPartial<I extends Exact<DeepPartial<treasureSignRsp>, I>>(object: I): treasureSignRsp {
  9240. const message = createBasetreasureSignRsp();
  9241. message.errno = object.errno ?? 0;
  9242. message.sign = object.sign ?? 0;
  9243. return message;
  9244. },
  9245. };
  9246. function createBasetreasureBuy(): treasureBuy {
  9247. return {};
  9248. }
  9249. export const treasureBuy = {
  9250. fromJSON(_: any): treasureBuy {
  9251. return {};
  9252. },
  9253. toJSON(_: treasureBuy): unknown {
  9254. const obj: any = {};
  9255. return obj;
  9256. },
  9257. create<I extends Exact<DeepPartial<treasureBuy>, I>>(base?: I): treasureBuy {
  9258. return treasureBuy.fromPartial(base ?? ({} as any));
  9259. },
  9260. fromPartial<I extends Exact<DeepPartial<treasureBuy>, I>>(_: I): treasureBuy {
  9261. const message = createBasetreasureBuy();
  9262. return message;
  9263. },
  9264. };
  9265. function createBasetreasureBuyRsp(): treasureBuyRsp {
  9266. return { errno: 0, buy: 0 };
  9267. }
  9268. export const treasureBuyRsp = {
  9269. fromJSON(object: any): treasureBuyRsp {
  9270. return {
  9271. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9272. buy: isSet(object.buy) ? globalThis.Number(object.buy) : 0,
  9273. };
  9274. },
  9275. toJSON(message: treasureBuyRsp): unknown {
  9276. const obj: any = {};
  9277. if (message.errno !== 0) {
  9278. obj.errno = Math.round(message.errno);
  9279. }
  9280. if (message.buy !== 0) {
  9281. obj.buy = Math.round(message.buy);
  9282. }
  9283. return obj;
  9284. },
  9285. create<I extends Exact<DeepPartial<treasureBuyRsp>, I>>(base?: I): treasureBuyRsp {
  9286. return treasureBuyRsp.fromPartial(base ?? ({} as any));
  9287. },
  9288. fromPartial<I extends Exact<DeepPartial<treasureBuyRsp>, I>>(object: I): treasureBuyRsp {
  9289. const message = createBasetreasureBuyRsp();
  9290. message.errno = object.errno ?? 0;
  9291. message.buy = object.buy ?? 0;
  9292. return message;
  9293. },
  9294. };
  9295. function createBasepvpData(): pvpData {
  9296. return {};
  9297. }
  9298. export const pvpData = {
  9299. fromJSON(_: any): pvpData {
  9300. return {};
  9301. },
  9302. toJSON(_: pvpData): unknown {
  9303. const obj: any = {};
  9304. return obj;
  9305. },
  9306. create<I extends Exact<DeepPartial<pvpData>, I>>(base?: I): pvpData {
  9307. return pvpData.fromPartial(base ?? ({} as any));
  9308. },
  9309. fromPartial<I extends Exact<DeepPartial<pvpData>, I>>(_: I): pvpData {
  9310. const message = createBasepvpData();
  9311. return message;
  9312. },
  9313. };
  9314. function createBasepvpDataRsp(): pvpDataRsp {
  9315. return { errno: 0, embattleList: [], rankingList: [] };
  9316. }
  9317. export const pvpDataRsp = {
  9318. fromJSON(object: any): pvpDataRsp {
  9319. return {
  9320. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9321. embattleList: globalThis.Array.isArray(object?.embattleList)
  9322. ? object.embattleList.map((e: any) => embattleInfo.fromJSON(e))
  9323. : [],
  9324. rankingList: globalThis.Array.isArray(object?.rankingList)
  9325. ? object.rankingList.map((e: any) => rankingInfo.fromJSON(e))
  9326. : [],
  9327. };
  9328. },
  9329. toJSON(message: pvpDataRsp): unknown {
  9330. const obj: any = {};
  9331. if (message.errno !== 0) {
  9332. obj.errno = Math.round(message.errno);
  9333. }
  9334. if (message.embattleList?.length) {
  9335. obj.embattleList = message.embattleList.map((e) => embattleInfo.toJSON(e));
  9336. }
  9337. if (message.rankingList?.length) {
  9338. obj.rankingList = message.rankingList.map((e) => rankingInfo.toJSON(e));
  9339. }
  9340. return obj;
  9341. },
  9342. create<I extends Exact<DeepPartial<pvpDataRsp>, I>>(base?: I): pvpDataRsp {
  9343. return pvpDataRsp.fromPartial(base ?? ({} as any));
  9344. },
  9345. fromPartial<I extends Exact<DeepPartial<pvpDataRsp>, I>>(object: I): pvpDataRsp {
  9346. const message = createBasepvpDataRsp();
  9347. message.errno = object.errno ?? 0;
  9348. message.embattleList = object.embattleList?.map((e) => embattleInfo.fromPartial(e)) || [];
  9349. message.rankingList = object.rankingList?.map((e) => rankingInfo.fromPartial(e)) || [];
  9350. return message;
  9351. },
  9352. };
  9353. function createBasepvpMatch(): pvpMatch {
  9354. return {};
  9355. }
  9356. export const pvpMatch = {
  9357. fromJSON(_: any): pvpMatch {
  9358. return {};
  9359. },
  9360. toJSON(_: pvpMatch): unknown {
  9361. const obj: any = {};
  9362. return obj;
  9363. },
  9364. create<I extends Exact<DeepPartial<pvpMatch>, I>>(base?: I): pvpMatch {
  9365. return pvpMatch.fromPartial(base ?? ({} as any));
  9366. },
  9367. fromPartial<I extends Exact<DeepPartial<pvpMatch>, I>>(_: I): pvpMatch {
  9368. const message = createBasepvpMatch();
  9369. return message;
  9370. },
  9371. };
  9372. function createBasepvpMatchRsp(): pvpMatchRsp {
  9373. return { errno: 0, embattleList: [], heroList: [], cardList: [], equipList: [], talentData: undefined };
  9374. }
  9375. export const pvpMatchRsp = {
  9376. fromJSON(object: any): pvpMatchRsp {
  9377. return {
  9378. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9379. embattleList: globalThis.Array.isArray(object?.embattleList)
  9380. ? object.embattleList.map((e: any) => embattleInfo.fromJSON(e))
  9381. : [],
  9382. heroList: globalThis.Array.isArray(object?.heroList)
  9383. ? object.heroList.map((e: any) => hero.fromJSON(e))
  9384. : [],
  9385. cardList: globalThis.Array.isArray(object?.cardList) ? object.cardList.map((e: any) => card.fromJSON(e)) : [],
  9386. equipList: globalThis.Array.isArray(object?.equipList) ? object.equipList.map((e: any) => equip.fromJSON(e)) : [],
  9387. talentData: isSet(object.talentData) ? talentInfo.fromJSON(object.talentData) : undefined,
  9388. };
  9389. },
  9390. toJSON(message: pvpMatchRsp): unknown {
  9391. const obj: any = {};
  9392. if (message.errno !== 0) {
  9393. obj.errno = Math.round(message.errno);
  9394. }
  9395. if (message.embattleList?.length) {
  9396. obj.embattleList = message.embattleList.map((e) => embattleInfo.toJSON(e));
  9397. }
  9398. if (message.heroList?.length) {
  9399. obj.heroList = message.heroList.map((e) => hero.toJSON(e));
  9400. }
  9401. if (message.cardList?.length) {
  9402. obj.cardList = message.cardList.map((e) => card.toJSON(e));
  9403. }
  9404. if (message.equipList?.length) {
  9405. obj.equipList = message.equipList.map((e) => equip.toJSON(e));
  9406. }
  9407. if (message.talentData !== undefined) {
  9408. obj.talentData = talentInfo.toJSON(message.talentData);
  9409. }
  9410. return obj;
  9411. },
  9412. create<I extends Exact<DeepPartial<pvpMatchRsp>, I>>(base?: I): pvpMatchRsp {
  9413. return pvpMatchRsp.fromPartial(base ?? ({} as any));
  9414. },
  9415. fromPartial<I extends Exact<DeepPartial<pvpMatchRsp>, I>>(object: I): pvpMatchRsp {
  9416. const message = createBasepvpMatchRsp();
  9417. message.errno = object.errno ?? 0;
  9418. message.embattleList = object.embattleList?.map((e) => embattleInfo.fromPartial(e)) || [];
  9419. message.heroList = object.heroList?.map((e) => hero.fromPartial(e)) || [];
  9420. message.cardList = object.cardList?.map((e) => card.fromPartial(e)) || [];
  9421. message.equipList = object.equipList?.map((e) => equip.fromPartial(e)) || [];
  9422. message.talentData = (object.talentData !== undefined && object.talentData !== null)
  9423. ? talentInfo.fromPartial(object.talentData)
  9424. : undefined;
  9425. return message;
  9426. },
  9427. };
  9428. function createBasepvpReslut(): pvpReslut {
  9429. return { win: 0 };
  9430. }
  9431. export const pvpReslut = {
  9432. fromJSON(object: any): pvpReslut {
  9433. return { win: isSet(object.win) ? globalThis.Number(object.win) : 0 };
  9434. },
  9435. toJSON(message: pvpReslut): unknown {
  9436. const obj: any = {};
  9437. if (message.win !== 0) {
  9438. obj.win = Math.round(message.win);
  9439. }
  9440. return obj;
  9441. },
  9442. create<I extends Exact<DeepPartial<pvpReslut>, I>>(base?: I): pvpReslut {
  9443. return pvpReslut.fromPartial(base ?? ({} as any));
  9444. },
  9445. fromPartial<I extends Exact<DeepPartial<pvpReslut>, I>>(object: I): pvpReslut {
  9446. const message = createBasepvpReslut();
  9447. message.win = object.win ?? 0;
  9448. return message;
  9449. },
  9450. };
  9451. function createBasepvpReslutRsp(): pvpReslutRsp {
  9452. return { errno: 0 };
  9453. }
  9454. export const pvpReslutRsp = {
  9455. fromJSON(object: any): pvpReslutRsp {
  9456. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  9457. },
  9458. toJSON(message: pvpReslutRsp): unknown {
  9459. const obj: any = {};
  9460. if (message.errno !== 0) {
  9461. obj.errno = Math.round(message.errno);
  9462. }
  9463. return obj;
  9464. },
  9465. create<I extends Exact<DeepPartial<pvpReslutRsp>, I>>(base?: I): pvpReslutRsp {
  9466. return pvpReslutRsp.fromPartial(base ?? ({} as any));
  9467. },
  9468. fromPartial<I extends Exact<DeepPartial<pvpReslutRsp>, I>>(object: I): pvpReslutRsp {
  9469. const message = createBasepvpReslutRsp();
  9470. message.errno = object.errno ?? 0;
  9471. return message;
  9472. },
  9473. };
  9474. function createBasepvpEmbattle(): pvpEmbattle {
  9475. return { data: undefined };
  9476. }
  9477. export const pvpEmbattle = {
  9478. fromJSON(object: any): pvpEmbattle {
  9479. return { data: isSet(object.data) ? embattleInfo.fromJSON(object.data) : undefined };
  9480. },
  9481. toJSON(message: pvpEmbattle): unknown {
  9482. const obj: any = {};
  9483. if (message.data !== undefined) {
  9484. obj.data = embattleInfo.toJSON(message.data);
  9485. }
  9486. return obj;
  9487. },
  9488. create<I extends Exact<DeepPartial<pvpEmbattle>, I>>(base?: I): pvpEmbattle {
  9489. return pvpEmbattle.fromPartial(base ?? ({} as any));
  9490. },
  9491. fromPartial<I extends Exact<DeepPartial<pvpEmbattle>, I>>(object: I): pvpEmbattle {
  9492. const message = createBasepvpEmbattle();
  9493. message.data = (object.data !== undefined && object.data !== null)
  9494. ? embattleInfo.fromPartial(object.data)
  9495. : undefined;
  9496. return message;
  9497. },
  9498. };
  9499. function createBasepvpEmbattleRsp(): pvpEmbattleRsp {
  9500. return { errno: 0 };
  9501. }
  9502. export const pvpEmbattleRsp = {
  9503. fromJSON(object: any): pvpEmbattleRsp {
  9504. return { errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0 };
  9505. },
  9506. toJSON(message: pvpEmbattleRsp): unknown {
  9507. const obj: any = {};
  9508. if (message.errno !== 0) {
  9509. obj.errno = Math.round(message.errno);
  9510. }
  9511. return obj;
  9512. },
  9513. create<I extends Exact<DeepPartial<pvpEmbattleRsp>, I>>(base?: I): pvpEmbattleRsp {
  9514. return pvpEmbattleRsp.fromPartial(base ?? ({} as any));
  9515. },
  9516. fromPartial<I extends Exact<DeepPartial<pvpEmbattleRsp>, I>>(object: I): pvpEmbattleRsp {
  9517. const message = createBasepvpEmbattleRsp();
  9518. message.errno = object.errno ?? 0;
  9519. return message;
  9520. },
  9521. };
  9522. function createBasetimeBoxData(): timeBoxData {
  9523. return {};
  9524. }
  9525. export const timeBoxData = {
  9526. fromJSON(_: any): timeBoxData {
  9527. return {};
  9528. },
  9529. toJSON(_: timeBoxData): unknown {
  9530. const obj: any = {};
  9531. return obj;
  9532. },
  9533. create<I extends Exact<DeepPartial<timeBoxData>, I>>(base?: I): timeBoxData {
  9534. return timeBoxData.fromPartial(base ?? ({} as any));
  9535. },
  9536. fromPartial<I extends Exact<DeepPartial<timeBoxData>, I>>(_: I): timeBoxData {
  9537. const message = createBasetimeBoxData();
  9538. return message;
  9539. },
  9540. };
  9541. function createBasetimeBoxDataRsp(): timeBoxDataRsp {
  9542. return { errno: 0, list: [] };
  9543. }
  9544. export const timeBoxDataRsp = {
  9545. fromJSON(object: any): timeBoxDataRsp {
  9546. return {
  9547. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9548. list: globalThis.Array.isArray(object?.list) ? object.list.map((e: any) => timeBox.fromJSON(e)) : [],
  9549. };
  9550. },
  9551. toJSON(message: timeBoxDataRsp): unknown {
  9552. const obj: any = {};
  9553. if (message.errno !== 0) {
  9554. obj.errno = Math.round(message.errno);
  9555. }
  9556. if (message.list?.length) {
  9557. obj.list = message.list.map((e) => timeBox.toJSON(e));
  9558. }
  9559. return obj;
  9560. },
  9561. create<I extends Exact<DeepPartial<timeBoxDataRsp>, I>>(base?: I): timeBoxDataRsp {
  9562. return timeBoxDataRsp.fromPartial(base ?? ({} as any));
  9563. },
  9564. fromPartial<I extends Exact<DeepPartial<timeBoxDataRsp>, I>>(object: I): timeBoxDataRsp {
  9565. const message = createBasetimeBoxDataRsp();
  9566. message.errno = object.errno ?? 0;
  9567. message.list = object.list?.map((e) => timeBox.fromPartial(e)) || [];
  9568. return message;
  9569. },
  9570. };
  9571. function createBasetimeBoxUnlock(): timeBoxUnlock {
  9572. return { pos: 0 };
  9573. }
  9574. export const timeBoxUnlock = {
  9575. fromJSON(object: any): timeBoxUnlock {
  9576. return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0 };
  9577. },
  9578. toJSON(message: timeBoxUnlock): unknown {
  9579. const obj: any = {};
  9580. if (message.pos !== 0) {
  9581. obj.pos = Math.round(message.pos);
  9582. }
  9583. return obj;
  9584. },
  9585. create<I extends Exact<DeepPartial<timeBoxUnlock>, I>>(base?: I): timeBoxUnlock {
  9586. return timeBoxUnlock.fromPartial(base ?? ({} as any));
  9587. },
  9588. fromPartial<I extends Exact<DeepPartial<timeBoxUnlock>, I>>(object: I): timeBoxUnlock {
  9589. const message = createBasetimeBoxUnlock();
  9590. message.pos = object.pos ?? 0;
  9591. return message;
  9592. },
  9593. };
  9594. function createBasetimeBoxUnlockRsp(): timeBoxUnlockRsp {
  9595. return { errno: 0, data: undefined };
  9596. }
  9597. export const timeBoxUnlockRsp = {
  9598. fromJSON(object: any): timeBoxUnlockRsp {
  9599. return {
  9600. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9601. data: isSet(object.data) ? timeBox.fromJSON(object.data) : undefined,
  9602. };
  9603. },
  9604. toJSON(message: timeBoxUnlockRsp): unknown {
  9605. const obj: any = {};
  9606. if (message.errno !== 0) {
  9607. obj.errno = Math.round(message.errno);
  9608. }
  9609. if (message.data !== undefined) {
  9610. obj.data = timeBox.toJSON(message.data);
  9611. }
  9612. return obj;
  9613. },
  9614. create<I extends Exact<DeepPartial<timeBoxUnlockRsp>, I>>(base?: I): timeBoxUnlockRsp {
  9615. return timeBoxUnlockRsp.fromPartial(base ?? ({} as any));
  9616. },
  9617. fromPartial<I extends Exact<DeepPartial<timeBoxUnlockRsp>, I>>(object: I): timeBoxUnlockRsp {
  9618. const message = createBasetimeBoxUnlockRsp();
  9619. message.errno = object.errno ?? 0;
  9620. message.data = (object.data !== undefined && object.data !== null) ? timeBox.fromPartial(object.data) : undefined;
  9621. return message;
  9622. },
  9623. };
  9624. function createBasetimeBoxGetAward(): timeBoxGetAward {
  9625. return { pos: 0 };
  9626. }
  9627. export const timeBoxGetAward = {
  9628. fromJSON(object: any): timeBoxGetAward {
  9629. return { pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0 };
  9630. },
  9631. toJSON(message: timeBoxGetAward): unknown {
  9632. const obj: any = {};
  9633. if (message.pos !== 0) {
  9634. obj.pos = Math.round(message.pos);
  9635. }
  9636. return obj;
  9637. },
  9638. create<I extends Exact<DeepPartial<timeBoxGetAward>, I>>(base?: I): timeBoxGetAward {
  9639. return timeBoxGetAward.fromPartial(base ?? ({} as any));
  9640. },
  9641. fromPartial<I extends Exact<DeepPartial<timeBoxGetAward>, I>>(object: I): timeBoxGetAward {
  9642. const message = createBasetimeBoxGetAward();
  9643. message.pos = object.pos ?? 0;
  9644. return message;
  9645. },
  9646. };
  9647. function createBasetimeBoxGetAwardRsp(): timeBoxGetAwardRsp {
  9648. return { errno: 0, pos: 0 };
  9649. }
  9650. export const timeBoxGetAwardRsp = {
  9651. fromJSON(object: any): timeBoxGetAwardRsp {
  9652. return {
  9653. errno: isSet(object.errno) ? globalThis.Number(object.errno) : 0,
  9654. pos: isSet(object.pos) ? globalThis.Number(object.pos) : 0,
  9655. };
  9656. },
  9657. toJSON(message: timeBoxGetAwardRsp): unknown {
  9658. const obj: any = {};
  9659. if (message.errno !== 0) {
  9660. obj.errno = Math.round(message.errno);
  9661. }
  9662. if (message.pos !== 0) {
  9663. obj.pos = Math.round(message.pos);
  9664. }
  9665. return obj;
  9666. },
  9667. create<I extends Exact<DeepPartial<timeBoxGetAwardRsp>, I>>(base?: I): timeBoxGetAwardRsp {
  9668. return timeBoxGetAwardRsp.fromPartial(base ?? ({} as any));
  9669. },
  9670. fromPartial<I extends Exact<DeepPartial<timeBoxGetAwardRsp>, I>>(object: I): timeBoxGetAwardRsp {
  9671. const message = createBasetimeBoxGetAwardRsp();
  9672. message.errno = object.errno ?? 0;
  9673. message.pos = object.pos ?? 0;
  9674. return message;
  9675. },
  9676. };
  9677. type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
  9678. export type DeepPartial<T> = T extends Builtin ? T
  9679. : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
  9680. : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
  9681. : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
  9682. : Partial<T>;
  9683. type KeysOfUnion<T> = T extends T ? keyof T : never;
  9684. export type Exact<P, I extends P> = P extends Builtin ? P
  9685. : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
  9686. function isSet(value: any): boolean {
  9687. return value !== null && value !== undefined;
  9688. }