aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Phasing/PhaseShift.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Phasing/PhaseShift.h')
-rw-r--r--src/server/game/Phasing/PhaseShift.h22
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__