import { OutPacketBase } from 'packets/out/packet' ; import { UserInventoryItem } from 'user/userinventoryitem' ; /**
 * sends an user's inventory to a host
 */ export class OutHostSetInventory { public static build ( userId , items , outPacket ) { outPacket . writeUInt32 ( userId ) ; outPacket . writeUInt8 ( 0 ) ; outPacket . writeUInt16 ( items . length ) ; for ( const item of items ) { outPacket . writeUInt32 ( item . item_id ) ; outPacket . writeUInt16 ( item . ammount ) ; } } }