aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Combat/HostileRefManager.h
diff options
context:
space:
mode:
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