Esempio n. 1
0
 private static void RemoveDamageFromItem(Item item, ItemEnchantmentEffect effect)
 {
     item.BonusDamage -= effect.MaxAmount;
     if (item.IsEquippedItem)
     {
         item.Container.Owner.UpdateDamage((InventorySlot)item.Slot);
     }
 }
Esempio n. 2
0
 private static void ApplyDamageToItem(Item item, ItemEnchantmentEffect effect)
 {
     item.BonusDamage += effect.MaxAmount;
     if (!item.IsEquippedItem)
     {
         return;
     }
     item.Container.Owner.UpdateDamage((InventorySlot)item.Slot);
 }
Esempio n. 3
0
 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);
     });
 }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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));
            }
        }
Esempio n. 6
0
        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);
            }
        }
Esempio n. 7
0
		private static void ApplyTotem(Item item, ItemEnchantmentEffect effect)
		{

		}
Esempio n. 8
0
		private static void ApplyEquipSpell(Item item, ItemEnchantmentEffect effect)
		{
			var owner = item.OwningCharacter;
			owner.SpellCast.Trigger((SpellId)effect.Misc, owner);
		}
Esempio n. 9
0
		private static void ApplyDamage(Item item, ItemEnchantmentEffect effect)
		{
			var owner = item.OwningCharacter;
			owner.AddDamageDoneMod(DamageSchool.Physical, effect.MaxAmount);
		}
Esempio n. 10
0
		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));
			}
		}
Esempio n. 11
0
		private static void DoNothing(Item item, ItemEnchantmentEffect effect)
		{
		}
Esempio n. 12
0
 /// <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);
 }
Esempio n. 13
0
		private static void RemoveEquipSpell(Item item, ItemEnchantmentEffect effect)
		{
			item.OwningCharacter.Auras.Cancel((SpellId)effect.Misc);
		}
Esempio n. 14
0
		/// <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);
		}
Esempio n. 15
0
		private static void RemoveStat(Item item, ItemEnchantmentEffect effect)
		{
			item.OwningCharacter.RemoveStatMod((ItemModType)effect.Misc, effect.MaxAmount);
		}
Esempio n. 16
0
 private static void RemoveTotem(Item item, ItemEnchantmentEffect effect)
 {
 }
Esempio n. 17
0
 private static void RemoveStat(Item item, ItemEnchantmentEffect effect)
 {
     item.OwningCharacter.RemoveStatMod((ItemModType)effect.Misc, effect.MaxAmount);
 }
Esempio n. 18
0
 private static void RemoveEquipSpell(Item item, ItemEnchantmentEffect effect)
 {
     item.OwningCharacter.Auras.Remove((SpellId)effect.Misc);
 }
Esempio n. 19
0
 /// <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);
 }
Esempio n. 20
0
 private static void ApplyTotem(Item item, ItemEnchantmentEffect effect)
 {
 }
Esempio n. 21
0
		private static void RemoveCombatSpell(Item item, ItemEnchantmentEffect effect)
		{
			item.OwningCharacter.RemoveProcHandler(handler =>
				handler.ProcSpell != null && handler.ProcSpell.Id == effect.Misc);
		}
Esempio n. 22
0
		private static void RemoveDamage(Item item, ItemEnchantmentEffect effect)
		{
			var owner = item.OwningCharacter;
			owner.RemoveDamageDoneMod(DamageSchool.Physical, effect.MaxAmount);
			owner.UpdateAllDamages();
		}
Esempio n. 23
0
 private static void RemoveCombatSpell(Item item, ItemEnchantmentEffect effect)
 {
     item.OwningCharacter.RemoveProcHandler(handler =>
                                            handler.ProcSpell != null && handler.ProcSpell.Id == effect.Misc);
 }
Esempio n. 24
0
		private static void RemoveResistance(Item item, ItemEnchantmentEffect effect)
		{
			item.OwningCharacter.RemoveResistanceBuff((DamageSchool)effect.Misc, effect.MaxAmount);
		}
Esempio n. 25
0
		private static void RemoveDamageFromItem(Item item, ItemEnchantmentEffect effect)
		{
			item.BonusDamage -= effect.MaxAmount;
			if (item.IsEquippedItem)
			{
				item.Container.Owner.UpdateDamage((InventorySlot)item.Slot);
			}
		}
Esempio n. 26
0
		private static void RemoveTotem(Item item, ItemEnchantmentEffect effect)
		{

		}
Esempio n. 27
0
 private static void DoNothing(Item item, ItemEnchantmentEffect effect)
 {
 }
Esempio n. 28
0
		/// <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);
		}
Esempio n. 29
0
		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);
		}