Пример #1
0
 private static void RemoveDamageFromItem(Item item, ItemEnchantmentEffect effect)
 {
     item.BonusDamage -= effect.MaxAmount;
     if (item.IsEquippedItem)
     {
         item.Container.Owner.UpdateDamage((InventorySlot)item.Slot);
     }
 }
Пример #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);
 }
Пример #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);
     });
 }
Пример #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);
        }
Пример #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));
            }
        }
Пример #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);
            }
        }
Пример #7
0
		private static void ApplyTotem(Item item, ItemEnchantmentEffect effect)
		{

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

		}
Пример #27
0
 private static void DoNothing(Item item, ItemEnchantmentEffect effect)
 {
 }
Пример #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);
		}
Пример #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);
		}