TrinityCore
PhaseShift Class Reference

#include <PhaseShift.h>

Classes

struct  EraseResult
 
struct  PhaseRef
 
struct  UiMapPhaseIdRef
 
struct  VisibleMapIdRef
 

Public Types

using PhaseContainer = Trinity::Containers::FlatSet< PhaseRef >
 
using VisibleMapIdContainer = std::map< uint32, VisibleMapIdRef >
 
using UiMapPhaseIdContainer = std::map< uint32, UiMapPhaseIdRef >
 

Public Member Functions

 PhaseShift ()
 
 PhaseShift (PhaseShift const &right)
 
 PhaseShift (PhaseShift &&right) noexcept
 
PhaseShiftoperator= (PhaseShift const &right)
 
PhaseShiftoperator= (PhaseShift &&right) noexcept
 
 ~PhaseShift ()
 
ObjectGuid GetPersonalGuid () const
 
bool AddPhase (uint32 phaseId, PhaseFlags flags, std::vector< Condition > const *areaConditions, int32 references=1)
 
EraseResult< PhaseContainerRemovePhase (uint32 phaseId)
 
bool HasPhase (uint32 phaseId) const
 
PhaseContainer const & GetPhases () const
 
bool AddVisibleMapId (uint32 visibleMapId, TerrainSwapInfo const *visibleMapInfo, int32 references=1)
 
EraseResult< VisibleMapIdContainerRemoveVisibleMapId (uint32 visibleMapId)
 
bool HasVisibleMapId (uint32 visibleMapId) const
 
VisibleMapIdContainer const & GetVisibleMapIds () const
 
bool AddUiMapPhaseId (uint32 uiMapPhaseId, int32 references=1)
 
EraseResult< UiMapPhaseIdContainerRemoveUiMapPhaseId (uint32 uiMapPhaseId)
 
bool HasUiMapPhaseId (uint32 uiMapPhaseId) const
 
UiMapPhaseIdContainer const & GetUiMapPhaseIds () const
 
void Clear ()
 
void ClearPhases ()
 
bool CanSee (PhaseShift const &other) const
 
bool HasPersonalPhase () const
 

Protected Member Functions

void ModifyPhasesReferences (PhaseContainer::iterator itr, int32 references)
 
void UpdateUnphasedFlag ()
 
void UpdatePersonalGuid ()
 

Protected Attributes

EnumFlag< PhaseShiftFlagsFlags = PhaseShiftFlags::Unphased
 
ObjectGuid PersonalGuid
 
PhaseContainer Phases
 
VisibleMapIdContainer VisibleMapIds
 
UiMapPhaseIdContainer UiMapPhaseIds
 
int32 NonCosmeticReferences = 0
 
int32 CosmeticReferences = 0
 
int32 PersonalReferences = 0
 
int32 DefaultReferences = 0
 
bool IsDbPhaseShift = false
 

Friends

class PhasingHandler
 

Detailed Description

Definition at line 54 of file PhaseShift.h.

Member Typedef Documentation

◆ PhaseContainer

◆ UiMapPhaseIdContainer

Definition at line 87 of file PhaseShift.h.

◆ VisibleMapIdContainer

Definition at line 86 of file PhaseShift.h.

Constructor & Destructor Documentation

◆ PhaseShift() [1/3]

PhaseShift::PhaseShift ( )
default

◆ PhaseShift() [2/3]

PhaseShift::PhaseShift ( PhaseShift const &  right)
default

◆ PhaseShift() [3/3]

PhaseShift::PhaseShift ( PhaseShift &&  right)
defaultnoexcept

◆ ~PhaseShift()

PhaseShift::~PhaseShift ( )
default

Member Function Documentation

◆ AddPhase()

bool PhaseShift::AddPhase ( uint32  phaseId,
PhaseFlags  flags,
std::vector< Condition > const *  areaConditions,
int32  references = 1 
)

Definition at line 28 of file PhaseShift.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddUiMapPhaseId()

bool PhaseShift::AddUiMapPhaseId ( uint32  uiMapPhaseId,
int32  references = 1 
)

Definition at line 70 of file PhaseShift.cpp.

+ Here is the caller graph for this function:

◆ AddVisibleMapId()

bool PhaseShift::AddVisibleMapId ( uint32  visibleMapId,
TerrainSwapInfo const *  visibleMapInfo,
int32  references = 1 
)

Definition at line 51 of file PhaseShift.cpp.

+ Here is the caller graph for this function:

◆ CanSee()

bool PhaseShift::CanSee ( PhaseShift const &  other) const

Definition at line 108 of file PhaseShift.cpp.

+ Here is the call graph for this function:

◆ Clear()

void PhaseShift::Clear ( )

Definition at line 89 of file PhaseShift.cpp.

+ Here is the call graph for this function:

◆ ClearPhases()

void PhaseShift::ClearPhases ( )

Definition at line 96 of file PhaseShift.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPersonalGuid()

ObjectGuid PhaseShift::GetPersonalGuid ( ) const
inline

Definition at line 96 of file PhaseShift.h.

+ Here is the caller graph for this function:

◆ GetPhases()

PhaseContainer const & PhaseShift::GetPhases ( ) const
inline

Definition at line 101 of file PhaseShift.h.

+ Here is the caller graph for this function:

◆ GetUiMapPhaseIds()

UiMapPhaseIdContainer const & PhaseShift::GetUiMapPhaseIds ( ) const
inline

Definition at line 111 of file PhaseShift.h.

◆ GetVisibleMapIds()

VisibleMapIdContainer const & PhaseShift::GetVisibleMapIds ( ) const
inline

Definition at line 106 of file PhaseShift.h.

◆ HasPersonalPhase()

bool PhaseShift::HasPersonalPhase ( ) const

Definition at line 197 of file PhaseShift.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasPhase()

bool PhaseShift::HasPhase ( uint32  phaseId) const
inline

Definition at line 100 of file PhaseShift.h.

+ Here is the caller graph for this function:

◆ HasUiMapPhaseId()

bool PhaseShift::HasUiMapPhaseId ( uint32  uiMapPhaseId) const
inline

Definition at line 110 of file PhaseShift.h.

◆ HasVisibleMapId()

bool PhaseShift::HasVisibleMapId ( uint32  visibleMapId) const
inline

Definition at line 105 of file PhaseShift.h.

+ Here is the caller graph for this function:

◆ ModifyPhasesReferences()

void PhaseShift::ModifyPhasesReferences ( PhaseContainer::iterator  itr,
int32  references 
)
protected

Definition at line 155 of file PhaseShift.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

PhaseShift & PhaseShift::operator= ( PhaseShift &&  right)
defaultnoexcept

◆ operator=() [2/2]

PhaseShift & PhaseShift::operator= ( PhaseShift const &  right)
default

◆ RemovePhase()

PhaseShift::EraseResult< PhaseShift::PhaseContainer > PhaseShift::RemovePhase ( uint32  phaseId)

Definition at line 38 of file PhaseShift.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveUiMapPhaseId()

PhaseShift::EraseResult< PhaseShift::UiMapPhaseIdContainer > PhaseShift::RemoveUiMapPhaseId ( uint32  uiMapPhaseId)

Definition at line 77 of file PhaseShift.cpp.

+ Here is the caller graph for this function:

◆ RemoveVisibleMapId()

PhaseShift::EraseResult< PhaseShift::VisibleMapIdContainer > PhaseShift::RemoveVisibleMapId ( uint32  visibleMapId)

Definition at line 58 of file PhaseShift.cpp.

◆ UpdatePersonalGuid()

void PhaseShift::UpdatePersonalGuid ( )
protected

Definition at line 191 of file PhaseShift.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateUnphasedFlag()

void PhaseShift::UpdateUnphasedFlag ( )
protected

Definition at line 181 of file PhaseShift.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ PhasingHandler

friend class PhasingHandler
friend

Definition at line 121 of file PhaseShift.h.

Member Data Documentation

◆ CosmeticReferences

int32 PhaseShift::CosmeticReferences = 0
protected

Definition at line 133 of file PhaseShift.h.

◆ DefaultReferences

int32 PhaseShift::DefaultReferences = 0
protected

Definition at line 135 of file PhaseShift.h.

◆ Flags

EnumFlag<PhaseShiftFlags> PhaseShift::Flags = PhaseShiftFlags::Unphased
protected

Definition at line 123 of file PhaseShift.h.

◆ IsDbPhaseShift

bool PhaseShift::IsDbPhaseShift = false
protected

Definition at line 136 of file PhaseShift.h.

◆ NonCosmeticReferences

int32 PhaseShift::NonCosmeticReferences = 0
protected

Definition at line 132 of file PhaseShift.h.

◆ PersonalGuid

ObjectGuid PhaseShift::PersonalGuid
protected

Definition at line 124 of file PhaseShift.h.

◆ PersonalReferences

int32 PhaseShift::PersonalReferences = 0
protected

Definition at line 134 of file PhaseShift.h.

◆ Phases

PhaseContainer PhaseShift::Phases
protected

Definition at line 125 of file PhaseShift.h.

◆ UiMapPhaseIds

UiMapPhaseIdContainer PhaseShift::UiMapPhaseIds
protected

Definition at line 127 of file PhaseShift.h.

◆ VisibleMapIds

VisibleMapIdContainer PhaseShift::VisibleMapIds
protected

Definition at line 126 of file PhaseShift.h.


The documentation for this class was generated from the following files: