mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user