aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f79adb2b232..90c8ffaae63 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -7366,30 +7366,16 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (procSpell->SpellIconID != 2019)
return false;
- AuraEffect* aurEffA = NULL;
- AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE);
- for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
+ if (Creature* totem = GetMap()->GetCreature(m_SummonSlot[1])) // Fire totem summon slot
{
- SpellInfo const* spell = (*i)->GetSpellInfo();
- if (spell->SpellFamilyName == uint32(SPELLFAMILY_SHAMAN) && spell->SpellFamilyFlags.HasFlag(0, 0x02000000, 0))
+ if (SpellInfo const* totemSpell = sSpellMgr->GetSpellInfo(totem->m_spells[0]))
{
- if ((*i)->GetCasterGUID() != GetGUID())
- continue;
- if (spell->Id == 63283)
- continue;
- aurEffA = (*i);
- break;
+ int32 bp0 = CalculatePctN(totemSpell->Effects[EFFECT_0].CalcValue(), triggerAmount);
+ int32 bp1 = CalculatePctN(totemSpell->Effects[EFFECT_1].CalcValue(), triggerAmount);
+ CastCustomSpell(this, 63283, &bp0, &bp1, NULL, true);
+ return true;
}
}
- if (aurEffA)
- {
- int32 bp0 = 0, bp1 = 0;
- bp0 = CalculatePctN(triggerAmount, aurEffA->GetAmount());
- if (AuraEffect* aurEffB = aurEffA->GetBase()->GetEffect(EFFECT_1))
- bp1 = CalculatePctN(triggerAmount, aurEffB->GetAmount());
- CastCustomSpell(this, 63283, &bp0, &bp1, NULL, true, NULL, triggeredByAura);
- return true;
- }
return false;
}
break;