public void Apply() { if (m_PVP) { foreach (Item item in m_Target.Items) { AosSkillBonuses bonuses = RunicReforging.GetAosSkillBonuses(item); if (bonuses != null) { bonuses.Remove(); } } } else { for (int i = 0; i < m_Mods.Count; ++i) { object mod = m_Mods[i]; if (mod is ResistanceMod) { m_Target.AddResistanceMod((ResistanceMod)mod); } else if (mod is StatMod) { m_Target.AddStatMod((StatMod)mod); } else if (mod is SkillMod) { m_Target.AddSkillMod((SkillMod)mod); } } } }
public override void OnRemoved(object parent) { if (Core.AOS && parent is Mobile) { Mobile from = (Mobile)parent; m_AosSkillBonuses.Remove(); string modName = Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); #region Mondain's Legacy Sets if (IsSetItem && m_SetEquipped) { SetHelper.RemoveSetBonus(from, SetID, this); } #endregion } Server.Engines.XmlSpawner2.XmlAttach.CheckOnRemoved(this, parent); }
public override void OnRemoved(IEntity parent) { Mobile mob = parent as Mobile; if (mob != null) { if (Core.AOS) { m_AosSkillBonuses.Remove(); } #region Set Items if (IsSetItem && m_SetEquipped) { SetHelper.RemoveSetBonus(mob, SetID, this); } #endregion string modName = this.Serial.ToString(); mob.RemoveStatMod(modName + "Str"); mob.RemoveStatMod(modName + "Dex"); mob.RemoveStatMod(modName + "Int"); mob.CheckStatTimers(); } base.OnRemoved(parent); }
public override void OnRemoved(object parent) { if (EraAOS && parent is Mobile) { var from = (Mobile)parent; m_AosSkillBonuses.Remove(); string modName = Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); } if (parent is Mobile) { var from = (Mobile)parent; var talisman = from.FindItemOnLayer(Layer.Talisman) as TransmuteTalisman; if (talisman != null) { ItemID = OriginalItemID; Hue = OriginalHue; } } }
public override void OnRemoved(object parent) { if (Core.AOS) { m_AosSkillBonuses.Remove(); } return; }
public override void OnRemoved(object parent) { if (Core.AOS && parent is Mobile) { Mobile from = (Mobile)parent; m_AosSkillBonuses.Remove(); string modName = Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); } }
public override void OnRemoved(object parent) { if (Core.AOS && parent is Mobile) { Mobile from = (Mobile)parent; m_AosSkillBonuses.Remove(); string modName = this.Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); } // XmlAttachment check for OnRemoved Server.Engines.XmlSpawner2.XmlAttach.CheckOnRemoved(this, parent); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; string modName = this.Serial.ToString(); m.RemoveStatMod(modName + "Str"); m.RemoveStatMod(modName + "Dex"); m.RemoveStatMod(modName + "Int"); if (Core.AOS) { m_AosSkillBonuses.Remove(); } m.CheckStatTimers(); } base.OnRemoved(parent); }
public override void OnRemoved(object parent) { Mobile mob = parent as Mobile; if (mob != null) { if (Core.AOS) { m_AosSkillBonuses.Remove(); } string modName = this.Serial.ToString(); mob.RemoveStatMod(modName + "Str"); mob.RemoveStatMod(modName + "Dex"); mob.RemoveStatMod(modName + "Int"); mob.CheckStatTimers(); } base.OnRemoved(parent); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile from = (Mobile)parent; m_AosSkillBonuses.Remove(); if (HasSocket <Caddellite>()) { Caddellite.UpdateBuff(from); } string modName = Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); } }
public override void OnRemoved(object parent) { if (parent is Mobile from) { m_AosSkillBonuses.Remove(); string modName = Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); #region Mondain's Legacy Sets if (IsSetItem && m_SetEquipped) { SetHelper.RemoveSetBonus(from, SetID, this); } #endregion } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; string modName = this.Serial.ToString(); m.RemoveStatMod(modName + "Str"); m.RemoveStatMod(modName + "Dex"); m.RemoveStatMod(modName + "Int"); if (Core.AOS) { m_AosSkillBonuses.Remove(); } ((Mobile)parent).Delta(MobileDelta.Armor); // Tell them armor rating has changed m.CheckStatTimers(); } base.OnRemoved(parent); }
public override void OnRemoved(object parent) { if (Core.AOS && parent is Mobile) { Mobile from = (Mobile)parent; m_AosSkillBonuses.Remove(); string modName = this.Serial.ToString(); from.RemoveStatMod(modName + "Str"); from.RemoveStatMod(modName + "Dex"); from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); } #region Magic Clothing if (m_JewelEffect == JewelEffect.None) { return; } if (parent is Mobile) { Mobile from = (Mobile)parent; string modName = this.Serial.ToString(); switch (m_JewelEffect) { case JewelEffect.Strength: from.RemoveStatMod(modName + "Str"); from.CheckStatTimers(); break; case JewelEffect.Agility: from.RemoveStatMod(modName + "Dex"); from.CheckStatTimers(); break; case JewelEffect.Cunning: from.RemoveStatMod(modName + "Int"); from.CheckStatTimers(); break; case JewelEffect.Bless: from.RemoveStatMod(modName + "BlessStr"); from.RemoveStatMod(modName + "BlessDex"); from.RemoveStatMod(modName + "BlessInt"); from.CheckStatTimers(); break; case JewelEffect.Weaken: from.RemoveStatMod(modName + "LowerStr"); from.CheckStatTimers(); break; case JewelEffect.Clumsy: from.RemoveStatMod(modName + "LowerDex"); from.CheckStatTimers(); break; case JewelEffect.Feeblemind: from.RemoveStatMod(modName + "LowerInt"); from.CheckStatTimers(); break; case JewelEffect.Curse: from.RemoveStatMod(modName + "CurseStr"); from.RemoveStatMod(modName + "CurseDex"); from.RemoveStatMod(modName + "CurseInt"); from.CheckStatTimers(); break; case JewelEffect.NightSight: from.EndAction(typeof(LightCycle)); from.LightLevel = 0; break; case JewelEffect.Invisibility: from.Hidden = false; break; case JewelEffect.MagicReflection: break; case JewelEffect.Protection: if (from.VirtualArmorMod >= 10) { from.VirtualArmorMod -= 10; } else { from.VirtualArmorMod = 0; } break; } if (m_st != null) { m_st.Stop(); } } #endregion }