Exemplo n.º 1
0
        public SkillCond BuildCond(SkillCondType type, string str)
        {
            SkillCond cond = null;

            switch (type)
            {
            case SkillCondType.CanSummonCubic:
                cond = new CanSummonCubic();
                break;
            }

            cond?.Build(str);

            return(cond);
        }
Exemplo n.º 2
0
        public void SetOperateCond(string value)
        {
            if (value.StartsWithIgnoreCase("{"))
            {
                return;
            }

            foreach (string str in value.Split(';'))
            {
                SkillCondType type = (SkillCondType)Enum.Parse(typeof(SkillCondType), str.Split(' ')[0]);
                SkillCond     cond = EffectRegistrator.GetInstance().BuildCond(type, str);

                Conditions.Add(cond);
            }
        }
Exemplo n.º 3
0
        public void SetOperateCond(string value)
        {
            if (value.StartsWithIgnoreCase("{"))
            {
                return;
            }

            foreach (string str in value.Split(';'))
            {
                var           tempValue    = str.Split(' ')[0];
                var           newTempValue = StringHelper.ToTitleCase(tempValue, '_');
                SkillCondType type         = (SkillCondType)Enum.Parse(typeof(SkillCondType), newTempValue);
                SkillCond     cond         = EffectRegistrator.GetInstance().BuildCond(type, str);

                Conditions.Add(cond);
            }
        }