mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
refactor(Core/Movement): follower management of references (#25060)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
|
||||
#include "EnumFlag.h"
|
||||
#include "EventProcessor.h"
|
||||
#include "FollowerRefMgr.h"
|
||||
#include "FollowerReference.h"
|
||||
#include "HostileRefMgr.h"
|
||||
#include "ItemTemplate.h"
|
||||
#include "MotionMaster.h"
|
||||
@@ -74,6 +72,7 @@ class MotionTransport;
|
||||
class Vehicle;
|
||||
class TransportBase;
|
||||
class SpellCastTargets;
|
||||
class AbstractFollower;
|
||||
|
||||
typedef std::list<Unit*> UnitList;
|
||||
typedef std::list< std::pair<Aura*, uint8> > DispelChargesList;
|
||||
@@ -1881,9 +1880,9 @@ public:
|
||||
[[nodiscard]] bool IsInDisallowedMountForm() const;
|
||||
|
||||
// Followers
|
||||
void AddFollower(FollowerReference* ref) { m_FollowingRefMgr.insertFirst(ref); }
|
||||
void FollowerAdded(AbstractFollower* f) { m_followingMe.insert(f); }
|
||||
void FollowerRemoved(AbstractFollower* f) { m_followingMe.erase(f); }
|
||||
[[nodiscard]] virtual float GetFollowAngle() const { return static_cast<float>(M_PI / 2); }
|
||||
void RemoveFollower(FollowerReference* /*ref*/ ) { /* nothing to do yet */ }
|
||||
void RemoveAllFollowers();
|
||||
|
||||
// Pets, guardians, minions...
|
||||
@@ -2229,7 +2228,7 @@ private:
|
||||
// Manage all Units that are threatened by us
|
||||
HostileRefMgr m_HostileRefMgr;
|
||||
|
||||
FollowerRefMgr m_FollowingRefMgr;
|
||||
std::unordered_set<AbstractFollower*> m_followingMe;
|
||||
|
||||
Unit* m_comboTarget;
|
||||
int8 m_comboPoints;
|
||||
|
||||
Reference in New Issue
Block a user