![]() |
TrinityCore
|
#include <CreatureGroups.h>
Public Member Functions | |
| CreatureGroup (ObjectGuid::LowType leaderSpawnId) | |
| ~CreatureGroup () | |
| Creature * | GetLeader () const |
| ObjectGuid::LowType | GetLeaderSpawnId () const |
| bool | IsEmpty () const |
| bool | IsFormed () const |
| bool | IsLeader (Creature const *creature) const |
| bool | HasMember (Creature *member) const |
| void | AddMember (Creature *member) |
| void | RemoveMember (Creature *member) |
| void | FormationReset (bool dismiss) |
| void | LeaderStartedMoving () |
| void | MemberEngagingTarget (Creature *member, Unit *target) |
| bool | CanLeaderStartMoving () const |
Private Attributes | |
| Creature * | _leader |
| std::unordered_map< Creature *, FormationInfo * > | _members |
| ObjectGuid::LowType | _leaderSpawnId |
| bool | _formed |
| bool | _engaging |
Definition at line 69 of file CreatureGroups.h.
|
explicit |
Definition at line 192 of file CreatureGroups.cpp.
| CreatureGroup::~CreatureGroup | ( | ) |
Definition at line 196 of file CreatureGroups.cpp.
| void CreatureGroup::AddMember | ( | Creature * | member | ) |
Definition at line 200 of file CreatureGroups.cpp.
References _leader, _leaderSpawnId, _members, ASSERT_NOTNULL, Object::GetGUID(), Creature::GetSpawnId(), Creature::SetFormation(), sFormationMgr, TC_LOG_DEBUG, and ObjectGuid::ToString().
| bool CreatureGroup::CanLeaderStartMoving | ( | ) | const |
Definition at line 298 of file CreatureGroups.cpp.
References _leader, _members, and Unit::IsAlive().
Referenced by Creature::IsFormationLeaderMoveAllowed().
| void CreatureGroup::FormationReset | ( | bool | dismiss | ) |
Definition at line 262 of file CreatureGroups.cpp.
References _formed, _leader, _members, FORMATION_MOTION_TYPE, Unit::IsAlive(), MOTION_SLOT_DEFAULT, and TC_LOG_DEBUG.
Referenced by Creature::Motion_Initialize(), and Creature::setDeathState().
|
inline |
Definition at line 84 of file CreatureGroups.h.
Referenced by SmartAI::JustReachedHome(), Creature::Motion_Initialize(), and Creature::setDeathState().
|
inline |
Definition at line 85 of file CreatureGroups.h.
Referenced by npc_commandscript::HandleNpcAddFormationCommand(), and FormationMgr::RemoveCreatureFromGroup().
|
inline |
Definition at line 90 of file CreatureGroups.h.
|
inline |
Definition at line 86 of file CreatureGroups.h.
Referenced by FormationMgr::RemoveCreatureFromGroup().
|
inline |
Definition at line 87 of file CreatureGroups.h.
Referenced by SmartAI::JustReachedHome(), Creature::Motion_Initialize(), and npc_cameron::UpdateAI().
|
inline |
Definition at line 88 of file CreatureGroups.h.
Referenced by Creature::IsFormationLeader(), and Creature::SignalFormationMovement().
| void CreatureGroup::LeaderStartedMoving | ( | ) |
Definition at line 279 of file CreatureGroups.cpp.
References _leader, _members, FLAG_IDLE_IN_FORMATION, Unit::GetMotionMaster(), Unit::HasUnitState(), Unit::IsAlive(), Creature::IsEngaged(), M_PI, MotionMaster::MoveFormation(), and UNIT_STATE_FOLLOW_FORMATION.
Referenced by Creature::SignalFormationMovement().
Definition at line 226 of file CreatureGroups.cpp.
References _engaging, _leader, _members, ASSERT_NOTNULL, Unit::EngageWithTarget(), FLAG_LEADER_ASSISTS_MEMBER, FLAG_MEMBERS_ASSIST_LEADER, Creature::GetSpawnId(), Unit::IsAlive(), WorldObject::IsValidAttackTarget(), and sFormationMgr.
| void CreatureGroup::RemoveMember | ( | Creature * | member | ) |
Definition at line 217 of file CreatureGroups.cpp.
References _leader, _members, and Creature::SetFormation().
Referenced by FormationMgr::RemoveCreatureFromGroup().
|
private |
Definition at line 77 of file CreatureGroups.h.
Referenced by MemberEngagingTarget().
|
private |
Definition at line 76 of file CreatureGroups.h.
Referenced by FormationReset().
|
private |
Definition at line 72 of file CreatureGroups.h.
Referenced by AddMember(), CanLeaderStartMoving(), FormationReset(), LeaderStartedMoving(), MemberEngagingTarget(), and RemoveMember().
|
private |
Definition at line 75 of file CreatureGroups.h.
Referenced by AddMember().
|
private |
Definition at line 73 of file CreatureGroups.h.
Referenced by AddMember(), CanLeaderStartMoving(), FormationReset(), LeaderStartedMoving(), MemberEngagingTarget(), and RemoveMember().