[7476] Implement druid's talent 61336.

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

Some improvements added to patch. Related cleanups.
This commit is contained in:
Lightguard 2009-03-17 01:25:11 +03:00 committed by VladimirMangos
parent c99a849eb9
commit bde638ace7
4 changed files with 59 additions and 20 deletions

View file

@ -4305,6 +4305,20 @@ SpellCastResult Spell::CheckCast(bool strict)
{
switch(m_spellInfo->EffectApplyAuraName[i])
{
case SPELL_AURA_DUMMY:
{
//custom check
switch(m_spellInfo->Id)
{
case 61336:
if(m_caster->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm())
return SPELL_FAILED_ONLY_SHAPESHIFT;
break;
default:
break;
}
break;
}
case SPELL_AURA_MOD_POSSESS:
case SPELL_AURA_MOD_CHARM:
{

View file

@ -2259,6 +2259,45 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
case SPELLFAMILY_DRUID:
{
switch(GetId())
{
case 34246: // Idol of the Emerald Queen
{
if (m_target->GetTypeId() != TYPEID_PLAYER)
return;
if(apply)
{
SpellModifier *mod = new SpellModifier;
mod->op = SPELLMOD_DOT;
mod->value = m_modifier.m_amount/7;
mod->type = SPELLMOD_FLAT;
mod->spellId = GetId();
mod->mask = 0x001000000000LL;
mod->mask2= 0LL;
m_spellmod = mod;
}
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
return;
}
case 61336: // Survival Instincts
{
if(apply)
{
if (!m_target->IsInFeralForm())
return;
int32 bp0 = int32(m_target->GetMaxHealth() * m_modifier.m_amount / 100);
m_target->CastCustomSpell(m_target, 50322, &bp0, NULL, NULL, true);
}
else
m_target-> RemoveAurasDueToSpell(50322);
return;
}
}
// Lifebloom
if ( GetSpellProto()->SpellFamilyFlags & 0x1000000000LL )
{
@ -2298,25 +2337,6 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
((Player*)m_target)->UpdateAttackPowerAndDamage();
return;
}
// Idol of the Emerald Queen
if ( GetId() == 34246 && m_target->GetTypeId()==TYPEID_PLAYER )
{
if(apply)
{
SpellModifier *mod = new SpellModifier;
mod->op = SPELLMOD_DOT;
mod->value = m_modifier.m_amount/7;
mod->type = SPELLMOD_FLAT;
mod->spellId = GetId();
mod->mask = 0x001000000000LL;
mod->mask2= 0LL;
m_spellmod = mod;
}
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
return;
}
break;
}
case SPELLFAMILY_HUNTER:
@ -4691,6 +4711,7 @@ void Aura::HandleAuraModIncreaseHealth(bool apply, bool Real)
case 28726: // Nightmare Seed ( Nightmare Seed )
case 34511: // Valor (Bulwark of Kings, Bulwark of the Ancient Kings)
case 44055: // Tremendous Fortitude (Battlemaster's Alacrity)
case 50322: // Survival Instincts
{
if(Real)
{

View file

@ -1336,6 +1336,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
// Cat Energy (Feral T4 (2)) and Omen of Clarity
if( spellInfo_1->Id == 16864 && spellInfo_2->Id == 37311 || spellInfo_2->Id == 16864 && spellInfo_1->Id == 37311 )
return false;
// Survival Instincts and Survival Instincts
if( spellInfo_1->Id == 61336 && spellInfo_2->Id == 50322 || spellInfo_2->Id == 61336 && spellInfo_1->Id == 50322 )
return false;
}
// Leader of the Pack and Scroll of Stamina (multi-family check)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7475"
#define REVISION_NR "7476"
#endif // __REVISION_NR_H__