diff --git a/Scripts/Commands/Generic/Commands/Commands.cs b/Scripts/Commands/Generic/Commands/Commands.cs index adc231c1d..543a14651 100644 --- a/Scripts/Commands/Generic/Commands/Commands.cs +++ b/Scripts/Commands/Generic/Commands/Commands.cs @@ -59,7 +59,6 @@ namespace Server.Commands.Generic Register( new Factions.FactionKickCommand( Factions.FactionKickType.Unban ) ); Register( new BringToPackCommand() ); Register( new TraceLockdownCommand() ); - Register( new TraceStabledCommand() ); } private static List m_AllCommands = new List(); @@ -1119,46 +1118,4 @@ namespace Server.Commands.Generic LogFailure( "No house was found." ); } } - - public class TraceStabledCommand : BaseCommand - { - public TraceStabledCommand() - { - AccessLevel = AccessLevel.Administrator; - Supports = CommandSupport.Simple; - Commands = new string[] { "TraceStabled" }; - ObjectTypes = ObjectTypes.Mobiles; - Usage = "TraceStabled"; - Description = "Shows all mobiles that have a targeted pet in their stable."; - } - - public override void Execute( CommandEventArgs e, object obj ) - { - BaseCreature bc = obj as BaseCreature; - - if ( bc == null ) - { - LogFailure( "That is not a pet." ); - } - else if ( !bc.IsStabled ) - { - LogFailure( "That pet is not stabled." ); - } - else - { - ArrayList list = new ArrayList(); - - foreach ( Mobile m in World.Mobiles.Values ) - { - if ( m.Stabled.Contains( bc ) ) - list.Add( m ); - } - - if ( list.Count == 0 ) - LogFailure( "No mobiles were found." ); - else - e.Mobile.SendGump( new InterfaceGump( e.Mobile, new string[] { "Object" }, list, 0, null ) ); - } - } - } } diff --git a/Scripts/Commands/ShardTime.cs b/Scripts/Commands/ShardTime.cs index ff70c321d..8e46723f6 100644 --- a/Scripts/Commands/ShardTime.cs +++ b/Scripts/Commands/ShardTime.cs @@ -2,7 +2,7 @@ namespace Server.Commands { - public class Time + public class ShardTime { public static void Initialize() { @@ -13,7 +13,7 @@ namespace Server.Commands [Description( "Returns the server's local time." )] private static void Time_OnCommand( CommandEventArgs e ) { - e.Mobile.SendMessage( DateTime.UtcNow.ToString( "MMM ddd d HH:mm yyyy" ) ); + e.Mobile.SendMessage( DateTime.Now.ToString() ); } } } \ No newline at end of file diff --git a/Scripts/Items/Special/Solen Items/BallOfSummoning.cs b/Scripts/Items/Special/Solen Items/BallOfSummoning.cs index 0cfcab0f5..eeef1b454 100644 --- a/Scripts/Items/Special/Solen Items/BallOfSummoning.cs +++ b/Scripts/Items/Special/Solen Items/BallOfSummoning.cs @@ -295,6 +295,7 @@ namespace Server.Items pet.ControlOrder = OrderType.Follow; pet.IsStabled = false; + pet.StabledBy = null; from.Stabled.Remove( pet ); if ( from is PlayerMobile ) diff --git a/Scripts/Mobiles/BaseCreature.cs b/Scripts/Mobiles/BaseCreature.cs index 1b07a1979..3e1382ba6 100644 --- a/Scripts/Mobiles/BaseCreature.cs +++ b/Scripts/Mobiles/BaseCreature.cs @@ -237,6 +237,7 @@ namespace Server.Mobiles private List m_Friends; private bool m_IsStabled; + private Mobile m_StabledBy; private bool m_HasGeneratedLoot; // have we generated our loot yet? @@ -268,6 +269,13 @@ namespace Server.Mobiles } } + [CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )] + public Mobile StabledBy + { + get { return m_StabledBy; } + set { m_StabledBy = value; } + } + [CommandProperty( AccessLevel.GameMaster )] public bool IsPrisoner { diff --git a/Scripts/Mobiles/PlayerMobile.cs b/Scripts/Mobiles/PlayerMobile.cs index 6f3623e2b..75594b28e 100644 --- a/Scripts/Mobiles/PlayerMobile.cs +++ b/Scripts/Mobiles/PlayerMobile.cs @@ -3044,7 +3044,10 @@ namespace Server.Mobiles BaseCreature bc = list[i] as BaseCreature; if ( bc != null ) + { bc.IsStabled = true; + bc.StabledBy = this; + } } CheckAtrophies( this ); @@ -4480,6 +4483,7 @@ namespace Server.Mobiles pet.SummonMaster = null; pet.IsStabled = true; + pet.StabledBy = this; pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully happy @@ -4507,6 +4511,7 @@ namespace Server.Mobiles if ( pet == null || pet.Deleted ) { pet.IsStabled = false; + pet.StabledBy = null; if ( Stabled.Contains( pet ) ) Stabled.Remove( pet ); @@ -4527,6 +4532,7 @@ namespace Server.Mobiles pet.MoveToWorld( Location, Map ); pet.IsStabled = false; + pet.StabledBy = null; pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully Happy diff --git a/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs b/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs index 498c72f2b..ad057a5d9 100644 --- a/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs +++ b/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs @@ -202,6 +202,7 @@ namespace Server.Mobiles if ( pet == null || pet.Deleted ) { pet.IsStabled = false; + pet.StabledBy = null; from.Stabled.RemoveAt( i ); --i; continue; @@ -322,6 +323,7 @@ namespace Server.Mobiles pet.SummonMaster = null; pet.IsStabled = true; + pet.StabledBy = from; if ( Core.SE ) pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully happy @@ -359,6 +361,7 @@ namespace Server.Mobiles if ( pet == null || pet.Deleted ) { pet.IsStabled = false; + pet.StabledBy = null; from.Stabled.RemoveAt( i ); --i; continue; @@ -414,6 +417,7 @@ namespace Server.Mobiles pet.MoveToWorld( from.Location, from.Map ); pet.IsStabled = false; + pet.StabledBy = null; if ( Core.SE ) pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully Happy