|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <CreatureGroups.h>
Public Member Functions | |
| void | AddMember (Creature *member) |
| CreatureGroup (uint32 id) | |
| void | FormationReset (bool dismiss) |
| uint32 | GetId () const |
| Creature * | getLeader () const |
| bool | isEmpty () const |
| bool | isFormed () const |
| void | LeaderMoveTo (float x, float y, float z) |
| void | MemberAttackStart (Creature *member, Unit *target) |
| void | RemoveMember (Creature *member) |
| ~CreatureGroup () | |
Private Types | |
| typedef std::map< Creature *, FormationInfo * > | CreatureGroupMemberType |
Private Attributes | |
| bool | m_Formed |
| uint32 | m_groupID |
| Creature * | m_leader |
| CreatureGroupMemberType | m_members |
Definition at line 41 of file CreatureGroups.h.
|
private |
Definition at line 45 of file CreatureGroups.h.
|
inlineexplicit |
Definition at line 53 of file CreatureGroups.h.
|
inline |
Definition at line 54 of file CreatureGroups.h.
| void CreatureGroup::AddMember | ( | Creature * | member | ) |
Definition at line 129 of file CreatureGroups.cpp.
References Creature::GetDBTableGUIDLow(), Object::GetGUIDLow(), m_groupID, m_leader, m_members, Creature::SetFormation(), SF_LOG_DEBUG, and sFormationMgr.
Referenced by FormationMgr::AddCreatureToGroup().
| void CreatureGroup::FormationReset | ( | bool | dismiss | ) |
Definition at line 184 of file CreatureGroups.cpp.
References m_Formed, m_leader, m_members, and SF_LOG_DEBUG.
|
inline |
Definition at line 57 of file CreatureGroups.h.
References m_groupID.
Referenced by npc_commandscript::HandleNpcAddFormationCommand(), and FormationMgr::RemoveCreatureFromGroup().
|
inline |
Definition at line 56 of file CreatureGroups.h.
References m_leader.
Referenced by RandomMovementGenerator< T >::_setRandomLocation(), and WaypointMovementGenerator< Creature >::StartMove().
|
inline |
Definition at line 58 of file CreatureGroups.h.
References m_members.
Referenced by FormationMgr::RemoveCreatureFromGroup().
|
inline |
Definition at line 59 of file CreatureGroups.h.
References m_Formed.
| void CreatureGroup::LeaderMoveTo | ( | float | x, |
| float | y, | ||
| float | z ) |
To do: This should probably get its own movement generator or use WaypointMovementGenerator. If the leader's path is known, member's path can be plotted as well using formation offsets.
Definition at line 200 of file CreatureGroups.cpp.
References Unit::GetMotionMaster(), Unit::GetVictim(), Unit::IsAlive(), WorldObject::IsWithinDist(), m_leader, m_members, M_PI, MAX_DESYNC, MotionMaster::MovePoint(), Skyfire::NormalizeMapCoord(), Creature::SetHomePosition(), Unit::SetUnitMovementFlags(), Unit::SetWalk(), and WorldObject::UpdateGroundPositionZ().
Referenced by RandomMovementGenerator< T >::_setRandomLocation(), and WaypointMovementGenerator< Creature >::StartMove().
Definition at line 153 of file CreatureGroups.cpp.
References Creature::AI(), UnitAI::AttackStart(), Creature::GetDBTableGUIDLow(), WorldObject::GetInstanceId(), Unit::GetVictim(), Unit::IsAlive(), Unit::IsValidAttackTarget(), m_leader, m_members, SF_LOG_DEBUG, and sFormationMgr.
| void CreatureGroup::RemoveMember | ( | Creature * | member | ) |
Definition at line 144 of file CreatureGroups.cpp.
References m_leader, m_members, and Creature::SetFormation().
Referenced by FormationMgr::RemoveCreatureFromGroup().
|
private |
Definition at line 49 of file CreatureGroups.h.
Referenced by CreatureGroup(), FormationReset(), and isFormed().
|
private |
Definition at line 48 of file CreatureGroups.h.
Referenced by AddMember(), CreatureGroup(), and GetId().
|
private |
Definition at line 44 of file CreatureGroups.h.
Referenced by AddMember(), CreatureGroup(), FormationReset(), getLeader(), LeaderMoveTo(), MemberAttackStart(), and RemoveMember().
|
private |
Definition at line 46 of file CreatureGroups.h.
Referenced by AddMember(), FormationReset(), isEmpty(), LeaderMoveTo(), MemberAttackStart(), and RemoveMember().