fix: Fixes travel restriction messages (#1302)
This commit is contained in:
parent
b03e2efdd6
commit
43d33759df
2 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,6 @@ public class NoTravelSpellsAllowedRegion : DungeonRegion
|
||||||
public override bool CheckTravel(Mobile m, Point3D newLocation, TravelCheckType travelType, out TextDefinition message)
|
public override bool CheckTravel(Mobile m, Point3D newLocation, TravelCheckType travelType, out TextDefinition message)
|
||||||
{
|
{
|
||||||
message = null; // Use default message
|
message = null; // Use default message
|
||||||
return m.AccessLevel > AccessLevel.Player ||
|
return m.AccessLevel > AccessLevel.Player;
|
||||||
travelType is not TravelCheckType.TeleportFrom or TravelCheckType.TeleportTo;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -666,6 +666,7 @@ namespace Server.Spells
|
||||||
|
|
||||||
if (destination?.CheckTravel(caster, loc, type, out message) == false || current?.CheckTravel(caster, loc, type, out message) == false)
|
if (destination?.CheckTravel(caster, loc, type, out message) == false || current?.CheckTravel(caster, loc, type, out message) == false)
|
||||||
{
|
{
|
||||||
|
message ??= InvalidTravelMessage(type);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue