diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2016-10-06 23:14:51 -0300 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-08-21 21:49:36 +0200 |
| commit | ec3dc0a43101dcbe2e469891acf0b654106eccfc (patch) | |
| tree | 88f8c416d14b54fc5a71ba7f7cdb039aa66af44c /src/server/game/Combat/HostileRefManager.cpp | |
| parent | ab916fd1b37ca39071c2253be68e60ac2a735ada (diff) | |
Core/Misc: fix interaction of spells like Shadowmeld with Threat reducing effects
- SPELL_AURA_MOD_TOTAL_THREAT should be temporary and not added/subtracted from total, only computed
- Cleanup of reference related code
- Kill getLast() and reverse iterator obsevers, LinkedList iterator can't be used as a standard reverse_iterator (ie with operator++). They weren't used anyways
(cherry picked from commit 3b6fd226bedb689847dadaeeba36a588ee9bc928)
# Conflicts:
# src/server/game/Combat/ThreatManager.cpp
# src/server/game/Loot/LootMgr.h
Diffstat (limited to 'src/server/game/Combat/HostileRefManager.cpp')
| -rw-r--r-- | src/server/game/Combat/HostileRefManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp index 2c977f61941..e6153f0acff 100644 --- a/src/server/game/Combat/HostileRefManager.cpp +++ b/src/server/game/Combat/HostileRefManager.cpp @@ -28,8 +28,8 @@ HostileRefManager::~HostileRefManager() } //================================================= -// send threat to all my hateres for the victim -// The victim is hated than by them as well +// send threat to all my haters for the victim +// The victim is then hated by them as well // use for buffs and healing threat functionality void HostileRefManager::threatAssist(Unit* victim, float baseThreat, SpellInfo const* threatSpell) @@ -37,9 +37,10 @@ void HostileRefManager::threatAssist(Unit* victim, float baseThreat, SpellInfo c if (getSize() == 0) return; - HostileReference* ref = getFirst(); float threat = ThreatCalcHelper::calcThreat(victim, iOwner, baseThreat, (threatSpell ? threatSpell->GetSchoolMask() : SPELL_SCHOOL_MASK_NORMAL), threatSpell); threat /= getSize(); + + HostileReference* ref = getFirst(); while (ref) { if (ThreatCalcHelper::isValidProcess(victim, ref->GetSource()->GetOwner(), threatSpell)) @@ -54,7 +55,6 @@ void HostileRefManager::threatAssist(Unit* victim, float baseThreat, SpellInfo c void HostileRefManager::addTempThreat(float threat, bool apply) { HostileReference* ref = getFirst(); - while (ref) { if (apply) |
