![]() |
TrinityCore
|
#include <CombatManager.h>
Public Types | |
| using | UnitFilter = bool(Unit const *otherUnit) |
Public Member Functions | |
| CombatManager (Unit *owner) | |
| ~CombatManager () | |
| void | Update (uint32 tdiff) |
| Unit * | GetOwner () const |
| bool | HasCombat () const |
| bool | HasPvECombat () const |
| bool | HasPvECombatWithPlayers () const |
| std::unordered_map< ObjectGuid, CombatReference * > const & | GetPvECombatRefs () const |
| bool | HasPvPCombat () const |
| std::unordered_map< ObjectGuid, PvPCombatReference * > const & | GetPvPCombatRefs () const |
| Unit * | GetAnyTarget () const |
| bool | SetInCombatWith (Unit *who, bool addSecondUnitSuppressed=false) |
| bool | IsInCombatWith (ObjectGuid const &who) const |
| bool | IsInCombatWith (Unit const *who) const |
| void | InheritCombatStatesFrom (Unit const *who) |
| void | EndCombatBeyondRange (float range, bool includingPvP=false) |
| void | SuppressPvPCombat (UnitFilter *unitFilter=nullptr) |
| void | EndAllPvECombat (UnitFilter *unitFilter=nullptr) |
| void | RevalidateCombat () |
| void | EndAllPvPCombat (UnitFilter *unitFilter=nullptr) |
| void | EndAllCombat (UnitFilter *unitFilter=nullptr) |
| CombatManager (CombatManager const &)=delete | |
| CombatManager & | operator= (CombatManager const &)=delete |
Static Public Member Functions | |
| static bool | CanBeginCombat (Unit const *a, Unit const *b) |
Private Member Functions | |
| void | PutReference (ObjectGuid const &guid, CombatReference *ref) |
| void | PurgeReference (ObjectGuid const &guid, bool pvp) |
| bool | UpdateOwnerCombatState () const |
Static Private Member Functions | |
| static void | NotifyAICombat (Unit *me, Unit *other) |
Private Attributes | |
| Unit *const | _owner |
| std::unordered_map< ObjectGuid, CombatReference * > | _pveRefs |
| std::unordered_map< ObjectGuid, PvPCombatReference * > | _pvpRefs |
Friends | |
| struct | CombatReference |
| struct | PvPCombatReference |
Definition at line 98 of file CombatManager.h.
| using CombatManager::UnitFilter = bool(Unit const* otherUnit) |
Definition at line 124 of file CombatManager.h.
| CombatManager::CombatManager | ( | Unit * | owner | ) |
Definition at line 129 of file CombatManager.cpp.
| CombatManager::~CombatManager | ( | ) |
|
delete |
Definition at line 24 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
| void CombatManager::EndAllPvECombat | ( | UnitFilter * | unitFilter = nullptr | ) |
Definition at line 313 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void CombatManager::EndAllPvPCombat | ( | UnitFilter * | unitFilter = nullptr | ) |
| void CombatManager::EndCombatBeyondRange | ( | float | range, |
| bool | includingPvP = false |
||
| ) |
Definition at line 270 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Unit * CombatManager::GetAnyTarget | ( | ) | const |
|
inline |
Definition at line 107 of file CombatManager.h.
|
inline |
|
inline |
|
inline |
| bool CombatManager::HasPvECombat | ( | ) | const |
| bool CombatManager::HasPvECombatWithPlayers | ( | ) | const |
| bool CombatManager::HasPvPCombat | ( | ) | const |
| void CombatManager::InheritCombatStatesFrom | ( | Unit const * | who | ) |
Definition at line 246 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool CombatManager::IsInCombatWith | ( | ObjectGuid const & | who | ) | const |
| bool CombatManager::IsInCombatWith | ( | Unit const * | who | ) | const |
Definition at line 370 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
delete |
|
private |
|
private |
Definition at line 376 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void CombatManager::RevalidateCombat | ( | ) |
Definition at line 329 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool CombatManager::SetInCombatWith | ( | Unit * | who, |
| bool | addSecondUnitSuppressed = false |
||
| ) |
Definition at line 191 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void CombatManager::SuppressPvPCombat | ( | UnitFilter * | unitFilter = nullptr | ) |
Definition at line 302 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void CombatManager::Update | ( | uint32 | tdiff | ) |
Definition at line 139 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 400 of file CombatManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
Definition at line 145 of file CombatManager.h.
|
friend |
Definition at line 146 of file CombatManager.h.
|
private |
Definition at line 141 of file CombatManager.h.
|
private |
Definition at line 142 of file CombatManager.h.
|
private |
Definition at line 143 of file CombatManager.h.