public override void OnEquip(Mobile from) { try { LokaiSkillMod lsm = new LokaiSkillMod(Skill, Relative, ObeyCap, Value, from); lsm.Name = string.Format("{0}{1}{2}", Skill.ToString(), from.Name, Serial.Value); XmlAttach.AttachTo(from, lsm); LokaiSkills skills = LokaiSkillUtilities.XMLGetSkills(from); skills.OnLokaiSkillChange(skills[Skill]); } catch { base.OnEquip(from); } }
private void InternalRemoveSkillMod(Mobile from, LokaiSkillMod mod) { if (XmlAttach.FindAttachment(from, typeof(LokaiSkillMod)) == mod) { mod.Delete(); LokaiSkill sk = LokaiSkillUtilities.XMLGetSkills(from)[mod.Skill]; if (sk != null) { sk.Update(); } } }
public virtual void UpdateSkillMods(Mobile from) { ValidateSkillMods(from); ArrayList a = XmlAttach.FindAttachments(from); foreach (XmlAttachment x in a) { if (x is LokaiSkillMod) { LokaiSkillMod mod = x as LokaiSkillMod; LokaiSkill sk = LokaiSkillUtilities.XMLGetSkills(from)[this.Skill]; if (sk != null) { sk.Update(); } } } }