mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Units: dbe3bbefe7 followup
This commit is contained in:
@@ -327,7 +327,7 @@ Unit::Unit(bool isWorldObject) :
|
||||
i_AI(nullptr), i_disabledAI(nullptr), m_AutoRepeatFirstCast(false), m_procDeep(0),
|
||||
m_removedAurasCount(0), i_motionMaster(new MotionMaster(this)), m_combatManager(this),
|
||||
m_vehicle(nullptr), m_vehicleKit(nullptr), m_unitTypeMask(UNIT_MASK_NONE),
|
||||
m_Diminishing(), m_threatManager(this), _lastDamagedTime(0),
|
||||
m_Diminishing(), m_isEngaged(false), m_threatManager(this), _lastDamagedTime(0),
|
||||
m_spellHistory(new SpellHistory(this))
|
||||
{
|
||||
m_objectType |= TYPEMASK_UNIT;
|
||||
|
||||
@@ -2005,6 +2005,9 @@ class TC_GAME_API Unit : public WorldObject
|
||||
virtual void AtEnterCombat() { }
|
||||
virtual void AtExitCombat();
|
||||
|
||||
virtual void AtEngage(Unit* /*target*/) { m_isEngaged = true; }
|
||||
virtual void AtDisengage() { m_isEngaged = false; }
|
||||
|
||||
void InterruptMovementBasedAuras();
|
||||
private:
|
||||
|
||||
@@ -2033,6 +2036,9 @@ class TC_GAME_API Unit : public WorldObject
|
||||
TimeTrackerSmall m_splineSyncTimer;
|
||||
|
||||
DiminishingReturn m_Diminishing[DIMINISHING_MAX];
|
||||
|
||||
// Threat+combat management
|
||||
bool m_isEngaged;
|
||||
// Manage all Units that are threatened by us
|
||||
friend class CombatManager;
|
||||
CombatManager m_combatManager;
|
||||
|
||||
Reference in New Issue
Block a user