mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[10779] Allow ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL to proc on special attacks too.
This commit is contained in:
parent
0c85afea79
commit
796cf40f87
2 changed files with 7 additions and 2 deletions
|
|
@ -1054,6 +1054,11 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||||
if (m_canTrigger && missInfo != SPELL_MISS_REFLECT)
|
if (m_canTrigger && missInfo != SPELL_MISS_REFLECT)
|
||||||
caster->ProcDamageAndSpell(unitTarget, real_caster ? procAttacker : PROC_FLAG_NONE, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo);
|
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%)
|
// 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
|
// apply before deal damage because aura can be removed at target kill
|
||||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellIconID == 3172 &&
|
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellIconID == 3172 &&
|
||||||
|
|
@ -4373,7 +4378,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
}
|
}
|
||||||
else if (m_caster == target)
|
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
|
// Additional check for some spells
|
||||||
// If 0 spell effect empty - client not send target data (need use selection)
|
// If 0 spell effect empty - client not send target data (need use selection)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10778"
|
#define REVISION_NR "10779"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue