From 796cf40f877aabeecf14b649955adc222a7cab21 Mon Sep 17 00:00:00 2001 From: Lynx3d Date: Tue, 23 Nov 2010 15:31:47 +0100 Subject: [PATCH] [10779] Allow ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL to proc on special attacks too. --- src/game/Spell.cpp | 7 ++++++- src/shared/revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 78734c91a..12a5f8c57 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1054,6 +1054,11 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) if (m_canTrigger && missInfo != SPELL_MISS_REFLECT) caster->ProcDamageAndSpell(unitTarget, real_caster ? procAttacker : PROC_FLAG_NONE, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo); + // trigger weapon enchants for weapon based spells; exclude spells that stop attack, because may break CC + if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON && + !(m_spellInfo->Attributes & SPELL_ATTR_STOP_ATTACK_TARGET)) + ((Player*)m_caster)->CastItemCombatSpell(unitTarget, m_attackType); + // Haunt (NOTE: for avoid use additional field damage stored in dummy value (replace unused 100%) // apply before deal damage because aura can be removed at target kill if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellIconID == 3172 && @@ -4373,7 +4378,7 @@ SpellCastResult Spell::CheckCast(bool strict) } else if (m_caster == target) { - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->IsInWorld()) + if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->IsInWorld()) { // Additional check for some spells // If 0 spell effect empty - client not send target data (need use selection) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a2984a360..d013af751 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10778" + #define REVISION_NR "10779" #endif // __REVISION_NR_H__