Exemple #1
0
        public void CastData()
        {
            if (!string.IsNullOrEmpty(Skill))
            {
                OverlordSkill = Utilites.CastStringTuEnum <Enumerators.OverlordSkill>(Skill);
            }

            if (!string.IsNullOrEmpty(SkillTargets))
            {
                SkillTargetTypes = Utilites.CastList <Enumerators.SkillTargetType>(SkillTargets);
            }
            else
            {
                SkillTargetTypes = new List <Enumerators.SkillTargetType>();
            }

            if (!string.IsNullOrEmpty(ElementTargets))
            {
                ElementTargetTypes = Utilites.CastList <Enumerators.SetType>(ElementTargets);
            }
            else
            {
                ElementTargetTypes = new List <Enumerators.SetType>();
            }
        }
        public void ParseData()
        {
            AbilityType         = Utilites.CastStringTuEnum <Enumerators.AbilityType>(Type);
            AbilityActivityType = Utilites.CastStringTuEnum <Enumerators.AbilityActivityType>(ActivityType);
            AbilityCallType     = Utilites.CastStringTuEnum <Enumerators.AbilityCallType>(CallType);

            if (!string.IsNullOrEmpty(TargetType))
            {
                AbilityTargetTypes = Utilites.CastList <Enumerators.AbilityTargetType>(TargetType);
            }
            else
            {
                AbilityTargetTypes = new List <Enumerators.AbilityTargetType>();
            }

            if (!string.IsNullOrEmpty(StatType))
            {
                AbilityStatType = Utilites.CastStringTuEnum <Enumerators.StatType>(StatType);
            }
            else
            {
                AbilityStatType = Enumerators.StatType.NONE;
            }

            if (!string.IsNullOrEmpty(SetType))
            {
                AbilitySetType = Utilites.CastStringTuEnum <Enumerators.SetType>(SetType);
            }
            else
            {
                AbilitySetType = Enumerators.SetType.NONE;
            }

            if (!string.IsNullOrEmpty(EffectType))
            {
                AbilityEffectType = Utilites.CastStringTuEnum <Enumerators.AbilityEffectType>(EffectType);
            }
            else
            {
                AbilityEffectType = Enumerators.AbilityEffectType.NONE;
            }

            if (!string.IsNullOrEmpty(AttackInfo))
            {
                AttackInfoType = Utilites.CastStringTuEnum <Enumerators.AttackInfoType>(AttackInfo);
            }
            else
            {
                AttackInfoType = Enumerators.AttackInfoType.ANY;
            }

            if (!string.IsNullOrEmpty(CardType))
            {
                TargetCardType = Utilites.CastStringTuEnum <Enumerators.CardType>(CardType);
            }
            else
            {
                TargetCardType = Enumerators.CardType.NONE;
            }

            if (!string.IsNullOrEmpty(UnitStatus))
            {
                TargetUnitStatusType = Utilites.CastStringTuEnum <Enumerators.UnitStatusType>(UnitStatus);
            }
            else
            {
                TargetUnitStatusType = Enumerators.UnitStatusType.NONE;
            }

            if (!string.IsNullOrEmpty(UnitType))
            {
                TargetUnitType = Utilites.CastStringTuEnum <Enumerators.CardType>(UnitType);
            }
        }