diff --git a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatue.cs b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatue.cs index be6e3405e..6dffa1deb 100644 --- a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatue.cs +++ b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatue.cs @@ -35,7 +35,7 @@ namespace Server.Mobiles { Antique, Dark, - Medium, + Medium, Light } @@ -187,7 +187,7 @@ namespace Server.Mobiles } public void OnRequestedAnimation( Mobile from ) - { + { from.Send( new UpdateStatueAnimation( this, 1, m_Animation, m_Frames ) ); } @@ -237,7 +237,7 @@ namespace Server.Mobiles Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) ); } } - + public void Sculpt( Mobile by ) { m_SculptedBy = by; @@ -317,7 +317,7 @@ namespace Server.Mobiles cloned.Hue = item.Hue; cloned.Weight = item.Weight; cloned.Movable = false; - + return cloned; } @@ -344,7 +344,7 @@ namespace Server.Mobiles { switch ( m_Pose ) { - case StatuePose.Ready: + case StatuePose.Ready: m_Animation = 4; m_Frames = 0; break; @@ -416,7 +416,7 @@ namespace Server.Mobiles public class CharacterStatueDeed : Item, IRewardItem { public override int LabelNumber - { + { get { StatueType t = m_Type; @@ -433,7 +433,7 @@ namespace Server.Mobiles case StatueType.Bronze: return 1076190; default: return 1076173; } - } + } } private CharacterStatue m_Statue; @@ -451,9 +451,9 @@ namespace Server.Mobiles public StatueType StatueType { get - { + { if ( m_Statue != null ) - return m_Statue.StatueType; + return m_Statue.StatueType; return m_Type; } @@ -470,7 +470,7 @@ namespace Server.Mobiles public CharacterStatueDeed( CharacterStatue statue ) : base( 0x14F0 ) { m_Statue = statue; - + LootType = LootType.Blessed; Weight = 1.0; } @@ -500,7 +500,7 @@ namespace Server.Mobiles if ( time > TimeSpan.Zero ) { - from.SendLocalizedMessage( 1008126, true, Math.Ceiling( time.TotalDays / RewardSystem.RewardInterval.TotalDays ).ToString() ); // Your account is not old enough to use this item. Months until you can use this item : + from.SendLocalizedMessage( 1008126, true, Math.Ceiling( time.TotalDays / RewardSystem.RewardInterval.TotalDays ).ToString() ); // Your account is not old enough to use this item. Months until you can use this item : return; } } @@ -553,7 +553,7 @@ namespace Server.Mobiles m_IsRewardItem = reader.ReadBool(); } } - + public class CharacterStatueTarget : Target { private Item m_Maker; @@ -575,7 +575,7 @@ namespace Server.Mobiles if ( m_Maker.IsChildOf( from.Backpack ) ) { - SpellHelper.GetSurfaceTop( ref p ); + SpellHelper.GetSurfaceTop( ref p ); BaseHouse house = null; Point3D loc = new Point3D( p ); @@ -593,7 +593,7 @@ namespace Server.Mobiles AddonFitResult result = CouldFit( loc, map, from, ref house ); if ( result == AddonFitResult.Valid ) - { + { CharacterStatue statue = new CharacterStatue( from, m_Type ); CharacterStatuePlinth plinth = new CharacterStatuePlinth( statue ); @@ -629,7 +629,7 @@ namespace Server.Mobiles } public static AddonFitResult CouldFit( Point3D p, Map map, Mobile from, ref BaseHouse house ) - { + { if ( !map.CanFit( p.X, p.Y, p.Z, 20, true, true, true ) ) return AddonFitResult.Blocked; else if ( !BaseAddon.CheckHouse( from, p, map, 20, ref house ) ) diff --git a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatueMaker.cs b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatueMaker.cs index 1ca900c0f..9ec58db3e 100644 --- a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatueMaker.cs +++ b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatueMaker.cs @@ -5,11 +5,11 @@ using Server.Targets; using Server.Engines.VeteranRewards; namespace Server.Items -{ +{ public class CharacterStatueMaker : Item, IRewardItem { public override int LabelNumber{ get{ return 1076173; } } // Character Statue Maker - + private bool m_IsRewardItem; private StatueType m_Type; @@ -26,26 +26,26 @@ namespace Server.Items get{ return m_Type; } set{ m_Type = value; InvalidateHue(); } } - + public CharacterStatueMaker( StatueType type ) : base( 0x32F0 ) { m_Type = type; - + InvalidateHue(); - + LootType = LootType.Blessed; Weight = 5.0; } public CharacterStatueMaker( Serial serial ) : base( serial ) { - } - + } + public override void OnDoubleClick( Mobile from ) { if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, new object[] { m_Type } ) ) return; - + if ( IsChildOf( from.Backpack ) ) { if ( !from.IsBodyMod ) @@ -59,13 +59,13 @@ namespace Server.Items else from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } - + public override void GetProperties( ObjectPropertyList list ) { base.GetProperties( list ); - + if ( m_IsRewardItem ) - list.Add( 1076222 ); // 6th Year Veteran Reward + list.Add( 1076222 ); // 6th Year Veteran Reward } public override void Serialize( GenericWriter writer ) @@ -73,7 +73,7 @@ namespace Server.Items base.Serialize( writer ); writer.WriteEncodedInt( (int) 0 ); // version - + writer.Write( (bool) m_IsRewardItem ); writer.Write( (int) m_Type ); } @@ -87,23 +87,23 @@ namespace Server.Items m_IsRewardItem = reader.ReadBool(); m_Type = (StatueType) reader.ReadInt(); } - + public void InvalidateHue() { Hue = 0xB8F + (int) m_Type * 4; } } - + public class MarbleStatueMaker : CharacterStatueMaker { [Constructable] public MarbleStatueMaker() : base( StatueType.Marble ) { } - + public MarbleStatueMaker( Serial serial ) : base( serial ) { - } + } public override void Serialize( GenericWriter writer ) { @@ -119,17 +119,17 @@ namespace Server.Items int version = reader.ReadEncodedInt(); } } - + public class JadeStatueMaker : CharacterStatueMaker { [Constructable] public JadeStatueMaker() : base( StatueType.Jade ) { } - + public JadeStatueMaker( Serial serial ) : base( serial ) { - } + } public override void Serialize( GenericWriter writer ) { @@ -145,17 +145,17 @@ namespace Server.Items int version = reader.ReadEncodedInt(); } } - + public class BronzeStatueMaker : CharacterStatueMaker { [Constructable] public BronzeStatueMaker() : base( StatueType.Bronze ) { } - + public BronzeStatueMaker( Serial serial ) : base( serial ) { - } + } public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatuePlinth.cs b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatuePlinth.cs index 182f45731..e93090080 100644 --- a/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatuePlinth.cs +++ b/Scripts/Engines/VeteranRewards/Character Statue Maker/CharacterStatuePlinth.cs @@ -14,7 +14,7 @@ namespace Server.Items public override int LabelNumber{ get{ return 1076201; } } // Character Statue private CharacterStatue m_Statue; - + public CharacterStatuePlinth( CharacterStatue statue ) : base( 0x32F2 ) { m_Statue = statue; @@ -49,7 +49,7 @@ namespace Server.Items public override void OnDoubleClick( Mobile from ) { if ( m_Statue != null ) - from.SendGump( new CharacterPlinthGump( m_Statue ) ); + from.SendGump( new CharacterPlinthGump( m_Statue ) ); } public override void Serialize( GenericWriter writer ) @@ -84,12 +84,12 @@ namespace Server.Items public virtual bool CouldFit( IPoint3D p, Map map ) { Point3D point = new Point3D( p.X, p.Y, p.Z ); - + if ( map == null || !map.CanFit( point, 20 ) ) return false; BaseHouse house = BaseHouse.FindHouseAt( point, map, 20 ); - + if ( house == null ) return false; @@ -109,7 +109,7 @@ namespace Server.Items Disposable = true; Dragable = true; Resizable = false; - + AddPage( 0 ); AddImage( 0, 0, 0x24F4 ); AddHtml( 55, 50, 150, 20, statue.Name, false, false ); diff --git a/Scripts/Engines/VeteranRewards/Character Statue Maker/Gumps/CharacterStatueGump.cs b/Scripts/Engines/VeteranRewards/Character Statue Maker/Gumps/CharacterStatueGump.cs index bfa81da8b..777380b9d 100644 --- a/Scripts/Engines/VeteranRewards/Character Statue Maker/Gumps/CharacterStatueGump.cs +++ b/Scripts/Engines/VeteranRewards/Character Statue Maker/Gumps/CharacterStatueGump.cs @@ -11,11 +11,11 @@ namespace Server.Gumps private Item m_Maker; private CharacterStatue m_Statue; private Mobile m_Owner; - + private enum Buttons { Close, - Sculpt, + Sculpt, PosePrev, PoseNext, DirPrev, @@ -24,70 +24,70 @@ namespace Server.Gumps MatNext, Restore } - + public CharacterStatueGump( Item maker, CharacterStatue statue, Mobile owner ) : base( 60, 36 ) { m_Maker = maker; m_Statue = statue; m_Owner = owner; - + if ( m_Statue == null ) return; - + Closable = true; Disposable = true; Dragable = true; Resizable = false; - + AddPage( 0 ); - + AddBackground( 0, 0, 327, 324, 0x13BE ); AddImageTiled( 10, 10, 307, 20, 0xA40 ); AddImageTiled( 10, 40, 307, 244, 0xA40 ); AddImageTiled( 10, 294, 307, 20, 0xA40 ); - AddAlphaRegion( 10, 10, 307, 304 ); + AddAlphaRegion( 10, 10, 307, 304 ); AddHtmlLocalized( 14, 12, 327, 20, 1076156, 0x7FFF, false, false ); // Character Statue Maker - + // pose AddHtmlLocalized( 133, 41, 120, 20, 1076168, 0x7FFF, false, false ); // Choose Pose - AddHtmlLocalized( 133, 61, 120, 20, 1076208 + (int) m_Statue.Pose, 0x77E, false, false ); + AddHtmlLocalized( 133, 61, 120, 20, 1076208 + (int) m_Statue.Pose, 0x77E, false, false ); AddButton( 163, 81, 0xFA5, 0xFA7, (int) Buttons.PoseNext, GumpButtonType.Reply, 0 ); AddButton( 133, 81, 0xFAE, 0xFB0, (int) Buttons.PosePrev, GumpButtonType.Reply, 0 ); - + // direction AddHtmlLocalized( 133, 126, 120, 20, 1076170, 0x7FFF, false, false ); // Choose Direction - AddHtmlLocalized( 133, 146, 120, 20, GetDirectionNumber( m_Statue.Direction ), 0x77E, false, false ); + AddHtmlLocalized( 133, 146, 120, 20, GetDirectionNumber( m_Statue.Direction ), 0x77E, false, false ); AddButton( 163, 167, 0xFA5, 0xFA7, (int) Buttons.DirNext, GumpButtonType.Reply, 0 ); AddButton( 133, 167, 0xFAE, 0xFB0, (int) Buttons.DirPrev, GumpButtonType.Reply, 0 ); - + // material AddHtmlLocalized( 133, 211, 120, 20, 1076171, 0x7FFF, false, false ); // Choose Material - AddHtmlLocalized( 133, 231, 120, 20, GetMaterialNumber( m_Statue.StatueType, m_Statue.Material ), 0x77E, false, false ); + AddHtmlLocalized( 133, 231, 120, 20, GetMaterialNumber( m_Statue.StatueType, m_Statue.Material ), 0x77E, false, false ); AddButton( 163, 253, 0xFA5, 0xFA7, (int) Buttons.MatNext, GumpButtonType.Reply, 0 ); AddButton( 133, 253, 0xFAE, 0xFB0, (int) Buttons.MatPrev, GumpButtonType.Reply, 0 ); - - // cancel + + // cancel AddButton( 10, 294, 0xFB1, 0xFB2, (int) Buttons.Close, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 45, 294, 80, 20, 1006045, 0x7FFF, false, false ); // Cancel - - // sculpt + + // sculpt AddButton( 234, 294, 0xFB7, 0xFB9, (int) Buttons.Sculpt, GumpButtonType.Reply, 0 ); - AddHtmlLocalized( 269, 294, 80, 20, 1076174, 0x7FFF, false, false ); // Sculpt - - // restore + AddHtmlLocalized( 269, 294, 80, 20, 1076174, 0x7FFF, false, false ); // Sculpt + + // restore if ( m_Maker is CharacterStatueDeed ) { AddButton( 107, 294, 0xFAB, 0xFAD, (int) Buttons.Restore, GumpButtonType.Reply, 0 ); - AddHtmlLocalized( 142, 294, 80, 20, 1076193, 0x7FFF, false, false ); // Restore + AddHtmlLocalized( 142, 294, 80, 20, 1076193, 0x7FFF, false, false ); // Restore } } - + private int GetMaterialNumber( StatueType type, StatueMaterial material ) { switch ( material ) { case StatueMaterial.Antique: - + switch ( type ) { case StatueType.Bronze: return 1076187; @@ -96,18 +96,18 @@ namespace Server.Gumps } return 1076187; - case StatueMaterial.Dark: - + case StatueMaterial.Dark: + if ( type == StatueType.Marble ) return 1076183; return 1076182; case StatueMaterial.Medium: return 1076184; - case StatueMaterial.Light: return 1076185; + case StatueMaterial.Light: return 1076185; default: return 1076187; } } - + private int GetDirectionNumber( Direction direction ) { switch ( direction ) @@ -115,7 +115,7 @@ namespace Server.Gumps case Direction.North: return 1075389; case Direction.Right: return 1075388; case Direction.East: return 1075387; - case Direction.Down: return 1076204; + case Direction.Down: return 1076204; case Direction.South: return 1075386; case Direction.Left: return 1075391; case Direction.West: return 1075390; @@ -123,27 +123,27 @@ namespace Server.Gumps default: return 1075386; } } - + public override void OnResponse( NetState state, RelayInfo info ) - { + { if ( m_Statue == null || m_Statue.Deleted ) return; - + bool sendGump = false; - + if ( info.ButtonID == (int) Buttons.Sculpt ) - { + { if ( m_Maker is CharacterStatueDeed ) { CharacterStatue backup = ( (CharacterStatueDeed) m_Maker ).Statue; - + if ( backup != null ) backup.Delete(); } - + if ( m_Maker != null ) m_Maker.Delete(); - + m_Statue.Sculpt( state.Mobile ); } else if ( info.ButtonID == (int) Buttons.PosePrev ) @@ -183,11 +183,11 @@ namespace Server.Gumps if ( m_Maker is CharacterStatueDeed ) { CharacterStatue backup = ( (CharacterStatueDeed) m_Maker ).Statue; - + if ( backup != null ) m_Statue.Restore( backup ); } - + sendGump = true; } else // Close diff --git a/Scripts/Gumps/AdminGump.cs b/Scripts/Gumps/AdminGump.cs index f6b06cb0c..279fedc7b 100644 --- a/Scripts/Gumps/AdminGump.cs +++ b/Scripts/Gumps/AdminGump.cs @@ -2485,19 +2485,9 @@ namespace Server.Gumps IPAddress[] ips = a.LoginIPs; if ( ips.Length == 0 ) - { from.SendGump( new AdminGump( from, AdminGumpPage.AccountDetails_Access_ClientIPs, 0, null, "This account has not yet been accessed.", m_State ) ); - } else - { - StringBuilder sb = new StringBuilder(); - sb.AppendFormat( "You are about to clear the address list for account {0}. Do you wish to continue?", a ); - - for ( int i = 0; i < ips.Length; ++i ) - sb.AppendFormat( "
- {0}", ips[i] ); - - from.SendGump( new WarningGump( 1060635, 30720, sb.ToString(), 0xFFC000, 420, 400, new WarningGumpCallback( RemoveLoginIPs_Callback ), a ) ); - } + from.SendGump( new WarningGump( 1060635, 30720, String.Format( "You are about to clear the address list for account {0} containing {1} {2}. Do you wish to continue?", a, ips.Length, ( ips.Length == 1 ) ? "entry" : "entries" ), 0xFFC000, 420, 280, new WarningGumpCallback( RemoveLoginIPs_Callback ), a ) ); break; } diff --git a/Server/Map.cs b/Server/Map.cs index 06ec72bfd..c68f42a61 100644 --- a/Server/Map.cs +++ b/Server/Map.cs @@ -1891,6 +1891,7 @@ namespace Server Utility.FixPoints( ref pTop, ref pBottom ); int pathCount = path.Count; + int endTop = end.m_Z + 1; for( int i = 0; i < pathCount; ++i ) { @@ -1901,7 +1902,7 @@ namespace Server int landZ = 0, landAvg = 0, landTop = 0; GetAverageZ( point.m_X, point.m_Y, ref landZ, ref landAvg, ref landTop ); - if( landZ <= pointTop && landTop >= point.m_Z && (point.m_X != end.m_X || point.m_Y != end.m_Y || landZ > end.m_Z || landTop < end.m_Z) && !landTile.Ignored ) + if( landZ <= pointTop && landTop >= point.m_Z && (point.m_X != end.m_X || point.m_Y != end.m_Y || landZ > endTop || landTop < end.m_Z) && !landTile.Ignored ) return false; /* --Do land tiles need to be checked? There is never land between two people, always statics.-- @@ -1948,7 +1949,7 @@ namespace Server if( t.Z <= pointTop && t.Z + height >= point.Z && (flags & (TileFlag.Window | TileFlag.NoShoot)) != 0 ) { - if( point.m_X == end.m_X && point.m_Y == end.m_Y && t.Z <= end.m_Z && t.Z + height >= end.m_Z ) + if( point.m_X == end.m_X && point.m_Y == end.m_Y && t.Z <= endTop && t.Z + height >= end.m_Z ) continue; return false; @@ -1998,7 +1999,7 @@ namespace Server if( loc.m_X == point.m_X && loc.m_Y == point.m_Y && loc.m_Z <= pointTop && loc.m_Z + height >= point.m_Z ) { - if( loc.m_X == end.m_X && loc.m_Y == end.m_Y && loc.m_Z <= end.m_Z && loc.m_Z + height >= end.m_Z ) + if( loc.m_X == end.m_X && loc.m_Y == end.m_Y && loc.m_Z <= endTop && loc.m_Z + height >= end.m_Z ) continue; found = true;