Core/Spell : Glyph of Totem of Wrath

Spell bonus granted by glyph should calculated based from summoned totem, not from player's aura
This commit is contained in:
Xanvial
2012-05-14 12:15:57 +07:00
parent e74135946d
commit 25f1c5a51d
+6 -20
View File
@@ -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;