fix: respect active region MountsAllowed for players (#2630)

A player can mount a horse or validate an ethereal mount inside a BaseRegion that overrides MountsAllowed to false because CheckMountAllowed never consults that property. This adds the missing check in the shared player permission path, using existing localized message 1042317.
This commit is contained in:
Robert Dickey 2026-09-11 19:26:06 -05:00 • committed by GitHub
parent c9831b9680
commit 51d2e998fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 103 additions and 0 deletions

View file

@ -3,6 +3,7 @@ using System;
using Server.Items;
using Server.Misc;
using Server.Multis;
using Server.Regions;
using Server.Targeting;
namespace Server.Mobiles;
@ -286,6 +287,12 @@ public abstract partial class BaseMount : BaseCreature, IMount
if (mob is PlayerMobile mobile)
{
if (mobile.Region is BaseRegion { MountsAllowed: false })
{
mobile.SendLocalizedMessage(1042317); // You may not ride at this time
result = false;
}
if (mobile.MountBlockReason != BlockMountType.None)
{
mobile.SendLocalizedMessage((int)mobile.MountBlockReason);