// Token: 0x060010C2 RID: 4290 RVA: 0x00016D94 File Offset: 0x00014F94
        public static GameActorInfo Deserialize(Stream bytes)
        {
            int           num           = Int32Proxy.Deserialize(bytes);
            GameActorInfo gameActorInfo = new GameActorInfo();

            gameActorInfo.AccessLevel = EnumProxy <MemberAccessLevel> .Deserialize(bytes);

            gameActorInfo.ArmorPointCapacity = ByteProxy.Deserialize(bytes);
            gameActorInfo.ArmorPoints        = ByteProxy.Deserialize(bytes);
            gameActorInfo.Channel            = EnumProxy <ChannelType> .Deserialize(bytes);

            if ((num & 1) != 0)
            {
                gameActorInfo.ClanTag = StringProxy.Deserialize(bytes);
            }
            gameActorInfo.Cmid = Int32Proxy.Deserialize(bytes);
            gameActorInfo.CurrentFiringMode = EnumProxy <FireMode> .Deserialize(bytes);

            gameActorInfo.CurrentWeaponSlot = ByteProxy.Deserialize(bytes);
            gameActorInfo.Deaths            = Int16Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                gameActorInfo.FunctionalItems = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
            }
            if ((num & 4) != 0)
            {
                gameActorInfo.Gear = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
            }
            gameActorInfo.Health   = Int16Proxy.Deserialize(bytes);
            gameActorInfo.Kills    = Int16Proxy.Deserialize(bytes);
            gameActorInfo.Level    = Int32Proxy.Deserialize(bytes);
            gameActorInfo.Ping     = UInt16Proxy.Deserialize(bytes);
            gameActorInfo.PlayerId = ByteProxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                gameActorInfo.PlayerName = StringProxy.Deserialize(bytes);
            }
            gameActorInfo.PlayerState = EnumProxy <PlayerStates> .Deserialize(bytes);

            if ((num & 16) != 0)
            {
                gameActorInfo.QuickItems = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
            }
            gameActorInfo.Rank      = ByteProxy.Deserialize(bytes);
            gameActorInfo.SkinColor = ColorProxy.Deserialize(bytes);
            gameActorInfo.StepSound = EnumProxy <SurfaceType> .Deserialize(bytes);

            gameActorInfo.TeamID = EnumProxy <TeamID> .Deserialize(bytes);

            if ((num & 32) != 0)
            {
                gameActorInfo.Weapons = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
            }
            return(gameActorInfo);
        }
Esempio n. 2
0
        // Token: 0x060010B6 RID: 4278 RVA: 0x0001612C File Offset: 0x0001432C
        public static GameActorInfoDelta Deserialize(Stream bytes)
        {
            int  num = Int32Proxy.Deserialize(bytes);
            byte id  = ByteProxy.Deserialize(bytes);
            GameActorInfoDelta gameActorInfoDelta = new GameActorInfoDelta();

            gameActorInfoDelta.Id = id;
            if (num != 0)
            {
                if ((num & 1) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.AccessLevel] = EnumProxy <MemberAccessLevel> .Deserialize(bytes);
                }
                if ((num & 2) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.ArmorPointCapacity] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 4) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.ArmorPoints] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 8) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Channel] = EnumProxy <ChannelType> .Deserialize(bytes);
                }
                if ((num & 16) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.ClanTag] = StringProxy.Deserialize(bytes);
                }
                if ((num & 32) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Cmid] = Int32Proxy.Deserialize(bytes);
                }
                if ((num & 64) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.CurrentFiringMode] = EnumProxy <FireMode> .Deserialize(bytes);
                }
                if ((num & 128) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.CurrentWeaponSlot] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 256) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Deaths] = Int16Proxy.Deserialize(bytes);
                }
                if ((num & 512) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.FunctionalItems] = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
                }
                if ((num & 1024) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Gear] = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
                }
                if ((num & 2048) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Health] = Int16Proxy.Deserialize(bytes);
                }
                if ((num & 4096) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Kills] = Int16Proxy.Deserialize(bytes);
                }
                if ((num & 8192) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Level] = Int32Proxy.Deserialize(bytes);
                }
                if ((num & 16384) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Ping] = UInt16Proxy.Deserialize(bytes);
                }
                if ((num & 32768) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.PlayerId] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 65536) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.PlayerName] = StringProxy.Deserialize(bytes);
                }
                if ((num & 131072) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.PlayerState] = EnumProxy <PlayerStates> .Deserialize(bytes);
                }
                if ((num & 262144) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.QuickItems] = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
                }
                if ((num & 524288) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Rank] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 1048576) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.SkinColor] = ColorProxy.Deserialize(bytes);
                }
                if ((num & 2097152) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.StepSound] = EnumProxy <SurfaceType> .Deserialize(bytes);
                }
                if ((num & 4194304) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.TeamID] = EnumProxy <TeamID> .Deserialize(bytes);
                }
                if ((num & 8388608) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Weapons] = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
                }
            }
            return(gameActorInfoDelta);
        }