[10779] Allow ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL to proc on special attacks too.

This commit is contained in:
Lynx3d 2010-11-23 15:31:47 +01:00
parent 0c85afea79
commit 796cf40f87
2 changed files with 7 additions and 2 deletions

View file

@ -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)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10778"
#define REVISION_NR "10779"
#endif // __REVISION_NR_H__