aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Combat/HostileRefManager.h
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-10-06 23:14:51 -0300
committerariel- <ariel-@users.noreply.github.com>2016-10-06 23:14:51 -0300
commit3b6fd226bedb689847dadaeeba36a588ee9bc928 (patch)
tree150c771b9981e66adb69fae74b1a17873b0d7014 /src/server/game/Combat/HostileRefManager.h
parentf6788b78a6d5237c86ec5ff8c087a0d630f3afeb (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
Diffstat (limited to 'src/server/game/Combat/HostileRefManager.h')
-rw-r--r--src/server/game/Combat/HostileRefManager.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h
index 855f9e3d272..859bee3caf7 100644
--- a/src/server/game/Combat/HostileRefManager.h
+++ b/src/server/game/Combat/HostileRefManager.h
@@ -31,18 +31,16 @@ class SpellInfo;
class TC_GAME_API HostileRefManager : public RefManager<Unit, ThreatManager>
{
- private:
- Unit* iOwner;
public:
- explicit HostileRefManager(Unit* owner) { iOwner = owner; }
+ explicit HostileRefManager(Unit* owner) : iOwner(owner) { }
~HostileRefManager();
- Unit* GetOwner() { return iOwner; }
+ Unit* GetOwner() const { return iOwner; }
// send threat to all my hateres for the victim
// The victim is hated than by them as well
// use for buffs and healing threat functionality
- void threatAssist(Unit* victim, float baseThreat, SpellInfo const* threatSpell = NULL);
+ void threatAssist(Unit* victim, float baseThreat, SpellInfo const* threatSpell = nullptr);
void addTempThreat(float threat, bool apply);
@@ -68,6 +66,9 @@ class TC_GAME_API HostileRefManager : public RefManager<Unit, ThreatManager>
void deleteReference(Unit* creature);
void UpdateVisibility();
+
+ private:
+ Unit* iOwner;
};
//=================================================
#endif