import { Packet } from 'modloader64_api/ModLoaderDefaultImpls' ; import { AgeOrForm , } from 'Z64Lib/API/Common/Z64API' ; import { HorseData } from '../puppet/HorseData' ; import { INetworkPlayer } from 'modloader64_api/NetworkHandler' ; import { IKeyRing } from '@Z64Online/common/save/IKeyRing' ; import { Scene } from '../types/Types' ; import { IPuppetData } from '../puppet/IPuppetData' ; import { RemoteSoundPlayRequest } from '../api/Z64API' ; export class Z64O_PuppetPacket extends Packet { data : { bundle : Buffer ; } ; horse_data ! : HorseData ; constructor ( puppetData , lobby ) { super ( 'Z64O_PuppetPacket' , 'Z64Online' , lobby , false ) ; this . data = puppetData ; } setHorseData ( horse ) { this . horse_data = horse ; } } export class Z64O_ScenePacket extends Packet { scene : Scene ; age : AgeOrForm ; constructor ( lobby , scene , age ) { super ( 'Z64O_ScenePacket' , 'Z64Online' , lobby , true ) ; this . scene = scene ; this . age = age ; } } export class Z64O_SceneRequestPacket extends Packet { constructor ( lobby ) { super ( 'Z64O_SceneRequestPacket' , 'Z64Online' , lobby , true ) ; } } export class Z64O_BankSyncPacket extends Packet { savings : number ; constructor ( saving , lobby ) { super ( 'Z64O_BankSyncPacket' , 'Z64Online' , lobby , true ) ; this . savings = saving ; } } export class Z64O_DownloadResponsePacket extends Packet { save ? : Buffer ; keys ? : IKeyRing ; host : boolean ; constructor ( lobby , host ) { super ( 'Z64O_DownloadResponsePacket' , 'Z64Online' , lobby , false ) ; this . host = host ; } } export class Z64O_DownloadRequestPacket extends Packet { save : Buffer ; constructor ( lobby , save ) { super ( 'Z64O_DownloadRequestPacket' , 'Z64Online' , lobby , false ) ; this . save = save ; } } export class Z64O_UpdateSaveDataPacket extends Packet { save : Buffer ; modData : any = { } ; world : number ; constructor ( lobby , save , world ) { super ( 'Z64O_UpdateSaveDataPacket' , 'Z64Online' , lobby , false ) ; this . save = save ; this . world = world ; } } export class Z64O_UpdateKeyringPacket extends Packet { keys : IKeyRing ; world : number ; constructor ( keys , lobby , world ) { super ( 'Z64O_UpdateKeyringPacket' , 'Z64Online' , lobby , false ) ; this . keys = keys ; this . world = world ; } } export class Z64O_ClientSceneContextUpdate extends Packet { chests : Buffer ; switches : Buffer ; collect : Buffer ; clear : Buffer ; temp : Buffer ; scene : Scene ; world : number ; constructor ( chests , switches , collect , clear , temp , lobby , scene , world ) { super ( 'Z64O_ClientSceneContextUpdate' , 'Z64Online' , lobby , false ) ; this . chests = chests ; this . switches = switches ; this . collect = collect ; this . clear = clear ; this . temp = temp ; this . scene = scene ; this . world = world ; } } export class Z64O_ActorDeadPacket extends Packet { actorUUID : string ; scene : Scene ; room : number ; constructor ( aid , scene , room , lobby ) { super ( 'Z64O_ActorDeadPacket' , 'Z64Online' , lobby , true ) ; this . actorUUID = aid ; this . scene = scene ; this . room = room ; } } export class Z64O_BottleUpdatePacket extends Packet { slot : number ; contents : number ; constructor ( slot , contents , lobby ) { super ( 'Z64O_BottleUpdatePacket' , 'Z64Online' , lobby , true ) ; this . slot = slot ; this . contents = contents ; } } export class Z64_AllocateModelPacket extends Packet { age : AgeOrForm ; hash : string ; ageThePlayerActuallyIs : AgeOrForm ; constructor ( age , lobby , hash , actualAge ) { super ( 'Z64OnlineLib_AllocateModelPacket' , 'Z64OnlineLib' , lobby , true ) ; this . age = age ; this . hash = hash ; this . ageThePlayerActuallyIs = actualAge ; } } export class Z64_GiveModelPacket extends Packet { target : INetworkPlayer ; constructor ( lobby , player ) { super ( 'Z64OnlineLib_GiveModelPacket' , 'Z64OnlineLib' , lobby , true ) ; this . target = player ; } } export class Z64_EquipmentPakPacket extends Packet { ids : Array < string > = [ ] ; age : AgeOrForm ; constructor ( age , lobby ) { super ( 'Z64OnlineLib_EquipmentPakPacket' , 'Z64OnlineLib' , lobby , true ) ; this . age = age ; } } export class Z64O_RomFlagsPacket extends Packet { isRando : boolean ; isVanilla : boolean ; hasFastBunHood ? : boolean ; isMultiworld ? : boolean ; constructor ( lobby , isRando , isVanilla , hasFastBunHood ? , isMultiworld ? ) { super ( 'Z64O_RomFlagsPacket' , 'Z64O' , lobby , false ) ; this . isRando = isRando ; this . hasFastBunHood = hasFastBunHood ; this . isMultiworld = isMultiworld ; this . isVanilla = isVanilla ; } } export class Z64O_ErrorPacket extends Packet { message : string ; constructor ( msg , lobby ) { super ( 'Z64O_ErrorPacket' , 'Z64O' , lobby , false ) ; this . message = msg ; } } export class Z64O_EmoteLoadPacket extends Packet { id : string ; constructor ( id , lobby ) { super ( 'Z64O_EmoteLoadPacket' , 'Z64O' , lobby , true ) ; this . id = id ; } } export class Z64O_EmoteRequestPacket extends Packet { constructor ( lobby ) { super ( 'Z64O_EmoteRequestPacket' , 'Z64O' , lobby , true ) ; } } export class Z64O_EmotePlayPacket extends Packet { req : RemoteSoundPlayRequest ; constructor ( req , lobby ) { super ( 'Z64O_EmotePlayPacket' , 'Z64O' , lobby , true ) ; this . req = req ; } }