From c07b1bfc554fa06f6b364f5e33db1a88f37eb6b1 Mon Sep 17 00:00:00 2001 From: WarrentyExpired Date: Thu, 27 Aug 2026 22:18:41 -0400 Subject: [PATCH] #W# Automount fix. --- Data/Config/Regions.xml | 2 ++ Scripts/Commands/RetrieveMount.cs | 6 +++++- Scripts/Regions/InnRegion.cs | 13 +++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Data/Config/Regions.xml b/Data/Config/Regions.xml index eae5730..a69cf53 100644 --- a/Data/Config/Regions.xml +++ b/Data/Config/Regions.xml @@ -30,6 +30,8 @@ + + diff --git a/Scripts/Commands/RetrieveMount.cs b/Scripts/Commands/RetrieveMount.cs index 49c2952..24056c7 100644 --- a/Scripts/Commands/RetrieveMount.cs +++ b/Scripts/Commands/RetrieveMount.cs @@ -34,7 +34,11 @@ namespace Server.Commands if (pm.Mounted) return; - + if (pm.Region.IsPartOf(typeof(Server.Regions.InnRegion)) || + pm.Region.IsPartOf(typeof(Server.Regions.HouseRegion))) + { + return; + } BaseCreature mountToRetrieve = null; for (int i = pm.Stabled.Count - 1; i >= 0; i--) diff --git a/Scripts/Regions/InnRegion.cs b/Scripts/Regions/InnRegion.cs index 2558682..4711e0f 100644 --- a/Scripts/Regions/InnRegion.cs +++ b/Scripts/Regions/InnRegion.cs @@ -1,6 +1,7 @@ using System; using System.Xml; using Server; +using Server.Mobiles; namespace Server.Regions { @@ -27,11 +28,23 @@ namespace Server.Regions public override void OnEnter( Mobile m ) { base.OnEnter( m ); + if ( m != null && m.Player ) + { + Server.Commands.StableMountCommand.ForceDismountAndStore((PlayerMobile)m); + } + if ( m != null && m.Player ) + { + m.SendMessage( "Welcome to {0}", this.Name ); + } } public override void OnExit( Mobile m ) { base.OnExit( m ); + if ( m != null && m.Player ) + { + Server.Commands.RetrieveMountCommand.AutoRemountPlayer((PlayerMobile)m); + } } } }