Example #1
0
        public static WeaponUpgradeModelView Deserialize(System.IO.StreamReader input)
        {
            WeaponUpgradeModelView _obj = new WeaponUpgradeModelView();
            // Description
            SpellLevelDescriptionView _obj_Description = SpellLevelDescriptionView.Deserialize(input);

            _obj.Description = (SpellLevelDescriptionView)_obj_Description;
            // PassiveAlterations
            List <StateAlterationModelView> _obj_PassiveAlterations = new List <StateAlterationModelView>();
            int _obj_PassiveAlterations_count = Int32.Parse(input.ReadLine());

            for (int _obj_PassiveAlterations_i = 0; _obj_PassiveAlterations_i < _obj_PassiveAlterations_count; _obj_PassiveAlterations_i++)
            {
                StateAlterationModelView _obj_PassiveAlterations_e = StateAlterationModelView.Deserialize(input);
                _obj_PassiveAlterations.Add((StateAlterationModelView)_obj_PassiveAlterations_e);
            }
            _obj.PassiveAlterations = (List <StateAlterationModelView>)_obj_PassiveAlterations;
            // Cost
            float _obj_Cost = Single.Parse(input.ReadLine());

            _obj.Cost = (float)_obj_Cost;
            return(_obj);
        }
        public static WeaponModelView Deserialize(System.IO.StreamReader input)
        {
            WeaponModelView _obj = new WeaponModelView();
            // ID
            int _obj_ID = Int32.Parse(input.ReadLine());

            _obj.ID = (int)_obj_ID;
            // Upgrades
            List <WeaponUpgradeModelView> _obj_Upgrades = new List <WeaponUpgradeModelView>();
            int _obj_Upgrades_count = Int32.Parse(input.ReadLine());

            for (int _obj_Upgrades_i = 0; _obj_Upgrades_i < _obj_Upgrades_count; _obj_Upgrades_i++)
            {
                WeaponUpgradeModelView _obj_Upgrades_e = WeaponUpgradeModelView.Deserialize(input);
                _obj_Upgrades.Add((WeaponUpgradeModelView)_obj_Upgrades_e);
            }
            _obj.Upgrades = (List <WeaponUpgradeModelView>)_obj_Upgrades;
            // Price
            float _obj_Price = Single.Parse(input.ReadLine());

            _obj.Price = (float)_obj_Price;
            return(_obj);
        }