import { Uint64LE } from 'int64-buffer' ; import { OutPacketBase } from 'packets/out/packet' ; import { User } from 'user/user' ; class export class UserInfoFullUpdate { param outPacket public static build ( user , outPacket ) { outPacket . writeUInt32 ( 0xffffffff ) ; outPacket . writeUInt64 ( new Uint64LE ( 0x2241158f ) ) ; outPacket . writeString ( user . playername ) ; outPacket . writeUInt16 ( user . level ) ; outPacket . writeUInt64 ( new Uint64LE ( user . cur_xp . toString ( ) ) ) ; outPacket . writeUInt64 ( new Uint64LE ( user . max_xp . toString ( ) ) ) ; outPacket . writeUInt32 ( 0x313 ) ; outPacket . writeUInt8 ( user . rank ) ; outPacket . writeUInt8 ( user . rank_frame ) ; outPacket . writeUInt64 ( new Uint64LE ( user . points ) ) ; outPacket . writeUInt32 ( user . played_matches ) ; outPacket . writeUInt32 ( user . wins ) ; outPacket . writeUInt32 ( user . kills ) ; outPacket . writeUInt32 ( user . headshots ) ; outPacket . writeUInt32 ( user . deaths ) ; outPacket . writeUInt32 ( user . assists ) ; outPacket . writeUInt16 ( user . accuracy ) ; outPacket . writeUInt32 ( user . seconds_played ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 50 ) ; outPacket . writeUInt8 ( 0 ) ; outPacket . writeUInt64 ( new Uint64LE ( 0 ) ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeString ( null ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeString ( user . netcafe_name ) ; outPacket . writeUInt32 ( user . cash ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeString ( user . clan_name ) ; outPacket . writeUInt32 ( user . clan_mark ) ; outPacket . writeUInt8 ( 0 ) ; for ( const elem of [ 0 , 0 , 0 , 0 , 0 ] ) { outPacket . writeUInt32 ( elem ) ; } for ( const elem of [ 0 , 0 , 0 , 0 , 0 ] ) { outPacket . writeUInt32 ( elem ) ; } outPacket . writeUInt8 ( 0 ) ; outPacket . writeUInt32 ( user . world_rank ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt8 ( 0 ) ; outPacket . writeUInt16 ( user . campaign_flags ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( user . mpoints ) ; outPacket . writeUInt64 ( new Uint64LE ( 0 ) ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt16 ( user . title ) ; outPacket . writeUInt16 ( 0 ) ; for ( const elem of user . unlocked_titles ) { outPacket . writeUInt8 ( elem ) ; } outPacket . writeString ( user . signature ) ; outPacket . writeUInt8 ( user . unreaded_message ) ; outPacket . writeUInt8 ( 0 ) ; outPacket . writeUInt32 ( 7 ) ; outPacket . writeUInt32 ( user . best_gamemode ) ; outPacket . writeUInt32 ( user . best_map ) ; outPacket . writeUInt16 ( 0 ) ; for ( const elem of user . unlocked_achievements ) { outPacket . writeUInt8 ( elem ) ; } outPacket . writeUInt32 ( 0xa5c8 ) ; outPacket . writeUInt16 ( user . avatar ) ; outPacket . writeUInt16 ( 0 ) ; for ( const elem of user . unlocked_avatars ) { outPacket . writeUInt8 ( elem ) ; } outPacket . writeUInt8 ( user . isVip ( ) ? 1 : 0 ) ; outPacket . writeUInt8 ( user . vip_level ) ; outPacket . writeUInt32 ( user . vip_xp ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt64 ( new Uint64LE ( user . skill_human_curxp . toString ( ) ) ) ; outPacket . writeUInt64 ( new Uint64LE ( user . skill_human_maxxp . toString ( ) ) ) ; outPacket . writeUInt8 ( user . skill_human_points ) ; outPacket . writeUInt64 ( new Uint64LE ( user . skill_zombie_curxp . toString ( ) ) ) ; outPacket . writeUInt64 ( new Uint64LE ( user . skill_zombie_maxxp . toString ( ) ) ) ; outPacket . writeUInt8 ( user . skill_zombie_points ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt32 ( 0 ) ; outPacket . writeUInt8 ( 0 ) ; outPacket . writeUInt8 ( 0 ) ; outPacket . writeUInt8 ( 0 ) ; } }