/// <summary> /// (effect) (cond)* (sup)* /// </summary> /// <param name="value"></param> public void SetEffect_effect(string value) { if (value.StartsWithIgnoreCase("{")) { return; } byte order = 0; foreach (string str in value.Split(';')) { EffectType type = (EffectType)Enum.Parse(typeof(EffectType), str.Split(' ')[0]); Effect te = EffectRegistrator.GetInstance().BuildProc(type, str); if (te == null) { continue; } te.Type = type; te.HashId = HashId(); te.Order = order; te.SkillId = SkillId; te.SkillLv = Level; Effects.Add(te); order++; // else // CLogger.error($"skill #{skill_id} requested unregistered effect {str}"); // order++; } }
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); } }
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); } }