[8363] Implement spell 52610.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Sarjuuk 2009-08-13 19:26:32 +04:00 committed by VladimirMangos
parent acc922a11a
commit fdfc235faa
3 changed files with 27 additions and 9 deletions

View file

@ -2377,6 +2377,19 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
((Player*)m_target)->AddSpellMod(m_spellmod, apply); ((Player*)m_target)->AddSpellMod(m_spellmod, apply);
return; return;
} }
case 52610: // Savage Roar
{
if(apply)
{
if(m_target->m_form != FORM_CAT)
return;
m_target->CastSpell(m_target, 62071, true);
}
else
m_target-> RemoveAurasDueToSpell(62071);
return;
}
case 61336: // Survival Instincts case 61336: // Survival Instincts
{ {
if(apply) if(apply)
@ -5356,7 +5369,9 @@ void Aura::HandleShapeshiftBoosts(bool apply)
uint32 HotWSpellId = 0; uint32 HotWSpellId = 0;
uint32 MasterShaperSpellId = 0; uint32 MasterShaperSpellId = 0;
switch(GetModifier()->m_miscvalue) uint32 form = GetModifier()->m_miscvalue;
switch(form)
{ {
case FORM_CAT: case FORM_CAT:
spellId = 3025; spellId = 3025;
@ -5428,8 +5443,6 @@ void Aura::HandleShapeshiftBoosts(bool apply)
break; break;
} }
uint32 form = GetModifier()->m_miscvalue-1;
if(apply) if(apply)
{ {
if (spellId) m_target->CastSpell(m_target, spellId, true, NULL, this ); if (spellId) m_target->CastSpell(m_target, spellId, true, NULL, this );
@ -5445,7 +5458,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR_PASSIVE | (1<<7)))) if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR_PASSIVE | (1<<7))))
continue; continue;
if (spellInfo->Stances & (1<<form)) if (spellInfo->Stances & (1<<(form-1)))
m_target->CastSpell(m_target, itr->first, true, NULL, this); m_target->CastSpell(m_target, itr->first, true, NULL, this);
} }
@ -5468,10 +5481,14 @@ void Aura::HandleShapeshiftBoosts(bool apply)
if (((Player*)m_target)->HasSpell(17007)) if (((Player*)m_target)->HasSpell(17007))
{ {
SpellEntry const *spellInfo = sSpellStore.LookupEntry(24932); SpellEntry const *spellInfo = sSpellStore.LookupEntry(24932);
if (spellInfo && spellInfo->Stances & (1<<form)) if (spellInfo && spellInfo->Stances & (1<<(form-1)))
m_target->CastSpell(m_target, 24932, true, NULL, this); m_target->CastSpell(m_target, 24932, true, NULL, this);
} }
// Savage Roar
if (((Player*)m_target)->HasAura(52610) && form == FORM_CAT)
m_target->CastSpell(m_target, 62071, true);
// Heart of the Wild // Heart of the Wild
if (HotWSpellId) if (HotWSpellId)
{ {
@ -5509,9 +5526,6 @@ void Aura::HandleShapeshiftBoosts(bool apply)
++itr; ++itr;
} }
} }
/*double healthPercentage = (double)m_target->GetHealth() / (double)m_target->GetMaxHealth();
m_target->SetHealth(uint32(ceil((double)m_target->GetMaxHealth() * healthPercentage)));*/
} }
void Aura::HandleSpellSpecificBoosts(bool apply) void Aura::HandleSpellSpecificBoosts(bool apply)

View file

@ -1414,6 +1414,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
// Survival Instincts and Survival Instincts // Survival Instincts and Survival Instincts
if( spellInfo_1->Id == 61336 && spellInfo_2->Id == 50322 || spellInfo_2->Id == 61336 && spellInfo_1->Id == 50322 ) if( spellInfo_1->Id == 61336 && spellInfo_2->Id == 50322 || spellInfo_2->Id == 61336 && spellInfo_1->Id == 50322 )
return false; return false;
// Savage Roar and Savage Roar (triggered)
if (spellInfo_1->SpellIconID == 2865 && spellInfo_2->SpellIconID == 2865)
return false;
} }
// Leader of the Pack and Scroll of Stamina (multi-family check) // Leader of the Pack and Scroll of Stamina (multi-family check)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8362" #define REVISION_NR "8363"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__