Esempio n. 1
0
        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();
                }
            }
        }
Esempio n. 2
0
        public virtual void AddSkillMod(Mobile from)
        {
            if (from == null)
            {
                return;
            }

            ValidateSkillMods(from);

            if (XmlAttach.FindAttachment(from, typeof(LokaiSkillMod)) != this /*m_SkillMods.Contains(mod)*/)
            {
                XmlAttach.AttachTo(from, this);

                LokaiSkill sk = LokaiSkillUtilities.XMLGetSkills(from)[this.Skill];

                if (sk != null)
                {
                    sk.Update();
                }
            }
        }
Esempio n. 3
0
        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();
                    }
                }
            }
        }