예제 #1
0
        /// <summary>
        /// (effect) (cond)* (sup)*
        /// </summary>
        /// <param name="value"></param>
        public void SetEffect_effect(string value)
        {
            if (value.StartsWith("{"))
            {
                return;
            }

            byte order = 0;

            foreach (string str in value.Split(';'))
            {
                TEffectType type = (TEffectType)Enum.Parse(typeof(TEffectType), str.Split(' ')[0]);
                TEffect     te   = TEffectRegistrator.getInstance().BuildProc(type, str);
                if (te != null)
                {
                    te.type    = type;
                    te.HashID  = this.HashID();
                    te.Order   = order;
                    te.SkillId = skill_id;
                    te.SkillLv = level;
                    effects.Add(te);
                    order++;
                }
                // else
                //     CLogger.error("skill #" + skill_id + " requested unregistered effect " + str);
                ///  order++;
            }
        }
예제 #2
0
        public void SetOperateCond(string value)
        {
            if (value.StartsWith("{"))
            {
                return;
            }

            foreach (string str in value.Split(';'))
            {
                TSkillCondType type = (TSkillCondType)Enum.Parse(typeof(TSkillCondType), str.Split(' ')[0]);
                TSkillCond     cond = TEffectRegistrator.getInstance().BuildCond(type, str);
                if (Conditions == null)
                {
                    Conditions = new List <TSkillCond>();
                }

                Conditions.Add(cond);
            }
        }