Skip to content

Commit

Permalink
[8901] Implement rage save part of talent 29723 buff and ranks.
Browse files Browse the repository at this point in the history
Original patch provided by Wojta with improvments from darkstalker.

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

Also add `spell_check` data for code changes.
  • Loading branch information
VladimirMangos committed Dec 1, 2009
1 parent 56e693d commit 7a4f9f8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sql/mangos_spell_check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas
(52042,-1, -1, -1, -1, -1, -1, 10, -1, 0,'Healing Stream Totem', 'Spell::EffectDummy'),
(52308, 0, -1, -1, -1, -1, -1, 3, -1, 0,'Take Sputum Sample', 'Spell::EffectDummy'),
(52308, 0, -1, -1, -1, -1, -1, 3, -1, 1,'Take Sputum Sample', 'Spell::EffectDummy'),
(52437,-1, -1, -1, -1, -1, -1, 6, -1, 0,'Sudden Death', 'Spell::EffectDummy'),
(52752,-1, -1, -1, -1, -1, -1, 10, -1, 0,'Ancestral Awakening', 'Spell::EffectDummy'),
(52759, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Ancestral Awakening', 'Spell::EffectDummy'),
(52845,-1, -1, -1, -1, -1, -1, 3, -1,-1,'Brewfest Mount Transformation (Faction Swap)','Spell::EffectDummy'),
Expand Down Expand Up @@ -438,6 +439,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas
( 0, 9,0x0000000100000000,0x00000000, -1, -1, -1, 2, -1,-1,'Steady Shot', 'Spell::EffectSchoolDMG'),
( 0, 9,0x0000000100000000,0x00000000, -1, -1, -1, 3, -1,-1,'Steady Shot', 'Spell::EffectDummy'),
( 0, 8,0x0000000000400000,0x00000000, -1, -1, -1, -1, -1,-1,'Stealth', 'Spell::EffectTriggerSpell'),
( 0,-1, -1, -1,1989, -1, -1, -1, 42, 0,'Sudden Death', 'Spell::EffectDummy'),
( 0, 7,0x0010000000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Swipe', 'Spell::EffectSchoolDMG'),
( 0, 4,0x0000000000000080,0x00000000, -1, -1, -1, 2, -1,-1,'Thunder Clap', 'Spell::EffectSchoolDMG'),
( 0, 4,0x0000010000000000,0x00000000, -1, -1, -1, 2, -1,-1,'Victory Rush', 'Spell::EffectSchoolDMG'),
Expand Down
21 changes: 20 additions & 1 deletion src/game/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8900"
#define REVISION_NR "8901"
#endif // __REVISION_NR_H__

0 comments on commit 7a4f9f8

Please sign in to comment.