diff options
Diffstat (limited to 'src/game/Unit.h')
| -rw-r--r-- | src/game/Unit.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h index ff2826c3b44..98b30e75d31 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -842,7 +842,7 @@ struct AuraSlotEntry struct SpellProcEventEntry; // used only privately -typedef std::set<uint64> GuardianList; +typedef std::set<Unit*> ControlList; class TRINITY_DLL_SPEC Unit : public WorldObject { @@ -1200,13 +1200,17 @@ class TRINITY_DLL_SPEC Unit : public WorldObject } Player* GetCharmerOrOwnerPlayerOrPlayerItself() const; - void SetPet(Pet* pet); - void SetCharm(Unit* pet); + void SetPet(Creature* target, bool apply); + void SetCharm(Unit* target, bool apply); Unit* GetNextRandomRaidMemberOrPet(float radius); void SetCharmedOrPossessedBy(Unit* charmer, bool possess); void RemoveCharmedOrPossessedBy(Unit* charmer); void RestoreFaction(); + ControlList m_Controlled; + Unit* GetFirstControlled() const; + void RemoveAllControlled(); + bool isCharmed() const { return GetCharmerGUID() != 0; } bool isPossessed() const { return hasUnitState(UNIT_STAT_POSSESSED); } bool isPossessedByPlayer() const { return hasUnitState(UNIT_STAT_POSSESSED) && IS_PLAYER_GUID(GetCharmerGUID()); } @@ -1310,10 +1314,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject uint32 m_detectInvisibilityMask; uint32 m_invisibilityMask; - GuardianList m_Guardians; - void RemoveGuardians(); - void AddGuardian(Unit* pet) { m_Guardians.insert(pet->GetGUID()); } - uint32 m_ShapeShiftFormSpellId; ShapeshiftForm m_form; bool IsInFeralForm() const { return m_form == FORM_CAT || m_form == FORM_BEAR || m_form == FORM_DIREBEAR; } |
