mirror of
https://github.com/mangosfour/server.git
synced 2025-12-30 01:37:03 +00:00
[11766] fix spell redirection and totem destruction on hit by redirected spell
This commit is contained in:
parent
61f31980cf
commit
c60425c6bd
11 changed files with 73 additions and 26 deletions
|
|
@ -128,7 +128,7 @@ pAuraProcHandler AuraProcHandler[TOTAL_AURAS]=
|
|||
&Unit::HandleNULLProc, // 93 SPELL_AURA_MOD_UNATTACKABLE
|
||||
&Unit::HandleNULLProc, // 94 SPELL_AURA_INTERRUPT_REGEN
|
||||
&Unit::HandleNULLProc, // 95 SPELL_AURA_GHOST
|
||||
&Unit::HandleNULLProc, // 96 SPELL_AURA_SPELL_MAGNET
|
||||
&Unit::HandleSpellMagnetAuraProc, // 96 SPELL_AURA_SPELL_MAGNET
|
||||
&Unit::HandleManaShieldAuraProc, // 97 SPELL_AURA_MANA_SHIELD
|
||||
&Unit::HandleNULLProc, // 98 SPELL_AURA_MOD_SKILL_TALENT
|
||||
&Unit::HandleNULLProc, // 99 SPELL_AURA_MOD_ATTACK_POWER
|
||||
|
|
@ -3974,6 +3974,20 @@ SpellAuraProcResult Unit::HandleModRating(Unit* /*pVictim*/, uint32 /*damage*/,
|
|||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
||||
SpellAuraProcResult Unit::HandleSpellMagnetAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
|
||||
{
|
||||
if (triggeredByAura->GetId() == 8178) // Grounding Totem Effect
|
||||
{
|
||||
// for spells that doesn't do damage but need to destroy totem anyway
|
||||
if ((!damage || damage < GetHealth()) && GetTypeId() == TYPEID_UNIT && ((Creature*)this)->IsTotem())
|
||||
{
|
||||
DealDamage(this, GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
}
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
||||
SpellAuraProcResult Unit::HandleManaShieldAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
|
||||
{
|
||||
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue