diff --git a/Scripts/Gumps/BanDurationGump.cs b/Scripts/Gumps/BanDurationGump.cs index ae09b629a..2d93ee1b8 100644 --- a/Scripts/Gumps/BanDurationGump.cs +++ b/Scripts/Gumps/BanDurationGump.cs @@ -225,27 +225,34 @@ namespace Server.Gumps default: return; } - if ( shouldSet ) - { - string comment = ( c != null && c.Text.Trim().Length > 0 ) ? c.Text.Trim(): "No Comment"; + if ( shouldSet ) { + string comment = null; + + if ( c != null ) { + comment = c.Text.Trim(); + if ( comment.Length == 0 ) + comment = null; + } for ( int i = 0; i < m_List.Count; ++i ) { Account a = (Account)m_List[i]; a.SetBanTags( from, DateTime.Now, duration ); - a.Comments.Add( new AccountComment( from.RawName, String.Format( "Ban of {0} duration: {1}", (( duration == TimeSpan.MaxValue )? "infinite" : duration.ToString()), comment ) ) ); + + if ( comment != null ) + a.Comments.Add( new AccountComment( from.RawName, String.Format( "Duration: {0}, Comment: {1}", (( duration == TimeSpan.MaxValue )? "Infinite" : duration.ToString()), comment ) ) ); } if ( duration == TimeSpan.MaxValue ) - from.SendMessage( "Duration is infinite." ); + from.SendMessage( "Ban Duration: Infinite" ); else - from.SendMessage( "Duration is {0}.", duration ); + from.SendMessage( "Ban Duration: {0}", duration ); } else { - from.SendMessage( "Values improperly formatted." ); + from.SendMessage( "Time values were improperly formatted." ); from.SendGump( new BanDurationGump( m_List ) ); } } diff --git a/Scripts/Gumps/WhoGump.cs b/Scripts/Gumps/WhoGump.cs index 2c0c36362..b9da0f271 100644 --- a/Scripts/Gumps/WhoGump.cs +++ b/Scripts/Gumps/WhoGump.cs @@ -127,7 +127,7 @@ namespace Server.Gumps { Mobile m = states[i].Mobile; - if ( m != null && (m == owner ||!m.Hidden || owner.AccessLevel >= m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( owner ) ) ) ) + if ( m != null && (m == owner ||!m.Hidden || owner.AccessLevel > m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( owner ) ) ) ) { if ( filter != null && ( m.Name == null || m.Name.ToLower().IndexOf( filter ) < 0 ) ) continue; @@ -281,7 +281,7 @@ namespace Server.Gumps from.SendMessage( "That player is no longer online." ); from.SendGump( new WhoGump( from, m_Mobiles, m_Page ) ); } - else if ( m == from || !m.Hidden || from.AccessLevel >= m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( from ))) + else if ( m == from || !m.Hidden || from.AccessLevel > m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( from ))) { from.SendGump( new ClientGump( from, m.NetState ) ); } diff --git a/Scripts/Items/Misc/Blocker.cs b/Scripts/Items/Misc/Blocker.cs index 71bd66677..28324533e 100644 --- a/Scripts/Items/Misc/Blocker.cs +++ b/Scripts/Items/Misc/Blocker.cs @@ -21,9 +21,8 @@ namespace Server.Items protected override Packet GetWorldPacketFor( NetState state ) { Mobile mob = state.Mobile; - if ( mob != null && mob.AccessLevel >= AccessLevel.GameMaster ) { + if ( mob != null && mob.AccessLevel >= AccessLevel.GameMaster ) return new GMItemPacket( this ); - } return base.GetWorldPacketFor( state ); } diff --git a/Scripts/Items/Misc/Corpses/Corpse.cs b/Scripts/Items/Misc/Corpses/Corpse.cs index 15d67c65f..6a36e0bb3 100644 --- a/Scripts/Items/Misc/Corpses/Corpse.cs +++ b/Scripts/Items/Misc/Corpses/Corpse.cs @@ -146,20 +146,6 @@ namespace Server.Items m_NoBones = true; BeginDecay( m_BoneDecayTime ); - - /*DecayedCorpse c = new DecayedCorpse( Name ); - - c.MoveToWorld( Location, Map ); - - ArrayList list = Items; - - for ( int i = list.Count - 1; i >= 0; --i ) - { - if ( i < list.Count ) - c.AddItem( (Item)list[i] ); - } - - Delete();*/ } private static TimeSpan m_DefaultDecayTime = TimeSpan.FromMinutes( 7.0 ); diff --git a/Scripts/Items/Misc/OilCloth.cs b/Scripts/Items/Misc/OilCloth.cs index 56a30b536..66a5b52b3 100644 --- a/Scripts/Items/Misc/OilCloth.cs +++ b/Scripts/Items/Misc/OilCloth.cs @@ -27,8 +27,6 @@ namespace Server.Items Amount = amount; } - - public bool Dye( Mobile from, DyeTub sender ) { if ( Deleted ) diff --git a/Scripts/Items/Resources/Tailor/Cloth.cs b/Scripts/Items/Resources/Tailor/Cloth.cs index 545d4bc7a..d08a9f5b1 100644 --- a/Scripts/Items/Resources/Tailor/Cloth.cs +++ b/Scripts/Items/Resources/Tailor/Cloth.cs @@ -66,6 +66,7 @@ namespace Server.Items from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString() ) ); } + public bool Scissor( Mobile from, Scissors scissors ) { if ( Deleted || !from.CanSee( this ) ) return false; diff --git a/Scripts/Items/Resources/Tailor/Leathers.cs b/Scripts/Items/Resources/Tailor/Leathers.cs index 8e981d190..dd10b22e3 100644 --- a/Scripts/Items/Resources/Tailor/Leathers.cs +++ b/Scripts/Items/Resources/Tailor/Leathers.cs @@ -19,7 +19,7 @@ namespace Server.Items { get { - return String.Format( Amount == 1 ? "{0} piece of leather" : "{0} pieces of leather", Amount ); + return String.Format( Amount == 1 ? "{0} piece of {1} leather" : "{0} pieces of {1} leather", Amount, CraftResources.GetName( m_Resource ).ToLower() ); } } diff --git a/Scripts/Items/Skill Items/Tools/SmithHammer.cs b/Scripts/Items/Skill Items/Tools/SmithHammer.cs index 2a11176e2..e00676b88 100644 --- a/Scripts/Items/Skill Items/Tools/SmithHammer.cs +++ b/Scripts/Items/Skill Items/Tools/SmithHammer.cs @@ -4,7 +4,7 @@ using Server.Engines.Craft; namespace Server.Items { - [FlipableAttribute( 0x13E4, 0x13E3 )] + [FlipableAttribute( 0x13E3, 0x13E4 )] public class SmithHammer : BaseTool { public override CraftSystem CraftSystem{ get{ return DefBlacksmithy.CraftSystem; } } diff --git a/Scripts/Items/Special/Solen Items/BallOfSummoning.cs b/Scripts/Items/Special/Solen Items/BallOfSummoning.cs index ef0d0cd43..2f08d187c 100644 --- a/Scripts/Items/Special/Solen Items/BallOfSummoning.cs +++ b/Scripts/Items/Special/Solen Items/BallOfSummoning.cs @@ -109,7 +109,7 @@ namespace Server.Items { base.GetContextMenuEntries( from, list ); - if ( from.Alive && from.InRange( this.GetWorldLocation(), 2 ) ) + if ( from.Alive && this.RootParent == from ) { if ( Pet == null ) { @@ -144,7 +144,7 @@ namespace Server.Items public override void OnDoubleClick( Mobile from ) { - if ( from.InRange( this.GetWorldLocation(), 2 ) ) + if ( this.RootParent == from ) // TODO: Previous implementation allowed use on ground, without house protection checks. What is the correct behavior? { if ( Pet == null ) { @@ -157,7 +157,7 @@ namespace Server.Items } else { - from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. + from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1042001 ); // That must be in your pack for you to use it. } } @@ -165,7 +165,7 @@ namespace Server.Items { BaseCreature pet = this.Pet; - if ( Deleted || pet != null ) + if ( Deleted || pet != null || this.RootParent != from ) return; from.SendLocalizedMessage( 1054114 ); // Target your pet that you wish to link to this Crystal Ball of Pet Summoning. @@ -186,9 +186,9 @@ namespace Server.Items if ( m_Ball.Deleted || m_Ball.Pet != null ) return; - if ( !from.InRange( m_Ball.GetWorldLocation(), 2 ) ) + if ( m_Ball.RootParent != from ) { - from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. + from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1042001 ); // That must be in your pack for you to use it. } else if ( targeted is BaseCreature ) { @@ -224,7 +224,7 @@ namespace Server.Items { BaseCreature pet = this.Pet; - if ( Deleted || pet == null ) + if ( Deleted || pet == null || this.RootParent != from ) return; if ( Charges == 0 ) @@ -277,7 +277,7 @@ namespace Server.Items public void UnlinkPet( Mobile from ) { - if ( !Deleted && Pet != null ) + if ( !Deleted && Pet != null && this.RootParent == from ) { Pet = null; diff --git a/Scripts/Items/Special/Special Scrolls/PowerScroll.cs b/Scripts/Items/Special/Special Scrolls/PowerScroll.cs index 074543f49..a73421d9e 100644 --- a/Scripts/Items/Special/Special Scrolls/PowerScroll.cs +++ b/Scripts/Items/Special/Special Scrolls/PowerScroll.cs @@ -171,7 +171,6 @@ namespace Server.Items base.Hue = 0x481; base.Weight = 1.0; - m_Skill = skill; m_Value = value; if ( m_Value > 105.0 ) diff --git a/Scripts/Misc/AutoSave.cs b/Scripts/Misc/AutoSave.cs index 0bfcadf67..157f5b057 100644 --- a/Scripts/Misc/AutoSave.cs +++ b/Scripts/Misc/AutoSave.cs @@ -94,7 +94,7 @@ namespace Server.Misc if ( m_Backups.Length == 0 ) return; - string root = Path.Combine( Core.BaseDirectory, "Backups\\Automatic" ); + string root = Path.Combine( Core.BaseDirectory, "Backups/Automatic" ); if ( !Directory.Exists( root ) ) Directory.CreateDirectory( root ); diff --git a/Scripts/Spells/Sixth/Reveal.cs b/Scripts/Spells/Sixth/Reveal.cs index 7e0d6217d..bdbb3c34d 100644 --- a/Scripts/Spells/Sixth/Reveal.cs +++ b/Scripts/Spells/Sixth/Reveal.cs @@ -53,7 +53,7 @@ namespace Server.Spells.Sixth if ( m is Mobiles.ShadowKnight && (m.X != p.X || m.Y != p.Y) ) continue; - if ( m.Hidden && (m.AccessLevel == AccessLevel.Player || Caster.AccessLevel > m.AccessLevel) && Caster.CanBeHarmful( m, false, true ) && CheckDifficulty( Caster, m ) ) + if ( m.Hidden && (m.AccessLevel == AccessLevel.Player || Caster.AccessLevel > m.AccessLevel) && CheckDifficulty( Caster, m ) ) targets.Add( m ); }