mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
refactor(Core/Creature): More functions capitalized (#10012)
* GetLeader * IsFormed * build
This commit is contained in:
@@ -993,12 +993,12 @@ void Creature::Motion_Initialize()
|
||||
{
|
||||
if (!m_formation)
|
||||
GetMotionMaster()->Initialize();
|
||||
else if (m_formation->getLeader() == this)
|
||||
else if (m_formation->GetLeader() == this)
|
||||
{
|
||||
m_formation->FormationReset(false, true);
|
||||
GetMotionMaster()->Initialize();
|
||||
}
|
||||
else if (m_formation->isFormed())
|
||||
else if (m_formation->IsFormed())
|
||||
GetMotionMaster()->MoveIdle(); //wait the order of leader
|
||||
else
|
||||
GetMotionMaster()->Initialize();
|
||||
@@ -1849,7 +1849,7 @@ void Creature::setDeathState(DeathState s, bool despawn)
|
||||
}
|
||||
|
||||
//Dismiss group if is leader
|
||||
if (m_formation && m_formation->getLeader() == this)
|
||||
if (m_formation && m_formation->GetLeader() == this)
|
||||
m_formation->FormationReset(true, false);
|
||||
|
||||
bool needsFalling = !despawn && (IsFlying() || IsHovering()) && !IsUnderWater();
|
||||
|
||||
@@ -91,10 +91,12 @@ public:
|
||||
explicit CreatureGroup(uint32 id) : m_leader(nullptr), m_groupID(id), m_Formed(false) {}
|
||||
~CreatureGroup() {}
|
||||
|
||||
Creature* getLeader() const { return m_leader; }
|
||||
Creature* GetLeader() const { return m_leader; }
|
||||
uint32 GetId() const { return m_groupID; }
|
||||
|
||||
bool IsEmpty() const { return m_members.empty(); }
|
||||
bool isFormed() const { return m_Formed; }
|
||||
bool IsFormed() const { return m_Formed; }
|
||||
|
||||
const CreatureGroupMemberType& GetMembers() const { return m_members; }
|
||||
|
||||
void AddMember(Creature* member);
|
||||
|
||||
Reference in New Issue
Block a user