diff options
author | Shauren <shauren.trinity@gmail.com> | 2021-02-27 01:44:44 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-02-27 01:44:44 +0100 |
commit | ec9f5be6a657003a94f95b4e4067a37a9f113c7c (patch) | |
tree | a1c3117f4f9cf3a32975000e29855041c05cdeaf /src/server/game/Phasing/PhaseShift.h | |
parent | c9344c145ad1f981492c35d4aad7ca7a60e9f8f2 (diff) |
Core/Phasing: Implemented setting personal guid on PhaseShift
Diffstat (limited to 'src/server/game/Phasing/PhaseShift.h')
-rw-r--r-- | src/server/game/Phasing/PhaseShift.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/server/game/Phasing/PhaseShift.h b/src/server/game/Phasing/PhaseShift.h index 0fadbcc42df..133f58056a2 100644 --- a/src/server/game/Phasing/PhaseShift.h +++ b/src/server/game/Phasing/PhaseShift.h @@ -81,11 +81,9 @@ public: typename Container::iterator Iterator; bool Erased; }; - typedef boost::container::flat_set<PhaseRef> PhaseContainer; - typedef std::map<uint32, VisibleMapIdRef> VisibleMapIdContainer; - typedef std::map<uint32, UiMapPhaseIdRef> UiMapPhaseIdContainer; - - PhaseShift() : Flags(PhaseShiftFlags::Unphased), NonCosmeticReferences(0), CosmeticReferences(0), DefaultReferences(0), IsDbPhaseShift(false) { } + using PhaseContainer = boost::container::flat_set<PhaseRef>; + using VisibleMapIdContainer = std::map<uint32, VisibleMapIdRef>; + using UiMapPhaseIdContainer = std::map<uint32, UiMapPhaseIdRef>; bool AddPhase(uint32 phaseId, PhaseFlags flags, std::vector<Condition*> const* areaConditions, int32 references = 1); EraseResult<PhaseContainer> RemovePhase(uint32 phaseId); @@ -100,7 +98,7 @@ public: bool AddUiMapPhaseId(uint32 uiMapPhaseId, int32 references = 1); EraseResult<UiMapPhaseIdContainer> RemoveUiMapPhaseId(uint32 uiMapPhaseId); bool HasUiMapPhaseId(uint32 uiMapPhaseId) const { return UiMapPhaseIds.find(uiMapPhaseId) != UiMapPhaseIds.end(); } - UiMapPhaseIdContainer const& GetUiWorldMapAreaIdSwaps() const { return UiMapPhaseIds; } + UiMapPhaseIdContainer const& GetUiMapPhaseIds() const { return UiMapPhaseIds; } void Clear(); void ClearPhases(); @@ -110,7 +108,7 @@ public: protected: friend class PhasingHandler; - EnumFlag<PhaseShiftFlags> Flags; + EnumFlag<PhaseShiftFlags> Flags = PhaseShiftFlags::Unphased; ObjectGuid PersonalGuid; PhaseContainer Phases; VisibleMapIdContainer VisibleMapIds; @@ -118,10 +116,12 @@ protected: void ModifyPhasesReferences(PhaseContainer::iterator itr, int32 references); void UpdateUnphasedFlag(); - int32 NonCosmeticReferences; - int32 CosmeticReferences; - int32 DefaultReferences; - bool IsDbPhaseShift; + void UpdatePersonalGuid(); + int32 NonCosmeticReferences = 0; + int32 CosmeticReferences = 0; + int32 PersonalReferences = 0; + int32 DefaultReferences = 0; + bool IsDbPhaseShift = false; }; #endif // PhaseShift_h__ |