From b06dc2c0d0e1854e4cbee67020a7f10dcf1f5ff6 Mon Sep 17 00:00:00 2001 From: xavier Date: Tue, 23 Aug 2011 05:10:10 +0000 Subject: [PATCH] more fixes... --- .../Items/Special/ML/GrizzledMareStatuette.cs | 3 ++- Scripts/Mobiles/AI/BaseAI.cs | 6 ++--- .../Mobiles/Monsters/ML/Special/Ilhenir.cs | 2 +- Scripts/Skills/AnimalTaming.cs | 23 ++++++++++++++++++- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Scripts/Items/Special/ML/GrizzledMareStatuette.cs b/Scripts/Items/Special/ML/GrizzledMareStatuette.cs index 8fdb92e73..4e41dc09d 100644 --- a/Scripts/Items/Special/ML/GrizzledMareStatuette.cs +++ b/Scripts/Items/Special/ML/GrizzledMareStatuette.cs @@ -8,7 +8,7 @@ namespace Server.Items { public override int LabelNumber{ get{ return 1074475; } } // Grizzled Mare Statuette public override BaseCreature Summon{ get { return new GrizzledMare(); } } - + [Constructable] public GrizzledMareStatuette() : base( 0x2617 ) { @@ -40,6 +40,7 @@ namespace Server.Mobiles public class GrizzledMare : SkeletalMount { public override bool DeleteOnRelease{ get{ return true; } } + public override bool IsDispellable { get { return false; } } [Constructable] public GrizzledMare() : base() diff --git a/Scripts/Mobiles/AI/BaseAI.cs b/Scripts/Mobiles/AI/BaseAI.cs index ed40395a9..113eab9e8 100644 --- a/Scripts/Mobiles/AI/BaseAI.cs +++ b/Scripts/Mobiles/AI/BaseAI.cs @@ -180,7 +180,7 @@ namespace Server.Mobiles list.Add( new InternalEntry( from, 6112, 14, m_Mobile, this, OrderType.Stop ) ); // Command: Stop list.Add( new InternalEntry( from, 6114, 14, m_Mobile, this, OrderType.Stay ) ); // Command: Stay - if( !m_Mobile.Summoned ) + if( !m_Mobile.Summoned && !( m_Mobile is GrizzledMare ) ) { list.Add( new InternalEntry( from, 6110, 14, m_Mobile, this, OrderType.Friend ) ); // Add Friend list.Add( new InternalEntry( from, 6099, 14, m_Mobile, this, OrderType.Unfriend ) ); // Remove Friend @@ -620,7 +620,7 @@ namespace Server.Mobiles if( WasNamed( speech ) && m_Mobile.CheckControlChance( e.Mobile ) ) { - if( m_Mobile.Summoned ) + if( m_Mobile.Summoned || ( m_Mobile is GrizzledMare ) ) e.Mobile.SendLocalizedMessage( 1005481 ); // Summoned creatures are loyal only to their summoners. else if( e.Mobile.HasTrade ) e.Mobile.SendLocalizedMessage( 1070947 ); // You cannot friend a pet with a trade pending @@ -714,7 +714,7 @@ namespace Server.Mobiles if( !m_Mobile.IsDeadPet && WasNamed( speech ) && m_Mobile.CheckControlChance( e.Mobile ) ) { - if( m_Mobile.Summoned ) + if( m_Mobile.Summoned || ( m_Mobile is GrizzledMare ) ) e.Mobile.SendLocalizedMessage( 1005487 ); // You cannot transfer ownership of a summoned creature. else if( e.Mobile.HasTrade ) e.Mobile.SendLocalizedMessage( 1010507 ); // You cannot transfer a pet with a trade pending diff --git a/Scripts/Mobiles/Monsters/ML/Special/Ilhenir.cs b/Scripts/Mobiles/Monsters/ML/Special/Ilhenir.cs index cf40c2654..69f77cbb6 100644 --- a/Scripts/Mobiles/Monsters/ML/Special/Ilhenir.cs +++ b/Scripts/Mobiles/Monsters/ML/Special/Ilhenir.cs @@ -419,7 +419,7 @@ namespace Server.Mobiles private bool ValidMobile( Mobile m ) { - return ( !m.Deleted && m.Alive ); + return ( !m.Deleted && m.Alive && m.AccessLevel == AccessLevel.Player ); } private bool IsUsingDurability( IDurability item ) diff --git a/Scripts/Skills/AnimalTaming.cs b/Scripts/Skills/AnimalTaming.cs index d20e15f7e..809b81a7a 100644 --- a/Scripts/Skills/AnimalTaming.cs +++ b/Scripts/Skills/AnimalTaming.cs @@ -117,6 +117,14 @@ namespace Server.SkillHandlers from.NextSkillTime = DateTime.Now; } + public virtual void ResetPacify( object obj ) + { + if( obj is BaseCreature ) + { + ((BaseCreature)obj).BardPacified = true; + } + } + protected override void OnTarget( Mobile from, object targeted ) { from.RevealingAction(); @@ -183,6 +191,20 @@ namespace Server.SkillHandlers creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 502805, from.NetState ); // You seem to anger the beast! creature.PlaySound( creature.GetAngerSound() ); creature.Direction = creature.GetDirectionTo( from ); + + if( creature.BardPacified && Utility.RandomDouble() > .24) + { + Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerStateCallback( ResetPacify ), creature ); + } + else + { + creature.BardEndTime = DateTime.Now; + } + + creature.BardPacified = false; + + creature.Move( creature.Direction ); + if ( from is PlayerMobile && !(( (PlayerMobile)from ).HonorActive || TransformationSpellHelper.UnderTransformation( from, typeof( EtherealVoyageSpell )))) creature.Combatant = from; } @@ -381,7 +403,6 @@ namespace Server.SkillHandlers return true; MovementPath path = new MovementPath( m_Creature, new Point3D( p ) ); - return path.Success; } }