Core/Phasing: Implemented db spawns in personal phases

Port From (https://github.com/TrinityCore/TrinityCore/commit/8fabe5a3aacf7797f03d074ab8434f445be64955)
This commit is contained in:
hondacrx
2022-01-27 14:01:49 -05:00
parent 6c0e21b4de
commit 7531735669
18 changed files with 555 additions and 123 deletions
+13
View File
@@ -230,6 +230,15 @@ namespace Game
PersonalGuid.Clear();
}
public bool HasPersonalPhase()
{
foreach (PhaseRef phaseRef in GetPhases().Values)
if (phaseRef.IsPersonal())
return true;
return false;
}
public bool HasPhase(uint phaseId) { return Phases.ContainsKey(phaseId); }
public Dictionary<uint, PhaseRef> GetPhases() { return Phases; }
@@ -239,6 +248,8 @@ namespace Game
public bool HasUiWorldMapAreaIdSwap(uint uiWorldMapAreaId) { return UiMapPhaseIds.ContainsKey(uiWorldMapAreaId); }
public Dictionary<uint, UiMapPhaseIdRef> GetUiMapPhaseIds() { return UiMapPhaseIds; }
public ObjectGuid GetPersonalGuid() { return PersonalGuid; }
public PhaseShiftFlags Flags = PhaseShiftFlags.Unphased;
public ObjectGuid PersonalGuid;
public Dictionary<uint, PhaseRef> Phases = new();
@@ -261,6 +272,8 @@ namespace Game
AreaConditions = conditions;
}
public bool IsPersonal() { return Flags.HasFlag(PhaseFlags.Personal); }
public PhaseFlags Flags;
public int References;
public List<Condition> AreaConditions;