Fixes some phasing issuses.

This commit is contained in:
hondacrx
2022-07-25 14:03:51 -04:00
parent e4f31667a8
commit 9278f0b3c7
4 changed files with 11 additions and 5 deletions
+7 -1
View File
@@ -161,7 +161,13 @@ namespace Game
{
ObjectGuid ownerGuid = PersonalGuid;
ObjectGuid otherPersonalGuid = other.PersonalGuid;
return Phases.Intersect(other.Phases, (myPhase, otherPhase) => !myPhase.Value.Flags.HasAnyFlag(excludePhasesWithFlag) && (!myPhase.Value.Flags.HasFlag(PhaseFlags.Personal) || ownerGuid == otherPersonalGuid)).Any();
return Phases.Intersect(other.Phases, (myPhase, otherPhase) =>
{
if (myPhase.Key != otherPhase.Key)
return false;
return !myPhase.Value.Flags.HasAnyFlag(excludePhasesWithFlag) && (!myPhase.Value.Flags.HasFlag(PhaseFlags.Personal) || ownerGuid == otherPersonalGuid);
}).Any();
}
var checkInversePhaseShift = new Func<PhaseShift, PhaseShift, bool>((phaseShift, excludedPhaseShift) =>
+2 -2
View File
@@ -618,9 +618,9 @@ namespace Game
phases.Append(" ");
phases.Append($"{pair.Key} ({Global.ObjectMgr.GetPhaseName(pair.Key)})'");
if (pair.Value.Flags.HasFlag(PhaseFlags.Cosmetic))
phases.Append(' ' + '(' + cosmetic + ')');
phases.Append($" ({cosmetic})");
if (pair.Value.Flags.HasFlag(PhaseFlags.Personal))
phases.Append(' ' + '(' + personal + ')');
phases.Append($" ({personal})");
}
chat.SendSysMessage(CypherStrings.PhaseshiftPhases, phases.ToString());