[10466] Proper reset threat rediraction for existed spells.

In 3.5.5a this is: 34477, 57934, 59665 and triggered spells.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Toinan67 2010-09-11 01:04:45 +04:00 committed by VladimirMangos
parent 88cc2d440f
commit 4d30b464b4
3 changed files with 23 additions and 1 deletions

View file

@ -71,6 +71,12 @@ class HostileRefManager : public RefManager<Unit, ThreatManager>
m_redirectionMod = pct/100.0f; m_redirectionMod = pct/100.0f;
} }
void ResetThreatRedirection()
{
m_redirectionTargetGuid.Clear();
m_redirectionMod = 0.0f;
}
float GetThreatRedirectionMod() const { return m_redirectionMod; } float GetThreatRedirectionMod() const { return m_redirectionMod; }
Unit* GetThreatRedirectionTarget() const; Unit* GetThreatRedirectionTarget() const;

View file

@ -2214,6 +2214,22 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
return; return;
} }
case 34477: // Misdirection, main spell
case 57934: // Tricks of the Trade, main spell
{
if (m_removeMode != AURA_REMOVE_BY_DEFAULT) // used for direct in code aura removes
if (Unit* pCaster = GetCaster())
pCaster->getHostileRefManager().ResetThreatRedirection();
return;
}
case 35079: // Misdirection, triggered buff
case 59628: // Tricks of the Trade, triggered buff
case 59665: // Vigilance, redirection spell
{
if (Unit* pCaster = GetCaster())
pCaster->getHostileRefManager().ResetThreatRedirection();
return;
}
case 36730: // Flame Strike case 36730: // Flame Strike
{ {
target->CastSpell(target, 36731, true, NULL, this); target->CastSpell(target, 36731, true, NULL, this);

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 "10465" #define REVISION_NR "10466"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__