import { PacketHandler } from "../../../packets/packet" ; import { PolusBuffer } from "../../../util/polusBuffer" ; export enum FreeWeekendState { NotFree = 0 , FreeMIRA = 1 , Free = 2 } export interface FreeWeekendPacket { type : "FreeWeekend" ; FreeState ? : FreeWeekendState ; } export const FreeWeekend = { parse ( packet ) { return { type : "FreeWeekend" , FreeState : packet . readU8 ( ) , } ; } , serialize ( packet ) { let buf = new PolusBuffer ( 0 ) ; if ( packet . FreeState ) buf . writeU8 ( packet . FreeState ) ; return buf ; } , } ;