[8957] Implement talent 53754.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Lightguard 2009-12-09 17:59:56 +03:00 committed by VladimirMangos
parent 0ec0f34be7
commit d3ee1ecc3d
2 changed files with 34 additions and 2 deletions

View file

@ -5897,6 +5897,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
void Aura::HandleSpellSpecificBoosts(bool apply)
{
bool at_remove = false; // if spell must be casted at aura remove
uint32 spellId1 = 0;
uint32 spellId2 = 0;
uint32 spellId3 = 0;
@ -5925,6 +5926,37 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
}
break;
}
case SPELLFAMILY_WARLOCK:
if(!apply)
{
// Fear
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000040000000000))
{
Unit* caster = GetCaster();
if(!caster)
return;
Unit::AuraList const& dummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
{
SpellEntry const* dummyEntry = (*itr)->GetSpellProto();
// Improved Fear
if (dummyEntry->SpellFamilyName == SPELLFAMILY_WARLOCK && dummyEntry->SpellIconID == 98)
{
at_remove = true;
switch((*itr)->GetModifier()->m_amount)
{
// Rank 1
case 0: spellId1 = 60946; break;
// Rank 1
case 1: spellId1 = 60947; break;
}
break;
}
}
}
}
break;
case SPELLFAMILY_PRIEST:
switch(GetId())
{
@ -6071,7 +6103,7 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
// prevent aura deletion, specially in multi-boost case
SetInUse(true);
if (apply)
if (apply || at_remove)
{
if (spellId1)
m_target->CastSpell(m_target, spellId1, true, NULL, this);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8956"
#define REVISION_NR "8957"
#endif // __REVISION_NR_H__