Exemple #1
0
        public static SpellTargetInfoView Deserialize(System.IO.StreamReader input)
        {
            SpellTargetInfoView _obj = new SpellTargetInfoView();
            // Type
            TargettingType _obj_Type = (TargettingType)Int32.Parse(input.ReadLine());

            _obj.Type = (TargettingType)_obj_Type;
            // Range
            float _obj_Range = Single.Parse(input.ReadLine());

            _obj.Range = (float)_obj_Range;
            // Duration
            float _obj_Duration = Single.Parse(input.ReadLine());

            _obj.Duration = (float)_obj_Duration;
            // AoeRadius
            float _obj_AoeRadius = Single.Parse(input.ReadLine());

            _obj.AoeRadius = (float)_obj_AoeRadius;
            // DieOnCollision
            bool _obj_DieOnCollision = Int32.Parse(input.ReadLine()) == 0 ? false : true;

            _obj.DieOnCollision = (bool)_obj_DieOnCollision;
            // AllowedTargetTypes
            EntityTypeRelative _obj_AllowedTargetTypes = (EntityTypeRelative)Int32.Parse(input.ReadLine());

            _obj.AllowedTargetTypes = (EntityTypeRelative)_obj_AllowedTargetTypes;
            return(_obj);
        }
        public static SpellLevelDescriptionView Deserialize(System.IO.StreamReader input)
        {
            SpellLevelDescriptionView _obj = new SpellLevelDescriptionView();
            // BaseCooldown
            float _obj_BaseCooldown = Single.Parse(input.ReadLine());

            _obj.BaseCooldown = (float)_obj_BaseCooldown;
            // CastingTime
            float _obj_CastingTime = Single.Parse(input.ReadLine());

            _obj.CastingTime = (float)_obj_CastingTime;
            // CastingTimeAlterations
            List <StateAlterationModelView> _obj_CastingTimeAlterations = new List <StateAlterationModelView>();
            int _obj_CastingTimeAlterations_count = Int32.Parse(input.ReadLine());

            for (int _obj_CastingTimeAlterations_i = 0; _obj_CastingTimeAlterations_i < _obj_CastingTimeAlterations_count; _obj_CastingTimeAlterations_i++)
            {
                StateAlterationModelView _obj_CastingTimeAlterations_e = StateAlterationModelView.Deserialize(input);
                _obj_CastingTimeAlterations.Add((StateAlterationModelView)_obj_CastingTimeAlterations_e);
            }
            _obj.CastingTimeAlterations = (List <StateAlterationModelView>)_obj_CastingTimeAlterations;
            // TargetType
            SpellTargetInfoView _obj_TargetType = SpellTargetInfoView.Deserialize(input);

            _obj.TargetType = (SpellTargetInfoView)_obj_TargetType;
            // OnHitEffects
            List <StateAlterationModelView> _obj_OnHitEffects = new List <StateAlterationModelView>();
            int _obj_OnHitEffects_count = Int32.Parse(input.ReadLine());

            for (int _obj_OnHitEffects_i = 0; _obj_OnHitEffects_i < _obj_OnHitEffects_count; _obj_OnHitEffects_i++)
            {
                StateAlterationModelView _obj_OnHitEffects_e = StateAlterationModelView.Deserialize(input);
                _obj_OnHitEffects.Add((StateAlterationModelView)_obj_OnHitEffects_e);
            }
            _obj.OnHitEffects = (List <StateAlterationModelView>)_obj_OnHitEffects;
            return(_obj);
        }
 public SpellLevelDescriptionView()
 {
     CastingTimeAlterations = new List <StateAlterationModelView>();
     TargetType             = new SpellTargetInfoView();
     OnHitEffects           = new List <StateAlterationModelView>();
 }