Fixes some phasing issuses.
This commit is contained in:
@@ -85,7 +85,7 @@ namespace Game.Chat
|
|||||||
[Command("despawngroup", RBACPermissions.CommandGobjectDespawngroup)]
|
[Command("despawngroup", RBACPermissions.CommandGobjectDespawngroup)]
|
||||||
static bool HandleGameObjectDespawnGroup(CommandHandler handler, string[] opts)
|
static bool HandleGameObjectDespawnGroup(CommandHandler handler, string[] opts)
|
||||||
{
|
{
|
||||||
if (opts.Empty())
|
if (opts == null || opts.Empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool deleteRespawnTimes = false;
|
bool deleteRespawnTimes = false;
|
||||||
|
|||||||
@@ -161,7 +161,13 @@ namespace Game
|
|||||||
{
|
{
|
||||||
ObjectGuid ownerGuid = PersonalGuid;
|
ObjectGuid ownerGuid = PersonalGuid;
|
||||||
ObjectGuid otherPersonalGuid = other.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) =>
|
var checkInversePhaseShift = new Func<PhaseShift, PhaseShift, bool>((phaseShift, excludedPhaseShift) =>
|
||||||
|
|||||||
@@ -618,9 +618,9 @@ namespace Game
|
|||||||
phases.Append(" ");
|
phases.Append(" ");
|
||||||
phases.Append($"{pair.Key} ({Global.ObjectMgr.GetPhaseName(pair.Key)})'");
|
phases.Append($"{pair.Key} ({Global.ObjectMgr.GetPhaseName(pair.Key)})'");
|
||||||
if (pair.Value.Flags.HasFlag(PhaseFlags.Cosmetic))
|
if (pair.Value.Flags.HasFlag(PhaseFlags.Cosmetic))
|
||||||
phases.Append(' ' + '(' + cosmetic + ')');
|
phases.Append($" ({cosmetic})");
|
||||||
if (pair.Value.Flags.HasFlag(PhaseFlags.Personal))
|
if (pair.Value.Flags.HasFlag(PhaseFlags.Personal))
|
||||||
phases.Append(' ' + '(' + personal + ')');
|
phases.Append($" ({personal})");
|
||||||
}
|
}
|
||||||
|
|
||||||
chat.SendSysMessage(CypherStrings.PhaseshiftPhases, phases.ToString());
|
chat.SendSysMessage(CypherStrings.PhaseshiftPhases, phases.ToString());
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace Game
|
|||||||
|
|
||||||
if (!mapIds.IsEmpty() && worldState.MapIds.Empty())
|
if (!mapIds.IsEmpty() && worldState.MapIds.Empty())
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "Table `world_state` contains a world state {id} with nonempty MapIDs ({mapIds}) but no valid map id was found, ignored");
|
Log.outError(LogFilter.Sql, $"Table `world_state` contains a world state {id} with nonempty MapIDs ({mapIds}) but no valid map id was found, ignored");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user