[8901] Implement rage save part of talent 29723 buff and ranks.

Original patch provided by Wojta with improvments from darkstalker.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also add `spell_check` data for code changes.
This commit is contained in:
VladimirMangos 2009-12-01 16:33:00 +03:00
parent a8bd659872
commit 68581bd918
3 changed files with 23 additions and 2 deletions

View file

@ -1450,7 +1450,26 @@ void Spell::EffectDummy(uint32 i)
m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
m_caster->CastCustomSpell(unitTarget, 20647, &basePoints0, NULL, NULL, true, 0);
m_caster->SetPower(POWER_RAGE, m_caster->GetPower(POWER_RAGE)-rage);
// Sudden Death
if(m_caster->HasAura(52437))
{
Unit::AuraList const& auras = m_caster->GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
// Only Sudden Death have this SpellIconID with SPELL_AURA_PROC_TRIGGER_SPELL
if ((*itr)->GetSpellProto()->SpellIconID == 1989)
{
// saved rage top stored in next affect
uint32 lastrage = (*itr)->GetSpellProto()->CalculateSimpleValue(1);
if(lastrage < rage)
rage -= lastrage;
break;
}
}
}
m_caster->SetPower(POWER_RAGE,m_caster->GetPower(POWER_RAGE)-rage);
return;
}
// Slam