diff --git a/Scripts/Engines/Craft/DefTailoring.cs b/Scripts/Engines/Craft/DefTailoring.cs index 8b69359ae..51c425b50 100644 --- a/Scripts/Engines/Craft/DefTailoring.cs +++ b/Scripts/Engines/Craft/DefTailoring.cs @@ -49,6 +49,29 @@ namespace Server.Engines.Craft return 0; } + private static Type[] m_TailorColorables = new Type[] + { + typeof( GozaMatEastDeed ), typeof( GozaMatSouthDeed ), + typeof( SquareGozaMatEastDeed ), typeof( SquareGozaMatSouthDeed ), + typeof( BrocadeGozaMatEastDeed ), typeof( BrocadeGozaMatSouthDeed ), + typeof( BrocadeSquareGozaMatEastDeed ), typeof( BrocadeSquareGozaMatSouthDeed ) + }; + + public override bool RetainsColorFrom( CraftItem item, Type type ) + { + if ( !type.IsSubclassOf( typeof( Cloth ) ) ) + return false; + + type = item.ItemType; + + bool contains = false; + + for ( int i = 0; !contains && i < m_TailorColorables.Length; ++i ) + contains = ( m_TailorColorables[i] == type ); + + return contains; + } + public override void PlayCraftEffect( Mobile from ) { from.PlaySound( 0x248 ); diff --git a/Scripts/Engines/Craft/DefTinkering.cs b/Scripts/Engines/Craft/DefTinkering.cs index 7a7092238..f6a2259db 100644 --- a/Scripts/Engines/Craft/DefTinkering.cs +++ b/Scripts/Engines/Craft/DefTinkering.cs @@ -55,12 +55,6 @@ namespace Server.Engines.Craft return 0; } - public override void PlayCraftEffect( Mobile from ) - { - // no sound - //from.PlaySound( 0x241 ); - } - private static Type[] m_TinkerColorables = new Type[] { typeof( ForkLeft ), typeof( ForkRight ), @@ -90,6 +84,12 @@ namespace Server.Engines.Craft return contains; } + public override void PlayCraftEffect( Mobile from ) + { + // no sound + //from.PlaySound( 0x241 ); + } + public override int PlayEndingEffect( Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality, bool makersMark, CraftItem item ) { if ( toolBroken ) diff --git a/Scripts/Engines/Help/PageQueue.cs b/Scripts/Engines/Help/PageQueue.cs index 6e306603b..c0fab1397 100644 --- a/Scripts/Engines/Help/PageQueue.cs +++ b/Scripts/Engines/Help/PageQueue.cs @@ -185,6 +185,10 @@ namespace Server.Engines.Help { m_Entry.Sender.SendLocalizedMessage( 1008077, true, (index + 1).ToString() ); // Thank you for paging. Queue status : m_Entry.Sender.SendLocalizedMessage( 1008084 ); // You can reference our website at www.uo.com or contact us at support@uo.com. To cancel your page, please select the help button again and select cancel. + + if ( m_Entry.Handler != null && m_Entry.Handler.NetState == null ) { + m_Entry.Handler = null; + } } else { diff --git a/Scripts/Items/Addons/GozaMats.cs b/Scripts/Items/Addons/GozaMats.cs index e9eb2f276..bd87a29ff 100644 --- a/Scripts/Items/Addons/GozaMats.cs +++ b/Scripts/Items/Addons/GozaMats.cs @@ -7,11 +7,19 @@ namespace Server.Items { public override BaseAddonDeed Deed{ get{ return new GozaMatEastDeed(); } } + public override bool RetainDeedHue{ get{ return true; } } + [Constructable] - public GozaMatEastAddon() + public GozaMatEastAddon() : this( 0 ) + { + } + + [Constructable] + public GozaMatEastAddon( int hue ) { AddComponent( new LocalizedAddonComponent( 0x28a4, 1030688 ), 1, 0, 0 ); AddComponent( new LocalizedAddonComponent( 0x28a5, 1030688 ), 0, 0, 0 ); + Hue = hue; } public GozaMatEastAddon( Serial serial ) : base( serial ) @@ -35,7 +43,7 @@ namespace Server.Items public class GozaMatEastDeed : BaseAddonDeed { - public override BaseAddon Addon{ get{ return new GozaMatEastAddon(); } } + public override BaseAddon Addon{ get{ return new GozaMatEastAddon( this.Hue ); } } public override int LabelNumber{ get{ return 1030404; } } // goza (east) [Constructable] @@ -66,11 +74,19 @@ namespace Server.Items { public override BaseAddonDeed Deed{ get{ return new GozaMatSouthDeed(); } } + public override bool RetainDeedHue{ get{ return true; } } + [Constructable] - public GozaMatSouthAddon() + public GozaMatSouthAddon() : this( 0 ) + { + } + + [Constructable] + public GozaMatSouthAddon( int hue ) { AddComponent( new LocalizedAddonComponent( 0x28a6, 1030688 ), 0, 1, 0 ); AddComponent( new LocalizedAddonComponent( 0x28a7, 1030688 ), 0, 0, 0 ); + Hue = hue; } public GozaMatSouthAddon( Serial serial ) : base( serial ) @@ -94,7 +110,7 @@ namespace Server.Items public class GozaMatSouthDeed : BaseAddonDeed { - public override BaseAddon Addon{ get{ return new GozaMatSouthAddon(); } } + public override BaseAddon Addon{ get{ return new GozaMatSouthAddon( this.Hue ); } } public override int LabelNumber{ get{ return 1030405; } } // goza (south) [Constructable] @@ -126,10 +142,18 @@ namespace Server.Items public override BaseAddonDeed Deed{ get{ return new SquareGozaMatEastDeed(); } } public override int LabelNumber{ get{ return 1030688; } } // goza mat + public override bool RetainDeedHue{ get{ return true; } } + [Constructable] - public SquareGozaMatEastAddon() + public SquareGozaMatEastAddon() : this( 0 ) + { + } + + [Constructable] + public SquareGozaMatEastAddon( int hue ) { AddComponent( new LocalizedAddonComponent( 0x28a8, 1030688 ), 0, 0, 0 ); + Hue = hue; } public SquareGozaMatEastAddon( Serial serial ) : base( serial ) @@ -153,7 +177,7 @@ namespace Server.Items public class SquareGozaMatEastDeed : BaseAddonDeed { - public override BaseAddon Addon{ get{ return new SquareGozaMatEastAddon(); } } + public override BaseAddon Addon{ get{ return new SquareGozaMatEastAddon( this.Hue ); } } public override int LabelNumber{ get{ return 1030407; } } // square goza (east) [Constructable] @@ -184,10 +208,18 @@ namespace Server.Items { public override BaseAddonDeed Deed{ get{ return new SquareGozaMatSouthDeed(); } } + public override bool RetainDeedHue{ get{ return true; } } + [Constructable] - public SquareGozaMatSouthAddon() + public SquareGozaMatSouthAddon() : this( 0 ) + { + } + + [Constructable] + public SquareGozaMatSouthAddon( int hue ) { AddComponent( new LocalizedAddonComponent( 0x28a9, 1030688 ), 0, 0, 0 ); + Hue = hue; } public SquareGozaMatSouthAddon( Serial serial ) : base( serial ) @@ -211,7 +243,7 @@ namespace Server.Items public class SquareGozaMatSouthDeed : BaseAddonDeed { - public override BaseAddon Addon{ get{ return new SquareGozaMatSouthAddon(); } } + public override BaseAddon Addon{ get{ return new SquareGozaMatSouthAddon( this.Hue ); } } public override int LabelNumber{ get{ return 1030406; } } // square goza (south) @@ -243,11 +275,19 @@ namespace Server.Items { public override BaseAddonDeed Deed{ get{ return new BrocadeGozaMatEastDeed(); } } + public override bool RetainDeedHue{ get{ return true; } } + [Constructable] - public BrocadeGozaMatEastAddon() + public BrocadeGozaMatEastAddon() : this( 0 ) + { + } + + [Constructable] + public BrocadeGozaMatEastAddon( int hue ) { AddComponent( new LocalizedAddonComponent( 0x28AB, 1030688 ), 0, 0, 0 ); AddComponent( new LocalizedAddonComponent( 0x28AA, 1030688 ), 1, 0, 0 ); + Hue = hue; } public BrocadeGozaMatEastAddon( Serial serial ) : base( serial ) @@ -271,7 +311,7 @@ namespace Server.Items public class BrocadeGozaMatEastDeed : BaseAddonDeed { - public override BaseAddon Addon{ get{ return new BrocadeGozaMatEastAddon(); } } + public override BaseAddon Addon{ get{ return new BrocadeGozaMatEastAddon( this.Hue ); } } public override int LabelNumber{ get{ return 1030408; } } // brocade goza (east) [Constructable] @@ -301,11 +341,19 @@ namespace Server.Items { public override BaseAddonDeed Deed{ get{ return new BrocadeGozaMatSouthDeed(); } } + public override bool RetainDeedHue{ get{ return true; } } + [Constructable] - public BrocadeGozaMatSouthAddon() + public BrocadeGozaMatSouthAddon() : this( 0 ) + { + } + + [Constructable] + public BrocadeGozaMatSouthAddon( int hue ) { AddComponent( new LocalizedAddonComponent( 0x28AD, 1030688 ), 0, 0, 0 ); AddComponent( new LocalizedAddonComponent( 0x28AC, 1030688 ), 0, 1, 0 ); + Hue = hue; } public BrocadeGozaMatSouthAddon( Serial serial ) : base( serial ) @@ -329,7 +377,7 @@ namespace Server.Items public class BrocadeGozaMatSouthDeed : BaseAddonDeed { - public override BaseAddon Addon{ get{ return new BrocadeGozaMatSouthAddon(); } } + public override BaseAddon Addon{ get{ return new BrocadeGozaMatSouthAddon( this.Hue ); } } public override int LabelNumber{ get{ return 1030409; } } // brocade goza (south) [Constructable] @@ -359,10 +407,18 @@ namespace Server.Items { public override BaseAddonDeed Deed{ get{ return new BrocadeSquareGozaMatEastDeed(); } } + public override bool RetainDeedHue{ get{ return true; } } + + [Constructable] + public BrocadeSquareGozaMatEastAddon() : this( 0 ) + { + } + [Constructable] public BrocadeSquareGozaMatEastAddon() { AddComponent( new LocalizedAddonComponent( 0x28AE, 1030688 ), 0, 0, 0 ); + Hue = hue; } public BrocadeSquareGozaMatEastAddon( Serial serial ) : base( serial ) @@ -386,7 +442,7 @@ namespace Server.Items public class BrocadeSquareGozaMatEastDeed : BaseAddonDeed { - public override BaseAddon Addon{ get{ return new BrocadeSquareGozaMatEastAddon(); } } + public override BaseAddon Addon{ get{ return new BrocadeSquareGozaMatEastAddon( this.Hue ); } } public override int LabelNumber{ get{ return 1030411; } } // brocade square goza (east) [Constructable] @@ -417,10 +473,18 @@ namespace Server.Items { public override BaseAddonDeed Deed{ get{ return new BrocadeSquareGozaMatSouthDeed(); } } + public override bool RetainDeedHue{ get{ return true; } } + + [Constructable] + public BrocadeSquareGozaMatSouthAddon() : this( 0 ) + { + } + [Constructable] public BrocadeSquareGozaMatSouthAddon() { AddComponent( new LocalizedAddonComponent( 0x28AF, 1030688 ), 0, 0, 0 ); + Hue = hue; } public BrocadeSquareGozaMatSouthAddon( Serial serial ) : base( serial ) @@ -444,7 +508,7 @@ namespace Server.Items public class BrocadeSquareGozaMatSouthDeed : BaseAddonDeed { - public override BaseAddon Addon{ get{ return new BrocadeSquareGozaMatSouthAddon(); } } + public override BaseAddon Addon{ get{ return new BrocadeSquareGozaMatSouthAddon( this.Hue ); } } public override int LabelNumber{ get{ return 1030410; } } // brocade square goza (south) diff --git a/Scripts/Items/Books/BaseBook.cs b/Scripts/Items/Books/BaseBook.cs index 2068209d5..b551dd417 100644 --- a/Scripts/Items/Books/BaseBook.cs +++ b/Scripts/Items/Books/BaseBook.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.IO; using System.Text; using Server; @@ -160,6 +161,12 @@ namespace Server.Items Content = 0x08 } + public override void GetContextMenuEntries( Mobile from, List list ) + { + base.GetContextMenuEntries( from, list ); + SetSecureLevelEntry.AddTo( from, this, list ); + } + public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); diff --git a/Scripts/Items/Containers/Container.cs b/Scripts/Items/Containers/Container.cs index 351ce5426..5cf8feb6d 100644 --- a/Scripts/Items/Containers/Container.cs +++ b/Scripts/Items/Containers/Container.cs @@ -190,7 +190,20 @@ namespace Server.Items Weight = 3.0; } - public override int DefaultMaxWeight { get { if ( Core.ML ) { return 550; } else { return 400; } } } + public override int DefaultMaxWeight { + get { + if ( Core.ML ) { + Mobile m = ParentEntity as Mobile; + if ( m != null && m.Backpack == this ) { + return 550; + } else { + return base.DefaultMaxWeight; + } + } else { + return base.DefaultMaxWeight; + } + } + } public Backpack( Serial serial ) : base( serial ) { diff --git a/Scripts/Items/Misc/Gold.cs b/Scripts/Items/Misc/Gold.cs index 533603f83..7464001c3 100644 --- a/Scripts/Items/Misc/Gold.cs +++ b/Scripts/Items/Misc/Gold.cs @@ -6,7 +6,7 @@ namespace Server.Items { public override double DefaultWeight { - get { return 0.02; } + get { return ( Core.ML ? ( 0.02 / 3 ) : 0.02 ); } } [Constructable] diff --git a/Scripts/Items/Weapons/Abilities/MortalStrike.cs b/Scripts/Items/Weapons/Abilities/MortalStrike.cs index dd5e5f6bc..b892c1661 100644 --- a/Scripts/Items/Weapons/Abilities/MortalStrike.cs +++ b/Scripts/Items/Weapons/Abilities/MortalStrike.cs @@ -61,6 +61,9 @@ namespace Server.Items public static void EndWound( Mobile m ) { + if ( !IsWounded( m ) ) + return; + Timer t = (Timer)m_Table[m]; if ( t != null ) diff --git a/Scripts/Mobiles/PlayerMobile.cs b/Scripts/Mobiles/PlayerMobile.cs index 12e1d63c4..d358970be 100644 --- a/Scripts/Mobiles/PlayerMobile.cs +++ b/Scripts/Mobiles/PlayerMobile.cs @@ -2097,6 +2097,9 @@ namespace Server.Mobiles if ( Alive ) return false; + if ( Core.ML && Skills[SkillName.SpiritSpeak].Value >= 100.0 ) + return false; + if ( Core.AOS ) { for ( int i = 0; i < hears.Count; ++i ) diff --git a/Scripts/Spells/Ninjitsu/AnimalForm.cs b/Scripts/Spells/Ninjitsu/AnimalForm.cs index f75fc8b3c..3acd3c0bc 100644 --- a/Scripts/Spells/Ninjitsu/AnimalForm.cs +++ b/Scripts/Spells/Ninjitsu/AnimalForm.cs @@ -207,8 +207,8 @@ namespace Server.Spells.Ninjitsu { m_Table[m] = context; - /*if ( context.Type == typeof( BakeKitsune ) || context.Type == typeof( GreyWolf ) ) - m.Hits += 20;*/ + if ( context.Type == typeof( BakeKitsune ) || context.Type == typeof( GreyWolf ) ) + m.CheckStatTimers(); } public static void RemoveContext( Mobile m, bool resetGraphics )