Change temp threat aura mods to use temp threat modifier instead of "asisting" it's threat value over all references.

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-01-21 16:25:09 +01:00
parent 3b29a4e6f4
commit 76102c1cdd
4 changed files with 30 additions and 4 deletions

View File

@@ -51,6 +51,27 @@ void HostilRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry con
}
}
//=================================================
void HostilRefManager::addTempThreat(float fThreat, bool apply)
{
HostilReference* ref = getFirst();
while(ref != NULL)
{
if (apply)
{
if (ref->getTempThreatModifier() == 0.0f)
ref->addTempThreat(fThreat);
}
else
ref->resetTempThreat();
ref = ref->next();
}
}
//=================================================
void HostilRefManager::addThreatPercent(int32 iPercent)