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:
@@ -7366,30 +7366,16 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||||||
if (procSpell->SpellIconID != 2019)
|
if (procSpell->SpellIconID != 2019)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
AuraEffect* aurEffA = NULL;
|
if (Creature* totem = GetMap()->GetCreature(m_SummonSlot[1])) // Fire totem summon slot
|
||||||
AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE);
|
|
||||||
for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
|
|
||||||
{
|
{
|
||||||
SpellInfo const* spell = (*i)->GetSpellInfo();
|
if (SpellInfo const* totemSpell = sSpellMgr->GetSpellInfo(totem->m_spells[0]))
|
||||||
if (spell->SpellFamilyName == uint32(SPELLFAMILY_SHAMAN) && spell->SpellFamilyFlags.HasFlag(0, 0x02000000, 0))
|
|
||||||
{
|
{
|
||||||
if ((*i)->GetCasterGUID() != GetGUID())
|
int32 bp0 = CalculatePctN(totemSpell->Effects[EFFECT_0].CalcValue(), triggerAmount);
|
||||||
continue;
|
int32 bp1 = CalculatePctN(totemSpell->Effects[EFFECT_1].CalcValue(), triggerAmount);
|
||||||
if (spell->Id == 63283)
|
CastCustomSpell(this, 63283, &bp0, &bp1, NULL, true);
|
||||||
continue;
|
return true;
|
||||||
aurEffA = (*i);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user