Beispiel #1
0
        public static ApplicationConfigurationView Deserialize(Stream bytes)
        {
            int mask = Int32Proxy.Deserialize(bytes);
            var view = new ApplicationConfigurationView();

            view.MaxLevel              = Int32Proxy.Deserialize(bytes);
            view.MaxXp                 = Int32Proxy.Deserialize(bytes);
            view.PointsBaseLoser       = Int32Proxy.Deserialize(bytes);
            view.PointsBaseWinner      = Int32Proxy.Deserialize(bytes);
            view.PointsHeadshot        = Int32Proxy.Deserialize(bytes);
            view.PointsKill            = Int32Proxy.Deserialize(bytes);
            view.PointsNutshot         = Int32Proxy.Deserialize(bytes);
            view.PointsPerMinuteLoser  = Int32Proxy.Deserialize(bytes);
            view.PointsPerMinuteWinner = Int32Proxy.Deserialize(bytes);
            view.PointsSmackdown       = Int32Proxy.Deserialize(bytes);
            view.XpBaseLoser           = Int32Proxy.Deserialize(bytes);
            view.XpBaseWinner          = Int32Proxy.Deserialize(bytes);
            view.XpHeadshot            = Int32Proxy.Deserialize(bytes);
            view.XpKill                = Int32Proxy.Deserialize(bytes);
            view.XpNutshot             = Int32Proxy.Deserialize(bytes);
            view.XpPerMinuteLoser      = Int32Proxy.Deserialize(bytes);
            view.XpPerMinuteWinner     = Int32Proxy.Deserialize(bytes);

            if ((mask & 1) != 0)
            {
                view.XpRequiredPerLevel = DictionaryProxy <int, int> .Deserialize(bytes, Int32Proxy.Deserialize, Int32Proxy.Deserialize);
            }

            view.XpSmackdown = Int32Proxy.Deserialize(bytes);
            return(view);
        }
Beispiel #2
0
        public static MapView Deserialize(Stream bytes)
        {
            var mask = Int32Proxy.Deserialize(bytes);
            var view = new MapView();

            if ((mask & 1) != 0)
            {
                view.Description = StringProxy.Deserialize(bytes);
            }
            if ((mask & 2) != 0)
            {
                view.DisplayName = StringProxy.Deserialize(bytes);
            }

            view.IsBlueBox         = BooleanProxy.Deserialize(bytes);
            view.MapId             = Int32Proxy.Deserialize(bytes);
            view.MaxPlayers        = Int32Proxy.Deserialize(bytes);
            view.RecommendedItemId = Int32Proxy.Deserialize(bytes);

            if ((mask & 4) != 0)
            {
                view.SceneName = StringProxy.Deserialize(bytes);
            }
            if ((mask & 8) != 0)
            {
                view.Settings = DictionaryProxy <GameModeType, MapSettingsView> .Deserialize(bytes, EnumProxy <GameModeType> .Deserialize, MapSettingsViewProxy.Deserialize);
            }

            view.SupportedGameModes = Int32Proxy.Deserialize(bytes);
            view.SupportedItemClass = Int32Proxy.Deserialize(bytes);
            return(view);
        }
        public static UberStrikeItemQuickView Deserialize(Stream bytes)
        {
            int mask = Int32Proxy.Deserialize(bytes);
            var view = new UberStrikeItemQuickView();

            view.BehaviourType = EnumProxy <QuickItemLogic> .Deserialize(bytes);

            view.CoolDownTime = Int32Proxy.Deserialize(bytes);

            if ((mask & 1) != 0)
            {
                view.CustomProperties = DictionaryProxy <string, string> .Deserialize(bytes, StringProxy.Deserialize, StringProxy.Deserialize);
            }
            if ((mask & 2) != 0)
            {
                view.Description = StringProxy.Deserialize(bytes);
            }

            view.ID           = Int32Proxy.Deserialize(bytes);
            view.IsConsumable = BooleanProxy.Deserialize(bytes);
            view.ItemClass    = EnumProxy <UberStrikeItemClass> .Deserialize(bytes);

            if ((mask & 4) != 0)
            {
                view.ItemProperties = DictionaryProxy <ItemPropertyType, int> .Deserialize(bytes, EnumProxy <ItemPropertyType> .Deserialize, Int32Proxy.Deserialize);
            }

            view.LevelLock        = Int32Proxy.Deserialize(bytes);
            view.MaxDurationDays  = Int32Proxy.Deserialize(bytes);
            view.MaxOwnableAmount = Int32Proxy.Deserialize(bytes);

            if ((mask & 8) != 0)
            {
                view.Name = StringProxy.Deserialize(bytes);
            }
            if ((mask & 16) != 0)
            {
                view.PrefabName = StringProxy.Deserialize(bytes);
            }
            if ((mask & 32) != 0)
            {
                view.Prices = ListProxy <ItemPriceView> .Deserialize(bytes, ItemPriceViewProxy.Deserialize);
            }

            view.ShopHighlightType = EnumProxy <ItemShopHighlightType> .Deserialize(bytes);

            view.UsesPerGame  = Int32Proxy.Deserialize(bytes);
            view.UsesPerLife  = Int32Proxy.Deserialize(bytes);
            view.UsesPerRound = Int32Proxy.Deserialize(bytes);
            view.WarmUpTime   = Int32Proxy.Deserialize(bytes);
            return(view);
        }
Beispiel #4
0
        public static DamageEventView Deserialize(Stream bytes)
        {
            int mask     = Int32Proxy.Deserialize(bytes);
            var instance = new DamageEventView();

            instance.BodyPartFlag = ByteProxy.Deserialize(bytes);

            if ((mask & 1) != 0)
            {
                instance.Damage = DictionaryProxy <byte, byte> .Deserialize(bytes, ByteProxy.Deserialize, ByteProxy.Deserialize);
            }

            instance.DamageEffectFlag = Int32Proxy.Deserialize(bytes);
            instance.DamgeEffectValue = SingleProxy.Deserialize(bytes);
            return(instance);
        }
Beispiel #5
0
        public static AccountCompletionResultView Deserialize(Stream bytes)
        {
            int mask = Int32Proxy.Deserialize(bytes);
            var view = new AccountCompletionResultView();

            if ((mask & 1) != 0)
            {
                view.ItemsAttributed = DictionaryProxy <int, int> .Deserialize(bytes, Int32Proxy.Deserialize, Int32Proxy.Deserialize);
            }
            if ((mask & 2) != 0)
            {
                view.NonDuplicateNames = ListProxy <string> .Deserialize(bytes, StringProxy.Deserialize);
            }

            view.Result = Int32Proxy.Deserialize(bytes);
            return(view);
        }
Beispiel #6
0
        public static UberStrikeItemGearView Deserialize(Stream bytes)
        {
            var mask = Int32Proxy.Deserialize(bytes);
            var view = new UberStrikeItemGearView();

            view.ArmorPoints = Int32Proxy.Deserialize(bytes);
            view.ArmorWeight = Int32Proxy.Deserialize(bytes);

            if ((mask & 1) != 0)
            {
                view.CustomProperties = DictionaryProxy <string, string> .Deserialize(bytes, StringProxy.Deserialize, StringProxy.Deserialize);
            }
            if ((mask & 2) != 0)
            {
                view.Description = StringProxy.Deserialize(bytes);
            }

            view.ID           = Int32Proxy.Deserialize(bytes);
            view.IsConsumable = BooleanProxy.Deserialize(bytes);
            view.ItemClass    = EnumProxy <UberStrikeItemClass> .Deserialize(bytes);

            if ((mask & 4) != 0)
            {
                view.ItemProperties = DictionaryProxy <ItemPropertyType, int> .Deserialize(bytes, EnumProxy <ItemPropertyType> .Deserialize, Int32Proxy.Deserialize);
            }

            view.LevelLock       = Int32Proxy.Deserialize(bytes);
            view.MaxDurationDays = Int32Proxy.Deserialize(bytes);

            if ((mask & 8) != 0)
            {
                view.Name = StringProxy.Deserialize(bytes);
            }
            if ((mask & 16) != 0)
            {
                view.PrefabName = StringProxy.Deserialize(bytes);
            }
            if ((mask & 32) != 0)
            {
                view.Prices = ListProxy <ItemPriceView> .Deserialize(bytes, ItemPriceViewProxy.Deserialize);
            }

            view.ShopHighlightType = EnumProxy <ItemShopHighlightType> .Deserialize(bytes);

            return(view);
        }
Beispiel #7
0
        public static UberStrikeItemWeaponView Deserialize(Stream bytes)
        {
            int mask = Int32Proxy.Deserialize(bytes);
            var view = new UberStrikeItemWeaponView();

            view.AccuracySpread      = Int32Proxy.Deserialize(bytes);
            view.CombatRange         = Int32Proxy.Deserialize(bytes);
            view.CriticalStrikeBonus = Int32Proxy.Deserialize(bytes);

            if ((mask & 1) != 0)
            {
                view.CustomProperties = DictionaryProxy <string, string> .Deserialize(bytes, StringProxy.Deserialize, StringProxy.Deserialize);
            }

            view.DamageKnockback       = Int32Proxy.Deserialize(bytes);
            view.DamagePerProjectile   = Int32Proxy.Deserialize(bytes);
            view.DefaultZoomMultiplier = Int32Proxy.Deserialize(bytes);

            if ((mask & 2) != 0)
            {
                view.Description = StringProxy.Deserialize(bytes);
            }

            view.HasAutomaticFire = BooleanProxy.Deserialize(bytes);
            view.ID           = Int32Proxy.Deserialize(bytes);
            view.IsConsumable = BooleanProxy.Deserialize(bytes);
            view.ItemClass    = EnumProxy <UberStrikeItemClass> .Deserialize(bytes);

            if ((mask & 4) != 0)
            {
                view.ItemProperties = DictionaryProxy <ItemPropertyType, int> .Deserialize(bytes, EnumProxy <ItemPropertyType> .Deserialize, Int32Proxy.Deserialize);
            }

            view.LevelLock             = Int32Proxy.Deserialize(bytes);
            view.MaxAmmo               = Int32Proxy.Deserialize(bytes);
            view.MaxDurationDays       = Int32Proxy.Deserialize(bytes);
            view.MaxZoomMultiplier     = Int32Proxy.Deserialize(bytes);
            view.MinZoomMultiplier     = Int32Proxy.Deserialize(bytes);
            view.MissileBounciness     = Int32Proxy.Deserialize(bytes);
            view.MissileForceImpulse   = Int32Proxy.Deserialize(bytes);
            view.MissileTimeToDetonate = Int32Proxy.Deserialize(bytes);

            if ((mask & 8) != 0)
            {
                view.Name = StringProxy.Deserialize(bytes);
            }
            if ((mask & 16) != 0)
            {
                view.PrefabName = StringProxy.Deserialize(bytes);
            }
            if ((mask & 32) != 0)
            {
                view.Prices = ListProxy <ItemPriceView> .Deserialize(bytes, ItemPriceViewProxy.Deserialize);
            }

            view.ProjectileSpeed        = Int32Proxy.Deserialize(bytes);
            view.ProjectilesPerShot     = Int32Proxy.Deserialize(bytes);
            view.RateOfFire             = Int32Proxy.Deserialize(bytes);
            view.RecoilKickback         = Int32Proxy.Deserialize(bytes);
            view.RecoilMovement         = Int32Proxy.Deserialize(bytes);
            view.SecondaryActionReticle = Int32Proxy.Deserialize(bytes);
            view.ShopHighlightType      = EnumProxy <ItemShopHighlightType> .Deserialize(bytes);

            view.SplashRadius          = Int32Proxy.Deserialize(bytes);
            view.StartAmmo             = Int32Proxy.Deserialize(bytes);
            view.Tier                  = Int32Proxy.Deserialize(bytes);
            view.WeaponSecondaryAction = Int32Proxy.Deserialize(bytes);

            return(view);
        }