private static void RemoveDamageFromItem(Item item, ItemEnchantmentEffect effect) { item.BonusDamage -= effect.MaxAmount; if (item.IsEquippedItem) { item.Container.Owner.UpdateDamage((InventorySlot)item.Slot); } }
private static void ApplyDamageToItem(Item item, ItemEnchantmentEffect effect) { item.BonusDamage += effect.MaxAmount; if (!item.IsEquippedItem) { return; } item.Container.Owner.UpdateDamage((InventorySlot)item.Slot); }
private static void RemoveCombatSpell(Item item, ItemEnchantmentEffect effect) { item.OwningCharacter.RemoveProcHandler(handler => { if (handler.ProcSpell != null) { return((int)handler.ProcSpell.Id == (int)effect.Misc); } return(false); }); }
private static void ApplyEquipSpell(Item item, ItemEnchantmentEffect effect) { var owner = item.OwningCharacter; var spell = SpellHandler.Get((SpellId)effect.Misc); if (spell == null) { LogManager.GetCurrentClassLogger().Warn("{0} had invalid SpellId: {1}", effect, (SpellId)effect.Misc); return; } SpellCast.ValidateAndTriggerNew(spell, owner, owner, null, item); }
private static void ApplyCombatSpell(Item item, ItemEnchantmentEffect effect) { var spell = SpellHandler.Get(effect.Misc); if (spell == null) { ContentMgr.OnInvalidClientData("Enchantment Effect {0} had invalid SpellId: {1}", effect, (SpellId)effect.Misc); } else { item.OwningCharacter.AddProcHandler(new ItemHitProcHandler(item, spell)); } }
private static void ApplyEquipSpell(Item item, ItemEnchantmentEffect effect) { Character owningCharacter = item.OwningCharacter; Spell spell = SpellHandler.Get((SpellId)effect.Misc); if (spell == null) { LogManager.GetCurrentClassLogger().Warn("{0} had invalid SpellId: {1}", (object)effect, (object)(SpellId)effect.Misc); } else { SpellCast.ValidateAndTriggerNew(spell, (Unit)owningCharacter, (WorldObject)owningCharacter, (SpellChannel)null, item, (IUnitAction)null, (SpellEffect)null); } }
private static void ApplyTotem(Item item, ItemEnchantmentEffect effect) { }
private static void ApplyEquipSpell(Item item, ItemEnchantmentEffect effect) { var owner = item.OwningCharacter; owner.SpellCast.Trigger((SpellId)effect.Misc, owner); }
private static void ApplyDamage(Item item, ItemEnchantmentEffect effect) { var owner = item.OwningCharacter; owner.AddDamageDoneMod(DamageSchool.Physical, effect.MaxAmount); }
private static void ApplyCombatSpell(Item item, ItemEnchantmentEffect effect) { var spell = SpellHandler.Get(effect.Misc); if (spell == null) { ContentMgr.OnInvalidClientData("Enchantment Effect {0} had invalid SpellId: {1}", effect, (SpellId)effect.Misc); } else { item.OwningCharacter.AddProcHandler(new ItemHitProcHandler(item, spell)); } }
private static void DoNothing(Item item, ItemEnchantmentEffect effect) { }
/// <summary> /// Removes the given EnchantEffect from the given Item and the wearer of the Item /// </summary> /// <param name="item"></param> /// <param name="effect"></param> internal static void RemoveEffect(Item item, ItemEnchantmentEffect effect) { RemoveEquippedEnchantHandlers[(uint)effect.Type](item, effect); }
private static void RemoveEquipSpell(Item item, ItemEnchantmentEffect effect) { item.OwningCharacter.Auras.Cancel((SpellId)effect.Misc); }
/// <summary> /// Applies the given EnchantEffect to the given Item and the wearer of the Item /// </summary> /// <param name="item"></param> /// <param name="effect"></param> internal static void ApplyEffect(Item item, ItemEnchantmentEffect effect) { ApplyEnchantHandlers[(uint)effect.Type](item, effect); }
private static void RemoveStat(Item item, ItemEnchantmentEffect effect) { item.OwningCharacter.RemoveStatMod((ItemModType)effect.Misc, effect.MaxAmount); }
private static void RemoveTotem(Item item, ItemEnchantmentEffect effect) { }
private static void RemoveStat(Item item, ItemEnchantmentEffect effect) { item.OwningCharacter.RemoveStatMod((ItemModType)effect.Misc, effect.MaxAmount); }
private static void RemoveEquipSpell(Item item, ItemEnchantmentEffect effect) { item.OwningCharacter.Auras.Remove((SpellId)effect.Misc); }
/// <summary> /// Applies the given EnchantEffect to the given Item and the wearer of the Item /// </summary> /// <param name="item"></param> /// <param name="effect"></param> internal static void ApplyEquippedEffect(Item item, ItemEnchantmentEffect effect) { EnchantMgr.ApplyEquippedEnchantHandlers[(uint)effect.Type](item, effect); }
private static void ApplyTotem(Item item, ItemEnchantmentEffect effect) { }
private static void RemoveCombatSpell(Item item, ItemEnchantmentEffect effect) { item.OwningCharacter.RemoveProcHandler(handler => handler.ProcSpell != null && handler.ProcSpell.Id == effect.Misc); }
private static void RemoveDamage(Item item, ItemEnchantmentEffect effect) { var owner = item.OwningCharacter; owner.RemoveDamageDoneMod(DamageSchool.Physical, effect.MaxAmount); owner.UpdateAllDamages(); }
private static void RemoveCombatSpell(Item item, ItemEnchantmentEffect effect) { item.OwningCharacter.RemoveProcHandler(handler => handler.ProcSpell != null && handler.ProcSpell.Id == effect.Misc); }
private static void RemoveResistance(Item item, ItemEnchantmentEffect effect) { item.OwningCharacter.RemoveResistanceBuff((DamageSchool)effect.Misc, effect.MaxAmount); }
private static void RemoveDamageFromItem(Item item, ItemEnchantmentEffect effect) { item.BonusDamage -= effect.MaxAmount; if (item.IsEquippedItem) { item.Container.Owner.UpdateDamage((InventorySlot)item.Slot); } }
private static void RemoveTotem(Item item, ItemEnchantmentEffect effect) { }
private static void DoNothing(Item item, ItemEnchantmentEffect effect) { }
/// <summary> /// Removes the given EnchantEffect from the given Item and the wearer of the Item /// </summary> /// <param name="item"></param> /// <param name="effect"></param> internal static void RemoveEffect(Item item, ItemEnchantmentEffect effect) { RemoveEnchantHandlers[(uint)effect.Type](item, effect); }
private static void ApplyEquipSpell(Item item, ItemEnchantmentEffect effect) { var owner = item.OwningCharacter; var spell = SpellHandler.Get((SpellId)effect.Misc); if (spell == null) { LogManager.GetCurrentClassLogger().Warn("{0} had invalid SpellId: {1}", effect, (SpellId)effect.Misc); return; } SpellCast.ValidateAndTriggerNew(spell, owner, owner, null, item); }