fix: Fixes travel restriction messages (#1302)

This commit is contained in:
Kamron Batman 2022-12-13 16:47:04 -08:00 committed by GitHub
parent b03e2efdd6
commit 43d33759df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,6 @@ public class NoTravelSpellsAllowedRegion : DungeonRegion
public override bool CheckTravel(Mobile m, Point3D newLocation, TravelCheckType travelType, out TextDefinition message)
{
message = null; // Use default message
return m.AccessLevel > AccessLevel.Player ||
travelType is not TravelCheckType.TeleportFrom or TravelCheckType.TeleportTo;
return m.AccessLevel > AccessLevel.Player;
}
}

View file

@ -666,6 +666,7 @@ namespace Server.Spells
if (destination?.CheckTravel(caster, loc, type, out message) == false || current?.CheckTravel(caster, loc, type, out message) == false)
{
message ??= InvalidTravelMessage(type);
return false;
}
}