From 14873aaa3e00a919e9ba58e6eb182cf0fb35bd75 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 10 Nov 2012 20:06:36 +0000 Subject: [PATCH] --- Scripts/Commands/Decorate.cs | 3 + Scripts/Commands/DecorateMag.cs | 3 + Scripts/Engines/BulkOrders/LargeBOD.cs | 13 ++- Scripts/Engines/BulkOrders/SmallBOD.cs | 13 ++- Scripts/Engines/ConPVP/DuelContext.cs | 2 + Scripts/Engines/Craft/Core/CraftItem.cs | 6 -- Scripts/Engines/Craft/Core/Repair.cs | 4 + Scripts/Engines/Craft/Core/Resmelt.cs | 8 +- Scripts/Engines/Craft/DefBlacksmithy.cs | 3 +- Scripts/Engines/Craft/DefGlassblowing.cs | 2 +- Scripts/Engines/Craft/DefMasonry.cs | 2 +- Scripts/Engines/Craft/DefTailoring.cs | 18 ---- Scripts/Engines/Craft/DefTinkering.cs | 4 +- Scripts/Engines/Factions/Gumps/FinanceGump.cs | 4 + Scripts/Engines/Factions/Gumps/SheriffGump.cs | 4 + Scripts/Engines/Harvest/Lumberjacking.cs | 8 +- Scripts/Engines/MyRunUO/Config.cs | 16 ++-- .../Engines/VeteranRewards/RewardSystem.cs | 2 +- Scripts/Gumps/ReportMurderer.cs | 1 + Scripts/Gumps/SetSecureLevelGump.cs | 2 +- Scripts/Items/Armor/Helmets/OrcHelm.cs | 8 +- Scripts/Items/Clothing/Hats.cs | 8 +- Scripts/Items/Deeds/NameChangeDeed.cs | 91 ++++++++++++++++++- Scripts/Items/Maps/TreasureMap.cs | 10 +- Scripts/Items/Misc/Bola.cs | 28 +++--- Scripts/Items/Misc/BolaBall.cs | 3 - Scripts/Items/Resources/Masonry/Granite.cs | 2 +- Scripts/Items/Resources/Tailor/Hides.cs | 16 +--- Scripts/Items/Shields/BaseShield.cs | 49 +++++----- Scripts/Items/Skill Items/Magical/Runebook.cs | 2 +- Scripts/Items/Special/Holiday/Stockings.cs | 14 ++- Scripts/Items/Weapons/Axes/BaseAxe.cs | 12 ++- Scripts/Items/Weapons/BaseMeleeWeapon.cs | 2 +- Scripts/Items/Weapons/BaseWeapon.cs | 16 +++- Scripts/Misc/CharacterCreation.cs | 11 +-- .../Winter2004/LightOfTheWinterSolstice.cs | 3 +- Scripts/Misc/WeightOverloading.cs | 2 +- Scripts/Mobiles/AI/BaseAI.cs | 34 +++++-- Scripts/Mobiles/AI/MageAI.cs | 4 +- Scripts/Mobiles/AI/SpeedInfo.cs | 2 +- Scripts/Mobiles/Animals/Misc/PackHorse.cs | 4 +- .../Mobiles/Animals/Reptiles/IceSerpent.cs | 2 +- .../Mobiles/Monsters/Ants/BlackSolenQueen.cs | 2 +- .../Monsters/Ants/BlackSolenWarrior.cs | 2 +- .../Mobiles/Monsters/Ants/RedSolenQueen.cs | 2 +- .../Mobiles/Monsters/Ants/RedSolenWarrior.cs | 2 +- .../Monsters/Humanoid/Magic/SavageShaman.cs | 2 +- .../Monsters/Humanoid/Melee/BoneKnight.cs | 2 +- .../Mobiles/Monsters/Humanoid/Melee/Zombie.cs | 2 +- .../Monsters/Misc/Melee/EnergyVortex.cs | 2 +- .../Monsters/Reptile/Magic/WhiteWyrm.cs | 7 +- .../Mobiles/Monsters/Reptile/Melee/Wyvern.cs | 2 +- Scripts/Mobiles/Vendors/PlayerBarkeeper.cs | 19 ++-- .../Vendors/SBInfo/Armors/SBLeatherArmor.cs | 1 - .../Vendors/SBInfo/Armors/SBMetalShields.cs | 1 - .../Vendors/SBInfo/Armors/SBPlateArmor.cs | 1 - Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs | 8 +- .../Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs | 2 +- Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs | 2 +- Scripts/Mobiles/Vendors/SBInfo/SBBard.cs | 3 +- Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs | 9 -- Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs | 3 +- Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs | 2 +- Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs | 2 +- Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs | 1 - Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs | 1 - Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs | 2 - Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs | 4 - Scripts/Multis/Boats/Plank.cs | 4 + Scripts/Multis/Camps/OrcCamp.cs | 4 +- Scripts/Multis/Camps/RatCamp.cs | 4 +- Scripts/Multis/HouseFoundation.cs | 7 +- Scripts/Regions/HouseRegion.cs | 7 +- Scripts/Skills/AnimalTaming.cs | 2 +- Scripts/Skills/Begging.cs | 2 +- Scripts/Skills/Peacemaking.cs | 2 +- .../{Ressurection => Resurrection}/ResGate.cs | 0 Scripts/Spells/Fourth/ArchProtection.cs | 32 +++++-- 78 files changed, 360 insertions(+), 231 deletions(-) rename Scripts/SpecialSystems/Items/{Ressurection => Resurrection}/ResGate.cs (100%) diff --git a/Scripts/Commands/Decorate.cs b/Scripts/Commands/Decorate.cs index ea61623e6..572f74176 100644 --- a/Scripts/Commands/Decorate.cs +++ b/Scripts/Commands/Decorate.cs @@ -81,6 +81,9 @@ namespace Server.Commands public Item Construct() { + if ( m_Type == null ) + return null; + Item item; try diff --git a/Scripts/Commands/DecorateMag.cs b/Scripts/Commands/DecorateMag.cs index 3228b189e..8025cbd78 100644 --- a/Scripts/Commands/DecorateMag.cs +++ b/Scripts/Commands/DecorateMag.cs @@ -78,6 +78,9 @@ namespace Server.Commands public Item Construct() { + if ( m_Type == null ) + return null; + Item item; try diff --git a/Scripts/Engines/BulkOrders/LargeBOD.cs b/Scripts/Engines/BulkOrders/LargeBOD.cs index f6627ba9d..9414181f9 100644 --- a/Scripts/Engines/BulkOrders/LargeBOD.cs +++ b/Scripts/Engines/BulkOrders/LargeBOD.cs @@ -3,6 +3,7 @@ using System.Collections; using Server; using Server.Items; using System.Collections.Generic; +using Server.Mobiles; namespace Server.Engines.BulkOrders { @@ -117,9 +118,19 @@ namespace Server.Engines.BulkOrders list.Add( 1060658 + i, "#{0}\t{1}", m_Entries[i].Details.Number, m_Entries[i].Amount ); // ~1_val~: ~2_val~ } + public override void OnDoubleClickNotAccessible( Mobile from ) + { + OnDoubleClick( from ); + } + + public override void OnDoubleClickSecureTrade( Mobile from ) + { + OnDoubleClick( from ); + } + public override void OnDoubleClick( Mobile from ) { - if ( IsChildOf( from.Backpack ) ) + if ( IsChildOf( from.Backpack ) || InSecureTrade || RootParent is PlayerVendor ) from.SendGump( new LargeBODGump( from, this ) ); else from.SendLocalizedMessage( 1045156 ); // You must have the deed in your backpack to use it. diff --git a/Scripts/Engines/BulkOrders/SmallBOD.cs b/Scripts/Engines/BulkOrders/SmallBOD.cs index b26b3766c..cc2752b15 100644 --- a/Scripts/Engines/BulkOrders/SmallBOD.cs +++ b/Scripts/Engines/BulkOrders/SmallBOD.cs @@ -3,6 +3,7 @@ using System.Collections; using Server; using Server.Items; using System.Collections.Generic; +using Server.Mobiles; namespace Server.Engines.BulkOrders { @@ -96,12 +97,22 @@ namespace Server.Engines.BulkOrders public override void OnDoubleClick( Mobile from ) { - if ( IsChildOf( from.Backpack ) ) + if ( IsChildOf( from.Backpack ) || InSecureTrade || RootParent is PlayerVendor ) from.SendGump( new SmallBODGump( from, this ) ); else from.SendLocalizedMessage( 1045156 ); // You must have the deed in your backpack to use it. } + public override void OnDoubleClickNotAccessible( Mobile from ) + { + OnDoubleClick( from ); + } + + public override void OnDoubleClickSecureTrade( Mobile from ) + { + OnDoubleClick( from ); + } + public void BeginCombine( Mobile from ) { if ( m_AmountCur < m_AmountMax ) diff --git a/Scripts/Engines/ConPVP/DuelContext.cs b/Scripts/Engines/ConPVP/DuelContext.cs index 3d4c66238..00faf8437 100644 --- a/Scripts/Engines/ConPVP/DuelContext.cs +++ b/Scripts/Engines/ConPVP/DuelContext.cs @@ -1682,6 +1682,8 @@ namespace Server.Engines.ConPVP mob.MeleeDamageAbsorb = 0; Spells.Second.ProtectionSpell.Registry.Remove( mob ); + Spells.Fourth.ArchProtectionSpell.RemoveEntry( mob ); + mob.EndAction( typeof( DefensiveSpell ) ); } diff --git a/Scripts/Engines/Craft/Core/CraftItem.cs b/Scripts/Engines/Craft/Core/CraftItem.cs index b371f7e95..7239b4546 100644 --- a/Scripts/Engines/Craft/Core/CraftItem.cs +++ b/Scripts/Engines/Craft/Core/CraftItem.cs @@ -81,7 +81,6 @@ namespace Server.Engines.Craft m_Recipe = new Recipe( id, system, this ); } - private static Dictionary _itemIds = new Dictionary(); public static int ItemIDOf( Type type ) { @@ -396,11 +395,6 @@ namespace Server.Engines.Craft public bool RetainsColorFrom( CraftSystem system, Type type ) { - if (DefTailoring.IsNonColorable(m_Type)) - { - return false; - } - if ( system.RetainsColorFrom( this, type ) ) return true; diff --git a/Scripts/Engines/Craft/Core/Repair.cs b/Scripts/Engines/Craft/Core/Repair.cs index f7c6c6448..b761b13d6 100644 --- a/Scripts/Engines/Craft/Core/Repair.cs +++ b/Scripts/Engines/Craft/Core/Repair.cs @@ -316,6 +316,10 @@ namespace Server.Engines.Craft { number = 1044275; // The item must be in your backpack to repair it. } + else if ( !Core.AOS && weapon.PoisonCharges != 0 ) + { + number = 1005012; // You cannot repair an item while a caustic substance is on it. + } else if ( weapon.MaxHitPoints <= 0 || weapon.HitPoints == weapon.MaxHitPoints ) { number = 1044281; // That item is in full repair diff --git a/Scripts/Engines/Craft/Core/Resmelt.cs b/Scripts/Engines/Craft/Core/Resmelt.cs index f95e56d13..7a9a39aff 100644 --- a/Scripts/Engines/Craft/Core/Resmelt.cs +++ b/Scripts/Engines/Craft/Core/Resmelt.cs @@ -48,6 +48,10 @@ namespace Server.Engines.Craft { try { + + if ( Ethics.Ethic.IsImbued( item ) ) + return SmeltResult.Invalid; + if ( CraftResources.GetType( resource ) != CraftResourceType.Metal ) return SmeltResult.Invalid; @@ -122,7 +126,7 @@ namespace Server.Engines.Craft else if ( !forge ) num = 1044265; // You must be near a forge. } - + from.SendGump( new CraftGump( from, m_CraftSystem, m_Tool, num ) ); } else @@ -154,7 +158,7 @@ namespace Server.Engines.Craft case SmeltResult.NoSkill: message = 1044269; break; // You have no idea how to work this metal. case SmeltResult.Success: message = isStoreBought ? 500418 : 1044270; break; // You melt the item down into ingots. } - + from.SendGump( new CraftGump( from, m_CraftSystem, m_Tool, message ) ); } } diff --git a/Scripts/Engines/Craft/DefBlacksmithy.cs b/Scripts/Engines/Craft/DefBlacksmithy.cs index 604dee139..9497f5cd0 100644 --- a/Scripts/Engines/Craft/DefBlacksmithy.cs +++ b/Scripts/Engines/Craft/DefBlacksmithy.cs @@ -231,7 +231,6 @@ namespace Server.Engines.Craft if( Core.SE ) { - index = AddCraft( typeof( PlateMempo ), 1011078, 1030180, 80.0, 130.0, typeof( IronIngot ), 1044036, 18, 1044037 ); SetNeededExpansion( index, Expansion.SE ); @@ -256,7 +255,7 @@ namespace Server.Engines.Craft AddCraft( typeof( Helmet ), 1011079, 1025130, 37.9, 87.9, typeof( IronIngot ), 1044036, 15, 1044037 ); AddCraft( typeof( NorseHelm ), 1011079, 1025134, 37.9, 87.9, typeof( IronIngot ), 1044036, 15, 1044037 ); AddCraft( typeof( PlateHelm ), 1011079, 1025138, 62.6, 112.6, typeof( IronIngot ), 1044036, 15, 1044037 ); - + if( Core.SE ) { index = AddCraft( typeof( ChainHatsuburi ), 1011079, 1030175, 30.0, 80.0, typeof( IronIngot ), 1044036, 20, 1044037 ); diff --git a/Scripts/Engines/Craft/DefGlassblowing.cs b/Scripts/Engines/Craft/DefGlassblowing.cs index 0d13bdd6a..8e5507fa6 100644 --- a/Scripts/Engines/Craft/DefGlassblowing.cs +++ b/Scripts/Engines/Craft/DefGlassblowing.cs @@ -131,7 +131,7 @@ namespace Server.Engines.Craft AddCraft( typeof( EmptyVialsWRack ), 1044050, 1044616, 65.0, 115.0, typeof( Sand ), 1044625, 8, 1044627 ); AddCraft( typeof( FullVialsWRack ), 1044050, 1044617, 65.0, 115.0, typeof( Sand ), 1044625, 9, 1044627 ); AddCraft( typeof( SpinningHourglass ), 1044050, 1044618, 75.0, 125.0, typeof( Sand ), 1044625, 10, 1044627 ); - + if ( Core.ML ) { index = AddCraft( typeof( HollowPrism ), 1044050, 1072895, 100.0, 150.0, typeof( Sand ), 1044625, 8, 1044627 ); diff --git a/Scripts/Engines/Craft/DefMasonry.cs b/Scripts/Engines/Craft/DefMasonry.cs index 6c1674288..31331068f 100644 --- a/Scripts/Engines/Craft/DefMasonry.cs +++ b/Scripts/Engines/Craft/DefMasonry.cs @@ -111,7 +111,7 @@ namespace Server.Engines.Craft // Decorations AddCraft( typeof( Vase ), 1044501, 1022888, 52.5, 102.5, typeof( Granite ), 1044514, 1, 1044513 ); AddCraft( typeof( LargeVase ), 1044501, 1022887, 52.5, 102.5, typeof( Granite ), 1044514, 3, 1044513 ); - + if( Core.SE ) { int index = AddCraft( typeof( SmallUrn ), 1044501, 1029244, 82.0, 132.0, typeof( Granite ), 1044514, 3, 1044513 ); diff --git a/Scripts/Engines/Craft/DefTailoring.cs b/Scripts/Engines/Craft/DefTailoring.cs index af2fe512c..f926b49f3 100644 --- a/Scripts/Engines/Craft/DefTailoring.cs +++ b/Scripts/Engines/Craft/DefTailoring.cs @@ -49,24 +49,6 @@ namespace Server.Engines.Craft return 0; } - public static bool IsNonColorable(Type type) - { - for (int i = 0; i < m_TailorNonColorables.Length; ++i) - { - if (m_TailorNonColorables[i] == type) - { - return true; - } - } - - return false; - } - - private static Type[] m_TailorNonColorables = new Type[] - { - typeof( OrcHelm ) - }; - private static Type[] m_TailorColorables = new Type[] { typeof( GozaMatEastDeed ), typeof( GozaMatSouthDeed ), diff --git a/Scripts/Engines/Craft/DefTinkering.cs b/Scripts/Engines/Craft/DefTinkering.cs index f25a33262..b8a78e662 100644 --- a/Scripts/Engines/Craft/DefTinkering.cs +++ b/Scripts/Engines/Craft/DefTinkering.cs @@ -201,7 +201,7 @@ namespace Server.Engines.Craft AddCraft( typeof( BarrelHoops ), 1044047, 1024321, -15.0, 35.0, typeof( IronIngot ), 1044036, 5, 1044037 ); AddCraft( typeof( Hinge ), 1044047, 1024181, 5.0, 55.0, typeof( IronIngot ), 1044036, 2, 1044037 ); AddCraft( typeof( BolaBall ), 1044047, 1023699, 45.0, 95.0, typeof( IronIngot ), 1044036, 10, 1044037 ); - + if ( Core.ML ) { index = AddCraft( typeof( JeweledFiligree ), 1044047, 1072894, 70.0, 110.0, typeof( IronIngot ), 1044036, 2, 1044037 ); @@ -209,7 +209,6 @@ namespace Server.Engines.Craft AddRes( index, typeof( Ruby ), 1044234, 1, 1044253 ); SetNeededExpansion( index, Expansion.ML ); } - #endregion #region Utensils @@ -256,7 +255,6 @@ namespace Server.Engines.Craft index = AddCraft( typeof( FancyWindChimes ), 1044050, 1030291, 80.0, 130.0, typeof( IronIngot ), 1044036, 15, 1044037 ); SetNeededExpansion( index, Expansion.SE ); - } #endregion diff --git a/Scripts/Engines/Factions/Gumps/FinanceGump.cs b/Scripts/Engines/Factions/Gumps/FinanceGump.cs index 5c6d85626..1b43b466f 100644 --- a/Scripts/Engines/Factions/Gumps/FinanceGump.cs +++ b/Scripts/Engines/Factions/Gumps/FinanceGump.cs @@ -2,6 +2,7 @@ using System; using Server; using Server.Gumps; using Server.Mobiles; +using Server.Multis; using Server.Network; using Server.Targeting; using System.Collections.Generic; @@ -255,6 +256,9 @@ namespace Server.Factions { m_From.SendLocalizedMessage( 1010306 ); // You currently have too many of this enhancement type to place another } + else if ( BaseBoat.FindBoatAt( m_From.Location, m_From.Map ) != null ) { + m_From.SendMessage( "You cannot place a vendor here" ); + } else if ( m_Town.Silver >= vendorList.Definition.Price ) { BaseFactionVendor vendor = vendorList.Construct( m_Town, m_Faction ); diff --git a/Scripts/Engines/Factions/Gumps/SheriffGump.cs b/Scripts/Engines/Factions/Gumps/SheriffGump.cs index 13a5846a7..b99970b13 100644 --- a/Scripts/Engines/Factions/Gumps/SheriffGump.cs +++ b/Scripts/Engines/Factions/Gumps/SheriffGump.cs @@ -2,6 +2,7 @@ using System; using Server; using Server.Gumps; using Server.Mobiles; +using Server.Multis; using Server.Network; using Server.Targeting; using System.Collections.Generic; @@ -157,6 +158,9 @@ namespace Server.Factions { m_From.SendLocalizedMessage( 1010306 ); // You currently have too many of this enhancement type to place another } + else if ( BaseBoat.FindBoatAt( m_From.Location, m_From.Map ) != null ) { + m_From.SendMessage( "You cannot place a guard here" ); + } else if ( m_Town.Silver >= guardList.Definition.Price ) { BaseFactionGuard guard = guardList.Construct(); diff --git a/Scripts/Engines/Harvest/Lumberjacking.cs b/Scripts/Engines/Harvest/Lumberjacking.cs index 2d4e409cc..3b060b546 100644 --- a/Scripts/Engines/Harvest/Lumberjacking.cs +++ b/Scripts/Engines/Harvest/Lumberjacking.cs @@ -135,7 +135,13 @@ namespace Server.Engines.Harvest public override bool CheckHarvest( Mobile from, Item tool ) { if ( !base.CheckHarvest( from, tool ) ) - return false; + return false; + + if ( tool.Parent != from ) + { + from.SendLocalizedMessage( 500487 ); // The axe must be equipped for any serious wood chopping. + return false; + } return true; } diff --git a/Scripts/Engines/MyRunUO/Config.cs b/Scripts/Engines/MyRunUO/Config.cs index 58a72a4bf..d7e44c25f 100644 --- a/Scripts/Engines/MyRunUO/Config.cs +++ b/Scripts/Engines/MyRunUO/Config.cs @@ -10,20 +10,20 @@ namespace Server.Engines.MyRunUO public static bool Enabled = false; // Details required for database connection string - public static string DatabaseDriver = "{MySQL ODBC 3.51 Driver}"; - public static string DatabaseServer = "localhost"; - public static string DatabaseName = "MyRunUO"; - public static string DatabaseUserID = "username"; - public static string DatabasePassword = "password"; + public const string DatabaseDriver = "{MySQL ODBC 3.51 Driver}"; + public const string DatabaseServer = "localhost"; + public const string DatabaseName = "MyRunUO"; + public const string DatabaseUserID = "username"; + public const string DatabasePassword = "password"; // Should the database use transactions? This is recommended - public static bool UseTransactions = true; + public const bool UseTransactions = true; // Use optimized table loading techniques? (LOAD DATA INFILE) - public static bool LoadDataInFile = true; + public const bool LoadDataInFile = true; // This must be enabled if the database server is on a remote machine. - public static bool DatabaseNonLocal = ( DatabaseServer != "localhost" ); + public const bool DatabaseNonLocal = ( DatabaseServer != "localhost" ); // Text encoding used public static Encoding EncodingIO = Encoding.ASCII; diff --git a/Scripts/Engines/VeteranRewards/RewardSystem.cs b/Scripts/Engines/VeteranRewards/RewardSystem.cs index a3f5d518e..4438eb6a0 100644 --- a/Scripts/Engines/VeteranRewards/RewardSystem.cs +++ b/Scripts/Engines/VeteranRewards/RewardSystem.cs @@ -248,7 +248,7 @@ namespace Server.Engines.VeteranRewards public static int GetRewardYearLabel( Item item, object[] args ) { - int level = GetRewardYear( item, args ); + int level = GetRewardYear( item, args ); return 1076216 + ( ( level < 10 ) ? level : ( level < 12 ) ? (( level - 9 ) + 4240 ) : (( level - 11 ) + 37585 ) ); } diff --git a/Scripts/Gumps/ReportMurderer.cs b/Scripts/Gumps/ReportMurderer.cs index 2058858ce..7b433ecb0 100644 --- a/Scripts/Gumps/ReportMurderer.cs +++ b/Scripts/Gumps/ReportMurderer.cs @@ -35,6 +35,7 @@ namespace Server.Gumps ai.CanReportMurder = false; } } + if ( ai.Attacker.Player && (DateTime.Now - ai.LastCombatTime) < TimeSpan.FromSeconds( 30.0 ) && !toGive.Contains( ai.Attacker ) ) toGive.Add( ai.Attacker ); } diff --git a/Scripts/Gumps/SetSecureLevelGump.cs b/Scripts/Gumps/SetSecureLevelGump.cs index cb1935c29..779d6e700 100644 --- a/Scripts/Gumps/SetSecureLevelGump.cs +++ b/Scripts/Gumps/SetSecureLevelGump.cs @@ -85,7 +85,7 @@ namespace Server.Gumps } else { - m_Info.Level = level; + m_Info.Level = level; state.Mobile.SendLocalizedMessage( 1061280 ); // New access level set. } } diff --git a/Scripts/Items/Armor/Helmets/OrcHelm.cs b/Scripts/Items/Armor/Helmets/OrcHelm.cs index 6ae97b9f5..acc276d36 100644 --- a/Scripts/Items/Armor/Helmets/OrcHelm.cs +++ b/Scripts/Items/Armor/Helmets/OrcHelm.cs @@ -23,7 +23,7 @@ namespace Server.Items public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } } public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } } - + public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.None; } } [Constructable] @@ -38,7 +38,7 @@ namespace Server.Items public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); - writer.Write( (int) 0 ); + writer.Write( (int) 1 ); } public override void Deserialize(GenericReader reader) @@ -46,9 +46,9 @@ namespace Server.Items base.Deserialize( reader ); int version = reader.ReadInt(); - if( version == 0 && Weight == 1 ) + if( version == 0 && ( Weight == 1 || Weight == 5 ) ) { - Weight = 5; + Weight = -1; } } } diff --git a/Scripts/Items/Clothing/Hats.cs b/Scripts/Items/Clothing/Hats.cs index e62e106e2..f9ab30741 100644 --- a/Scripts/Items/Clothing/Hats.cs +++ b/Scripts/Items/Clothing/Hats.cs @@ -753,8 +753,8 @@ namespace Server.Items int version = reader.ReadInt(); - if ( Hue != 0x8A4 ) - Hue = 0x8A4; + /*if ( Hue != 0x8A4 ) + Hue = 0x8A4;*/ } } @@ -813,8 +813,8 @@ namespace Server.Items int version = reader.ReadInt(); - if ( Hue != 0 && (Hue < 2101 || Hue > 2130) ) - Hue = GetRandomHue(); + /*if ( Hue != 0 && (Hue < 2101 || Hue > 2130) ) + Hue = GetRandomHue();*/ } } diff --git a/Scripts/Items/Deeds/NameChangeDeed.cs b/Scripts/Items/Deeds/NameChangeDeed.cs index 287fe6806..32ec827e1 100644 --- a/Scripts/Items/Deeds/NameChangeDeed.cs +++ b/Scripts/Items/Deeds/NameChangeDeed.cs @@ -1,7 +1,8 @@ using System; +using Server.Gumps; +using Server.Misc; using Server.Network; using Server.Prompts; -using Server.Items; namespace Server.Items { @@ -15,7 +16,7 @@ namespace Server.Items [Constructable] public NameChangeDeed() : base( 0x14F0 ) { - base.Weight = 1.0; + LootType = LootType.Blessed; } public NameChangeDeed( Serial serial ) : base( serial ) @@ -38,9 +39,91 @@ namespace Server.Items public override void OnDoubleClick( Mobile from ) { - // Do namechange + if ( this.RootParent == from ) + { + from.CloseGump( typeof( NameChangeDeedGump ) ); + from.SendGump( new NameChangeDeedGump( this ) ); + } + else + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } } -} + public class NameChangeDeedGump : Gump + { + Item m_Sender; + public void AddBlackAlpha( int x, int y, int width, int height ) + { + AddImageTiled( x, y, width, height, 2624 ); + AddAlphaRegion( x, y, width, height ); + } + + public void AddTextField( int x, int y, int width, int height, int index ) + { + AddBackground( x - 2, y - 2, width + 4, height + 4, 0x2486 ); + AddTextEntry( x + 2, y + 2, width - 4, height - 4, 0, index, "" ); + } + + public string Center( string text ) + { + return String.Format( "
{0}
", text ); + } + + public string Color( string text, int color ) + { + return String.Format( "{1}", color, text ); + } + + public void AddButtonLabeled( int x, int y, int buttonID, string text ) + { + AddButton( x, y - 1, 4005, 4007, buttonID, GumpButtonType.Reply, 0 ); + AddHtml( x + 35, y, 240, 20, Color( text, 0xFFFFFF ), false, false ); + } + + public NameChangeDeedGump( Item sender ) : base( 50, 50 ) + { + m_Sender = sender; + + Closable=true; + Dragable=true; + Resizable=false; + + AddPage(0); + + AddBlackAlpha( 10, 120, 250, 85 ); + AddHtml( 10, 125, 250, 20, Color( Center( "Name Change Deed" ), 0xFFFFFF ), false, false ); + + AddLabel( 73, 15, 1152, "" ); + AddLabel( 20, 150, 0x480, "New Name:" ); + AddTextField( 100, 150, 150, 20, 0 ); + + AddButtonLabeled( 75, 180, 1, "Submit" ); + } + + public override void OnResponse( NetState sender, RelayInfo info ) + { + if ( m_Sender == null || m_Sender.Deleted || info.ButtonID != 1 || m_Sender.RootParent != sender.Mobile ) + return; + + Mobile m = sender.Mobile; + TextRelay nameEntry = info.GetTextEntry( 0 ); + + string newName = ( nameEntry == null ? null : nameEntry.Text.Trim() ); + + + if ( !NameVerification.Validate( newName, 2, 16, true, true, true, 1, NameVerification.SpaceDashPeriodQuote ) ) + { + m.SendMessage( "That name is unacceptable." ); + return; + } + else + { + m.RawName = newName; + m.SendMessage( "Your name has been changed!" ); + m.SendMessage( String.Format( "You are now known as {0}", newName ) ); + m_Sender.Delete(); + } + } + } +} \ No newline at end of file diff --git a/Scripts/Items/Maps/TreasureMap.cs b/Scripts/Items/Maps/TreasureMap.cs index b5cb71cab..8a2f5c7d8 100644 --- a/Scripts/Items/Maps/TreasureMap.cs +++ b/Scripts/Items/Maps/TreasureMap.cs @@ -685,7 +685,10 @@ namespace Server.Items from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503019 ); // You successfully decode a treasure map! Decoder = from; - LootType = LootType.Blessed; + + if ( Core.AOS ) + LootType = LootType.Blessed; + DisplayTo( from ); } @@ -887,10 +890,9 @@ namespace Server.Items break; } } - if (m_Decoder != null && LootType == LootType.Regular) - { + + if ( Core.AOS && m_Decoder != null && LootType == LootType.Regular) LootType = LootType.Blessed; - } } } diff --git a/Scripts/Items/Misc/Bola.cs b/Scripts/Items/Misc/Bola.cs index 89f8f76f6..dc54901fb 100644 --- a/Scripts/Items/Misc/Bola.cs +++ b/Scripts/Items/Misc/Bola.cs @@ -52,14 +52,16 @@ namespace Server.Items { EtherealMount.StopMounting( from ); - Item one = from.FindItemOnLayer( Layer.OneHanded ); - Item two = from.FindItemOnLayer( Layer.TwoHanded ); + if ( Core.AOS ) { + Item one = from.FindItemOnLayer( Layer.OneHanded ); + Item two = from.FindItemOnLayer( Layer.TwoHanded ); - if ( one != null ) - from.AddToBackpack( one ); + if ( one != null ) + from.AddToBackpack( one ); - if ( two != null ) - from.AddToBackpack( two ); + if ( two != null ) + from.AddToBackpack( two ); + } from.Target = new BolaTarget( this ); from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...* @@ -143,14 +145,16 @@ namespace Server.Items { EtherealMount.StopMounting( from ); - Item one = from.FindItemOnLayer( Layer.OneHanded ); - Item two = from.FindItemOnLayer( Layer.TwoHanded ); + if ( Core.AOS ) { + Item one = from.FindItemOnLayer( Layer.OneHanded ); + Item two = from.FindItemOnLayer( Layer.TwoHanded ); - if ( one != null ) - from.AddToBackpack( one ); + if ( one != null ) + from.AddToBackpack( one ); - if ( two != null ) - from.AddToBackpack( two ); + if ( two != null ) + from.AddToBackpack( two ); + } from.DoHarmful( to ); diff --git a/Scripts/Items/Misc/BolaBall.cs b/Scripts/Items/Misc/BolaBall.cs index 4aab33bd5..769f4d794 100644 --- a/Scripts/Items/Misc/BolaBall.cs +++ b/Scripts/Items/Misc/BolaBall.cs @@ -34,9 +34,6 @@ namespace Server.Items base.Deserialize( reader ); int version = reader.ReadInt(); - - if ( Hue == 0 ) - Hue = 0x8AC; } } } \ No newline at end of file diff --git a/Scripts/Items/Resources/Masonry/Granite.cs b/Scripts/Items/Resources/Masonry/Granite.cs index 4f86c6bd2..565249678 100644 --- a/Scripts/Items/Resources/Masonry/Granite.cs +++ b/Scripts/Items/Resources/Masonry/Granite.cs @@ -39,7 +39,7 @@ namespace Server.Items break; } } - + if ( version < 1 ) Stackable = Core.ML; } diff --git a/Scripts/Items/Resources/Tailor/Hides.cs b/Scripts/Items/Resources/Tailor/Hides.cs index bfdf00722..8afc3dda6 100644 --- a/Scripts/Items/Resources/Tailor/Hides.cs +++ b/Scripts/Items/Resources/Tailor/Hides.cs @@ -134,13 +134,11 @@ namespace Server.Items int version = reader.ReadInt(); } - - public bool Scissor( Mobile from, Scissors scissors ) { if ( Deleted || !from.CanSee( this ) ) return false; - if ( !IsChildOf ( from.Backpack ) ) + if ( Core.AOS && !IsChildOf ( from.Backpack ) ) { from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack return false; @@ -182,13 +180,11 @@ namespace Server.Items int version = reader.ReadInt(); } - - public bool Scissor( Mobile from, Scissors scissors ) { if ( Deleted || !from.CanSee( this ) ) return false; - if ( !IsChildOf ( from.Backpack ) ) + if ( Core.AOS && !IsChildOf ( from.Backpack ) ) { from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack return false; @@ -231,13 +227,11 @@ namespace Server.Items int version = reader.ReadInt(); } - - public bool Scissor( Mobile from, Scissors scissors ) { if ( Deleted || !from.CanSee( this ) ) return false; - if ( !IsChildOf ( from.Backpack ) ) + if ( Core.AOS && !IsChildOf ( from.Backpack ) ) { from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack return false; @@ -280,13 +274,11 @@ namespace Server.Items int version = reader.ReadInt(); } - - public bool Scissor( Mobile from, Scissors scissors ) { if ( Deleted || !from.CanSee( this ) ) return false; - if ( !IsChildOf ( from.Backpack ) ) + if ( Core.AOS && !IsChildOf ( from.Backpack ) ) { from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack return false; diff --git a/Scripts/Items/Shields/BaseShield.cs b/Scripts/Items/Shields/BaseShield.cs index b4b327055..8f7411fbc 100644 --- a/Scripts/Items/Shields/BaseShield.cs +++ b/Scripts/Items/Shields/BaseShield.cs @@ -145,40 +145,33 @@ namespace Server.Items if( 25 > Utility.Random( 100 ) ) // 25% chance to lower durability { - if( Core.AOS && ArmorAttributes.SelfRepair > Utility.Random( 10 ) ) - { - HitPoints += 2; - } - else - { - int wear = Utility.Random( 2 ); + int wear = Utility.Random( 2 ); - if( wear > 0 && MaxHitPoints > 0 ) + if( wear > 0 && MaxHitPoints > 0 ) + { + if( HitPoints >= wear ) { - if( HitPoints >= wear ) + HitPoints -= wear; + wear = 0; + } + else + { + wear -= HitPoints; + HitPoints = 0; + } + + if( wear > 0 ) + { + if( MaxHitPoints > wear ) { - HitPoints -= wear; - wear = 0; + MaxHitPoints -= wear; + + if( Parent is Mobile ) + ((Mobile)Parent).LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged. } else { - wear -= HitPoints; - HitPoints = 0; - } - - if( wear > 0 ) - { - if( MaxHitPoints > wear ) - { - MaxHitPoints -= wear; - - if( Parent is Mobile ) - ((Mobile)Parent).LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged. - } - else - { - Delete(); - } + Delete(); } } } diff --git a/Scripts/Items/Skill Items/Magical/Runebook.cs b/Scripts/Items/Skill Items/Magical/Runebook.cs index 63d055ad6..4f5fb4a0d 100644 --- a/Scripts/Items/Skill Items/Magical/Runebook.cs +++ b/Scripts/Items/Skill Items/Magical/Runebook.cs @@ -288,7 +288,7 @@ namespace Server.Items public override void GetProperties( ObjectPropertyList list ) { base.GetProperties( list ); - + if ( m_Quality == BookQuality.Exceptional ) list.Add( 1063341 ); // exceptional diff --git a/Scripts/Items/Special/Holiday/Stockings.cs b/Scripts/Items/Special/Holiday/Stockings.cs index efd9794d8..07f227a7c 100644 --- a/Scripts/Items/Special/Holiday/Stockings.cs +++ b/Scripts/Items/Special/Holiday/Stockings.cs @@ -3,13 +3,16 @@ using Server; namespace Server.Items { + [Furniture] [FlipableAttribute( 0x2bd9, 0x2bda )] public class GreenStocking : BaseContainer { + public override int DefaultGumpID{ get{ return 0x103; } } + public override int DefaultDropSound{ get{ return 0x42; } } + [Constructable] - public GreenStocking() : base ( 0x2bd9 ) + public GreenStocking() : base ( Utility.Random( 0x2BD9, 2 ) ) { - GumpID = 0x103; } public GreenStocking( Serial serial ) : base( serial ) @@ -29,13 +32,16 @@ namespace Server.Items } } + [Furniture] [FlipableAttribute( 0x2bdb, 0x2bdc )] public class RedStocking : BaseContainer { + public override int DefaultGumpID{ get{ return 0x103; } } + public override int DefaultDropSound{ get{ return 0x42; } } + [Constructable] - public RedStocking() : base ( 0x2bdb ) + public RedStocking() : base ( Utility.Random( 0x2BDB, 2 ) ) { - GumpID = 0x103; } public RedStocking( Serial serial ) : base( serial ) diff --git a/Scripts/Items/Weapons/Axes/BaseAxe.cs b/Scripts/Items/Weapons/Axes/BaseAxe.cs index fd546cc4e..4d050950d 100644 --- a/Scripts/Items/Weapons/Axes/BaseAxe.cs +++ b/Scripts/Items/Weapons/Axes/BaseAxe.cs @@ -5,6 +5,7 @@ using Server; using Server.Items; using Server.Engines.Harvest; using Server.ContextMenus; +using Server.Network; namespace Server.Items { @@ -80,7 +81,7 @@ namespace Server.Items public override void OnDoubleClick( Mobile from ) { - if ( HarvestSystem == null ) + if ( HarvestSystem == null || Deleted ) return; Point3D loc = GetWorldLocation(); @@ -90,8 +91,13 @@ namespace Server.Items from.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that return; } - - if ( !( HarvestSystem is Mining ) ) + else if ( !this.IsAccessibleTo( from ) ) + { + this.PublicOverheadMessage( MessageType.Regular, 0x3E9, 1061637 ); // You are not allowed to access this. + return; + } + + if ( !(this.HarvestSystem is Mining) ) from.SendLocalizedMessage( 1010018 ); // What do you want to use this item on? HarvestSystem.BeginHarvesting( from, this ); diff --git a/Scripts/Items/Weapons/BaseMeleeWeapon.cs b/Scripts/Items/Weapons/BaseMeleeWeapon.cs index a5e527f2e..beff008ac 100644 --- a/Scripts/Items/Weapons/BaseMeleeWeapon.cs +++ b/Scripts/Items/Weapons/BaseMeleeWeapon.cs @@ -22,7 +22,7 @@ namespace Server.Items if ( Core.AOS ) return damage; - + int absorb = defender.MeleeDamageAbsorb; if ( absorb > 0 ) diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index 6312cfec5..e57bb95f2 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -1243,6 +1243,10 @@ namespace Server.Items if ( Core.AOS ) return AbsorbDamageAOS( attacker, defender, damage ); + BaseShield shield = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield; + if ( shield != null ) + damage = shield.OnHit( this, damage ); + double chance = Utility.RandomDouble(); Item armorItem; @@ -1265,10 +1269,6 @@ namespace Server.Items if ( armor != null ) damage = armor.OnHit( this, damage ); - BaseShield shield = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield; - if ( shield != null ) - damage = shield.OnHit( this, damage ); - int virtualArmor = defender.VirtualArmor + defender.VirtualArmorMod; if ( virtualArmor > 0 ) @@ -2345,7 +2345,13 @@ namespace Server.Items if ( Core.AOS ) return ComputeDamageAOS( attacker, defender ); - return (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true ); + int damage = (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true ); + + // pre-AOS, halve damage if the defender is a player or the attacker is not a player + if ( defender is PlayerMobile || !( attacker is PlayerMobile ) ) + damage = (int)(damage / 2.0); + + return damage; } public virtual void PlayHurtAnimation( Mobile from ) diff --git a/Scripts/Misc/CharacterCreation.cs b/Scripts/Misc/CharacterCreation.cs index 384bc096e..890625ef2 100644 --- a/Scripts/Misc/CharacterCreation.cs +++ b/Scripts/Misc/CharacterCreation.cs @@ -1054,7 +1054,6 @@ namespace Server.Misc regs.LootType = LootType.Regular; - EquipItem( new BoneHelm() ); if ( elf ) @@ -1125,7 +1124,7 @@ namespace Server.Misc break; } - + case 6: // Samurai { addSkillItems = false; @@ -1279,7 +1278,7 @@ namespace Server.Misc return item; } - private static void AddSkillItems( SkillName skill, Mobile m ) + private static void AddSkillItems( SkillName skill, Mobile m ) { bool elf = (m.Race == Race.Elf); @@ -1320,14 +1319,12 @@ namespace Server.Misc } else { - EquipItem( new Robe( Utility.RandomPinkHue() ) ); + EquipItem( new Robe( hue ) ); } break; } case SkillName.AnimalLore: { - - int hue = Utility.RandomBlueHue(); if ( elf ) @@ -1483,7 +1480,7 @@ namespace Server.Misc } else { - EquipItem( new FloppyHat( Utility.RandomYellowHue() ) ); + EquipItem( new FloppyHat( hue ) ); } break; diff --git a/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs b/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs index ded548625..5b25843cd 100644 --- a/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs +++ b/Scripts/Misc/Gifts/Winter2004/LightOfTheWinterSolstice.cs @@ -97,7 +97,8 @@ namespace Server.Items } } - Utility.Intern( ref m_Dipper ); + if ( m_Dipper != null ) + m_Dipper = String.Intern( m_Dipper ); } } } \ No newline at end of file diff --git a/Scripts/Misc/WeightOverloading.cs b/Scripts/Misc/WeightOverloading.cs index 1d182b8b0..23fd9b0a4 100644 --- a/Scripts/Misc/WeightOverloading.cs +++ b/Scripts/Misc/WeightOverloading.cs @@ -61,7 +61,7 @@ namespace Server.Misc { Mobile from = e.Mobile; - if ( !from.Alive || from.AccessLevel > AccessLevel.Player ) + if ( !from.Alive || from.AccessLevel > AccessLevel.Player ) return; if ( !from.Player ) diff --git a/Scripts/Mobiles/AI/BaseAI.cs b/Scripts/Mobiles/AI/BaseAI.cs index 2ae4c35bc..d47646e5d 100644 --- a/Scripts/Mobiles/AI/BaseAI.cs +++ b/Scripts/Mobiles/AI/BaseAI.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.IO; using Server; using Server.Items; using Server.Targeting; @@ -904,7 +905,7 @@ namespace Server.Mobiles public virtual bool DoActionCombat() { - if ( CheckHerding() ) + if ( Core.AOS && CheckHerding() ) { m_Mobile.DebugSay( "Praise the shepherd!" ); } @@ -923,7 +924,7 @@ namespace Server.Mobiles public virtual bool DoActionGuard() { - if ( CheckHerding() ) + if ( Core.AOS && CheckHerding() ) { m_Mobile.DebugSay( "Praise the shepherd!" ); } @@ -1298,7 +1299,8 @@ namespace Server.Mobiles else { m_Mobile.Warmode = false; - m_Mobile.CurrentSpeed = 0.1; + if ( Core.AOS ) + m_Mobile.CurrentSpeed = 0.1; } } } @@ -1467,7 +1469,8 @@ namespace Server.Mobiles m_Mobile.DebugSay( "Nothing to guard from" ); m_Mobile.Warmode = false; - m_Mobile.CurrentSpeed = 0.1; + if ( Core.AOS ) + m_Mobile.CurrentSpeed = 0.1; WalkMobileRange( controlMaster, 1, false, 0, 1 ); } @@ -1484,8 +1487,13 @@ namespace Server.Mobiles { m_Mobile.DebugSay( "I think he might be dead. He's not anywhere around here at least. That's cool. I'm glad he's dead." ); - m_Mobile.ControlTarget = m_Mobile.ControlMaster; - m_Mobile.ControlOrder = OrderType.Follow; + if ( Core.AOS ) { + m_Mobile.ControlTarget = m_Mobile.ControlMaster; + m_Mobile.ControlOrder = OrderType.Follow; + } else { + m_Mobile.ControlTarget = null; + m_Mobile.ControlOrder = OrderType.None; + } if( m_Mobile.FightMode == FightMode.Closest || m_Mobile.FightMode == FightMode.Aggressor ) { @@ -1623,7 +1631,7 @@ namespace Server.Mobiles Name = FriendlyNameAttribute.GetFriendlyNameFor( creature.GetType() ).ToString(); //(As Per OSI)No name. Normally, set by the ItemID of the Shrink Item unless we either explicitly set it with an Attribute, or, no lookup found - + Hue = creature.Hue & 0x0FFF; } @@ -1975,6 +1983,14 @@ namespace Server.Mobiles if( delay < 0.0 ) delay = 0.0; + if ( double.IsNaN( delay ) ) { + using( StreamWriter op = new StreamWriter( "nan_transform.txt", true ) ) { + op.WriteLine( String.Format( "NaN in TransformMoveDelay: {0}, {1}, {2}, {3}", DateTime.Now, this.GetType().ToString(), m_Mobile == null ? "null" : m_Mobile.GetType().ToString(), m_Mobile.HitsMax ) ); + } + + return 1.0; + } + return delay; } @@ -2520,7 +2536,7 @@ namespace Server.Mobiles // Ignore players with activated honor if ( m is PlayerMobile && ( (PlayerMobile)m ).HonorActive && !( m_Mobile.Combatant == m )) continue; - + if( acqType == FightMode.Aggressor || acqType == FightMode.Evil ) { // Only acquire this mobile if it attacked us, or if it's evil. @@ -2542,7 +2558,7 @@ namespace Server.Mobiles if( m is BaseCreature && ((BaseCreature)m).Controlled && ((BaseCreature)m).ControlMaster != null ) bValid = ( ((BaseCreature)m).ControlMaster.Karma < 0 ); else - bValid = ( m.Karma < 0 ); + bValid = ( (Core.AOS || m.Player) && m.Karma < 0 ); } if ( !bValid ) diff --git a/Scripts/Mobiles/AI/MageAI.cs b/Scripts/Mobiles/AI/MageAI.cs index 705f9b357..c5829e2e9 100644 --- a/Scripts/Mobiles/AI/MageAI.cs +++ b/Scripts/Mobiles/AI/MageAI.cs @@ -41,7 +41,7 @@ namespace Server.Mobiles public virtual bool IsNecromancer { - get { return ( m_Mobile.Skills[ SkillName.Necromancy ].Value > 50 ); } + get { return ( Core.AOS && m_Mobile.Skills[ SkillName.Necromancy ].Value > 50 ); } } private const double HealChance = 0.10; // 10% chance to heal at gm magery @@ -385,7 +385,7 @@ namespace Server.Mobiles } case 5: // Paralyze them { - if (m_Mobile.Skills[ SkillName.Magery ].Value <= 50.0) + if (c.Paralyzed || m_Mobile.Skills[ SkillName.Magery ].Value <= 50.0) goto default; m_Mobile.DebugSay( "Attempting to paralyze" ); diff --git a/Scripts/Mobiles/AI/SpeedInfo.cs b/Scripts/Mobiles/AI/SpeedInfo.cs index 03ac7fc38..0c1bb39af 100644 --- a/Scripts/Mobiles/AI/SpeedInfo.cs +++ b/Scripts/Mobiles/AI/SpeedInfo.cs @@ -142,7 +142,7 @@ namespace Server typeof( FactionHenchman ), typeof( FactionMercenary ), typeof( FactionNecromancer ), typeof( FactionSorceress ), typeof( FactionWizard ), typeof( FactionBerserker ), typeof( FactionPaladin ), typeof( Leviathan ), typeof( FireBeetle ), - typeof( FanDancer ) + typeof( FanDancer ), typeof( FactionDeathKnight ) } ), /* Medium */ new SpeedInfo( 0.25, 0.5, new Type[] diff --git a/Scripts/Mobiles/Animals/Misc/PackHorse.cs b/Scripts/Mobiles/Animals/Misc/PackHorse.cs index 739c989d2..c4a9b3727 100644 --- a/Scripts/Mobiles/Animals/Misc/PackHorse.cs +++ b/Scripts/Mobiles/Animals/Misc/PackHorse.cs @@ -187,8 +187,8 @@ namespace Server.Mobiles if ( Core.AOS ) return; - //if ( animal.IsBonded || animal.IsDeadPet ) - // return; + if ( animal.IsBonded || animal.IsDeadPet ) + return; Container pack = animal.Backpack; diff --git a/Scripts/Mobiles/Animals/Reptiles/IceSerpent.cs b/Scripts/Mobiles/Animals/Reptiles/IceSerpent.cs index 380195f60..afee9edae 100644 --- a/Scripts/Mobiles/Animals/Reptiles/IceSerpent.cs +++ b/Scripts/Mobiles/Animals/Reptiles/IceSerpent.cs @@ -57,7 +57,7 @@ namespace Server.Mobiles case 8: PackItem( new BonePile() ); break; case 9: PackItem( new BonePile() ); break; } - + if ( 0.025 > Utility.RandomDouble() ) PackItem( new GlacialStaff() ); } diff --git a/Scripts/Mobiles/Monsters/Ants/BlackSolenQueen.cs b/Scripts/Mobiles/Monsters/Ants/BlackSolenQueen.cs index 921bd358b..a8768648e 100644 --- a/Scripts/Mobiles/Monsters/Ants/BlackSolenQueen.cs +++ b/Scripts/Mobiles/Monsters/Ants/BlackSolenQueen.cs @@ -136,7 +136,7 @@ namespace Server.Mobiles { base.Deserialize( reader ); int version = reader.ReadInt(); - + switch( version ) { case 1: diff --git a/Scripts/Mobiles/Monsters/Ants/BlackSolenWarrior.cs b/Scripts/Mobiles/Monsters/Ants/BlackSolenWarrior.cs index 736652a44..0232ec81d 100644 --- a/Scripts/Mobiles/Monsters/Ants/BlackSolenWarrior.cs +++ b/Scripts/Mobiles/Monsters/Ants/BlackSolenWarrior.cs @@ -137,7 +137,7 @@ namespace Server.Mobiles { base.Deserialize( reader ); int version = reader.ReadInt(); - + switch( version ) { case 1: diff --git a/Scripts/Mobiles/Monsters/Ants/RedSolenQueen.cs b/Scripts/Mobiles/Monsters/Ants/RedSolenQueen.cs index 3f1a2bbc6..0d71010b9 100644 --- a/Scripts/Mobiles/Monsters/Ants/RedSolenQueen.cs +++ b/Scripts/Mobiles/Monsters/Ants/RedSolenQueen.cs @@ -136,7 +136,7 @@ namespace Server.Mobiles { base.Deserialize( reader ); int version = reader.ReadInt(); - + switch( version ) { case 1: diff --git a/Scripts/Mobiles/Monsters/Ants/RedSolenWarrior.cs b/Scripts/Mobiles/Monsters/Ants/RedSolenWarrior.cs index ae86ed4c6..5acf20307 100644 --- a/Scripts/Mobiles/Monsters/Ants/RedSolenWarrior.cs +++ b/Scripts/Mobiles/Monsters/Ants/RedSolenWarrior.cs @@ -136,7 +136,7 @@ namespace Server.Mobiles { base.Deserialize( reader ); int version = reader.ReadInt(); - + switch( version ) { case 1: diff --git a/Scripts/Mobiles/Monsters/Humanoid/Magic/SavageShaman.cs b/Scripts/Mobiles/Monsters/Humanoid/Magic/SavageShaman.cs index ba59d540b..3c0368c06 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Magic/SavageShaman.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Magic/SavageShaman.cs @@ -46,7 +46,7 @@ namespace Server.Mobiles Fame = 1000; Karma = -1000; - + PackReg( 10, 15 ); PackItem( new Bandage( Utility.RandomMinMax( 1, 15 ) ) ); diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/BoneKnight.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/BoneKnight.cs index e1367ff26..39dc14d2c 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/BoneKnight.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/BoneKnight.cs @@ -40,7 +40,7 @@ namespace Server.Mobiles Karma = -3000; VirtualArmor = 40; - + switch ( Utility.Random( 6 ) ) { case 0: PackItem( new PlateArms() ); break; diff --git a/Scripts/Mobiles/Monsters/Humanoid/Melee/Zombie.cs b/Scripts/Mobiles/Monsters/Humanoid/Melee/Zombie.cs index 8abf1053c..bcb3223f6 100644 --- a/Scripts/Mobiles/Monsters/Humanoid/Melee/Zombie.cs +++ b/Scripts/Mobiles/Monsters/Humanoid/Melee/Zombie.cs @@ -37,7 +37,7 @@ namespace Server.Mobiles Karma = -600; VirtualArmor = 18; - + switch ( Utility.Random( 10 )) { case 0: PackItem( new LeftArm() ); break; diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs b/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs index 2b738888d..0d551986e 100644 --- a/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs +++ b/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs @@ -97,7 +97,7 @@ namespace Server.Mobiles while ( spirtsOrVortexes.Count > 6 ) { int index = Utility.Random( spirtsOrVortexes.Count ); - //TODO: Confim if it's the dispel with all the pretty effects or just a Deletion of it. + //TODO: Confirm if it's the dispel with all the pretty effects or just a deletion of it. Dispel( ( (Mobile) spirtsOrVortexes[index] ) ); spirtsOrVortexes.RemoveAt( index ); } diff --git a/Scripts/Mobiles/Monsters/Reptile/Magic/WhiteWyrm.cs b/Scripts/Mobiles/Monsters/Reptile/Magic/WhiteWyrm.cs index 9bcd1983b..1a91db201 100644 --- a/Scripts/Mobiles/Monsters/Reptile/Magic/WhiteWyrm.cs +++ b/Scripts/Mobiles/Monsters/Reptile/Magic/WhiteWyrm.cs @@ -8,9 +8,9 @@ namespace Server.Mobiles public class WhiteWyrm : BaseCreature { [Constructable] - public WhiteWyrm () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 ) + public WhiteWyrm() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 ) { - Body = (Utility.Random(1,2)==1) ? 180 : 49; + Body = Utility.RandomBool() ? 180 : 49; Name = "a white wyrm"; BaseSoundID = 362; @@ -80,9 +80,6 @@ namespace Server.Mobiles { base.Deserialize( reader ); int version = reader.ReadInt(); - - if ( Core.AOS && Body == 49 ) - Body = 180; } } } \ No newline at end of file diff --git a/Scripts/Mobiles/Monsters/Reptile/Melee/Wyvern.cs b/Scripts/Mobiles/Monsters/Reptile/Melee/Wyvern.cs index 5b5a4d062..6ca0d2501 100644 --- a/Scripts/Mobiles/Monsters/Reptile/Melee/Wyvern.cs +++ b/Scripts/Mobiles/Monsters/Reptile/Melee/Wyvern.cs @@ -39,7 +39,7 @@ namespace Server.Mobiles Karma = -4000; VirtualArmor = 40; - + PackItem( new LesserPoisonPotion() ); } diff --git a/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs b/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs index c8cb86d4e..c39c534af 100644 --- a/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs +++ b/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs @@ -205,7 +205,10 @@ namespace Server.Mobiles { base.InitBody(); - Hue = 0x83F4; // hue is not random + if ( BodyValue == 0x340 || BodyValue == 0x402 ) + Hue = 0; + else + Hue = 0x83F4; // hue is not random Container pack = this.Backpack; @@ -971,14 +974,16 @@ namespace Server.Mobiles AddButton( 130, 120, 4005, 4007, GetButtonID( 5, 0 ), GumpButtonType.Reply, 0 ); AddHtml( 170, 120, 120, 20, "Title", false, false ); - AddButton( 130, 200, 4005, 4007, GetButtonID( 5, 1 ), GumpButtonType.Reply, 0 ); - AddHtml( 170, 200, 120, 20, "Appearance", false, false ); + if ( m_Barkeeper.BodyValue != 0x340 && m_Barkeeper.BodyValue != 0x402 ) { + AddButton( 130, 200, 4005, 4007, GetButtonID( 5, 1 ), GumpButtonType.Reply, 0 ); + AddHtml( 170, 200, 120, 20, "Appearance", false, false ); - AddButton( 130, 280, 4005, 4007, GetButtonID( 5, 2 ), GumpButtonType.Reply, 0 ); - AddHtml( 170, 280, 120, 20, "Male / Female", false, false ); + AddButton( 130, 280, 4005, 4007, GetButtonID( 5, 2 ), GumpButtonType.Reply, 0 ); + AddHtml( 170, 280, 120, 20, "Male / Female", false, false ); - AddButton( 338, 437, 4014, 4016, 0, GumpButtonType.Page, 1 ); - AddHtml( 290, 440, 35, 40, "Back", false, false ); + AddButton( 338, 437, 4014, 4016, 0, GumpButtonType.Page, 1 ); + AddHtml( 290, 440, 35, 40, "Back", false, false ); + } AddItem( 580, 44, 4033 ); } diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBLeatherArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBLeatherArmor.cs index 8cadb5487..2b26db1a8 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBLeatherArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBLeatherArmor.cs @@ -44,7 +44,6 @@ namespace Server.Mobiles Add( typeof( LeatherLegs ), 40 ); Add( typeof( LeatherCap ), 5 ); - Add( typeof( FemaleLeatherChest ), 18 ); Add( typeof( FemaleStuddedChest ), 25 ); Add( typeof( LeatherShorts ), 14 ); diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBMetalShields.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBMetalShields.cs index cf043ef32..5f279bc2a 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBMetalShields.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBMetalShields.cs @@ -26,7 +26,6 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( HeaterShield ), 231, 20, 0x1B76, 0 ) ); Add( new GenericBuyInfo( typeof( WoodenKiteShield ), 70, 20, 0x1B78, 0 ) ); Add( new GenericBuyInfo( typeof( MetalShield ), 121, 20, 0x1B7B, 0 ) ); - } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBPlateArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBPlateArmor.cs index 158c2ea47..5c326d1bb 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBPlateArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBPlateArmor.cs @@ -25,7 +25,6 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( PlateLegs ), 218, 20, 0x1411, 0 ) ); Add( new GenericBuyInfo( typeof( PlateArms ), 188, 20, 0x1410, 0 ) ); Add( new GenericBuyInfo( typeof( PlateGloves ), 155, 20, 0x1414, 0 ) ); - } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs b/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs index 58ac777b6..5a95643d8 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs @@ -19,14 +19,14 @@ namespace Server.Mobiles public class InternalBuyInfo : List { public InternalBuyInfo() - { + { Add( new GenericBuyInfo( typeof( RefreshPotion ), 15, 10, 0xF0B, 0 ) ); Add( new GenericBuyInfo( typeof( AgilityPotion ), 15, 10, 0xF08, 0 ) ); Add( new GenericBuyInfo( typeof( NightSightPotion ), 15, 10, 0xF06, 0 ) ); Add( new GenericBuyInfo( typeof( LesserHealPotion ), 15, 10, 0xF0C, 0 ) ); Add( new GenericBuyInfo( typeof( StrengthPotion ), 15, 10, 0xF09, 0 ) ); Add( new GenericBuyInfo( typeof( LesserPoisonPotion ), 15, 10, 0xF0A, 0 ) ); - Add( new GenericBuyInfo( typeof( LesserCurePotion ), 15, 10, 0xF07, 0 ) ); + Add( new GenericBuyInfo( typeof( LesserCurePotion ), 15, 10, 0xF07, 0 ) ); Add( new GenericBuyInfo( typeof( LesserExplosionPotion ), 21, 10, 0xF0D, 0 ) ); Add( new GenericBuyInfo( typeof( MortarPestle ), 8, 10, 0xE9B, 0 ) ); @@ -43,10 +43,6 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( HeatingStand ), 2, 100, 0x1849, 0 ) ); Add( new GenericBuyInfo( "1041060", typeof( HairDye ), 37, 10, 0xEFF, 0 ) ); - - Add( new GenericBuyInfo( typeof( HeatingStand ), 2, 100, 0x1849, 0 ) ); // This is on OSI :-P - - } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs b/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs index b61728f9d..cd5962f09 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs @@ -36,7 +36,7 @@ namespace Server.Mobiles Add( new AnimalBuyInfo( 1, typeof( TimberWolf ), 768, 10, 225, 0 ) ); Add( new AnimalBuyInfo( 1, typeof( Rat ), 107, 10, 238, 0 ) ); } - + } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs index 271796a3c..b716bb3d2 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs @@ -27,7 +27,7 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( Muffins ), 3, 20, 0x9EA, 0 ) ); Add( new GenericBuyInfo( typeof( SackFlour ), 3, 20, 0x1039, 0 ) ); Add( new GenericBuyInfo( typeof( FrenchBread ), 5, 20, 0x98C, 0 ) ); - Add( new GenericBuyInfo( typeof( Cookies ), 3, 20, 0x160b, 0 ) ); + Add( new GenericBuyInfo( typeof( Cookies ), 3, 20, 0x160b, 0 ) ); Add( new GenericBuyInfo( typeof( CheesePizza ), 8, 10, 0x1040, 0 ) ); // OSI just has Pizza Add( new GenericBuyInfo( typeof( JarHoney ), 3, 20, 0x9ec, 0 ) ); Add (new GenericBuyInfo( typeof( BowlFlour ), 7, 20, 0xA1E, 0 ) ); diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs index a201db382..6414fb161 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs @@ -23,8 +23,7 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( Drums ), 21, ( 10 ), 0x0E9C, 0 ) ); Add( new GenericBuyInfo( typeof( Tambourine ), 21, ( 10 ), 0x0E9E, 0 ) ); Add( new GenericBuyInfo( typeof( LapHarp ), 21, ( 10 ), 0x0EB2, 0 ) ); - Add( new GenericBuyInfo( typeof( Lute ), 21, ( 10 ), 0x0EB3, 0 ) ); - + Add( new GenericBuyInfo( typeof( Lute ), 21, ( 10 ), 0x0EB3, 0 ) ); } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs b/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs index 7031fae37..2f7933e2f 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs @@ -30,15 +30,6 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( ButcherKnife ), 13, 20, 0x13F6, 0 ) ); Add( new GenericBuyInfo( typeof( Cleaver ), 13, 20, 0xEC3, 0 ) ); Add( new GenericBuyInfo( typeof( SkinningKnife ), 13, 20, 0xEC4, 0 ) ); - - - - - - - - - } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs b/Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs index 55565a7c8..f5cfbd8ab 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs @@ -26,8 +26,7 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( Nightshade ), 3, 20, 0xF88, 0 ) ); Add( new GenericBuyInfo( typeof( Bloodmoss ), 5, 20, 0xF7B, 0 ) ); Add( new GenericBuyInfo( typeof( MortarPestle ), 8, 20, 0xE9B, 0 ) ); - Add( new GenericBuyInfo( typeof( Bottle ), 5, 20, 0xF0E, 0 ) ); - + Add( new GenericBuyInfo( typeof( Bottle ), 5, 20, 0xF0E, 0 ) ); } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs index 11dd195ce..2d343f0c9 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs @@ -23,7 +23,7 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( BlankMap ), 5, 40, 0x14EC, 0 ) ); Add( new GenericBuyInfo( typeof( MapmakersPen ), 8, 20, 0x0FBF, 0 ) ); Add( new GenericBuyInfo( typeof( BlankScroll ), 12, 40, 0xEF3, 0 ) ); - + for ( int i = 0; i < PresetMapEntry.Table.Length; ++i ) Add( new PresetMapBuyInfo( PresetMapEntry.Table[i], Utility.RandomMinMax( 7, 10 ), 20 ) ); } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs b/Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs index 0b814092c..a6d606eff 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs @@ -20,7 +20,7 @@ namespace Server.Mobiles { public InternalBuyInfo() { - Add( new GenericBuyInfo( typeof( MonkRobe ), 136, 20, 0x2687, 0x21E ) ); + if ( Core.AOS ) Add( new GenericBuyInfo( typeof( MonkRobe ), 136, 20, 0x2687, 0x21E ) ); } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs b/Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs index 2c6c3271b..701f5e173 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs @@ -20,7 +20,6 @@ namespace Server.Mobiles { public InternalBuyInfo() { - Add( new GenericBuyInfo( typeof( SewingKit ), 3, 20, 0xF9D, 0 ) ); Add( new GenericBuyInfo( typeof( Scissors ), 11, 20, 0xF9F, 0 ) ); Add( new GenericBuyInfo( typeof( DyeTub ), 8, 20, 0xFAB, 0 ) ); diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs b/Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs index e6b783516..03f14f569 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs @@ -51,7 +51,6 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( SkinningKnife ), 15, 20, 0xEC4, 0 ) ); Add( new GenericBuyInfo( "1041279", typeof( TaxidermyKit ), 100000, 20, 0x1EBA, 0 ) ); - } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs index ae889813d..6d395e691 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs @@ -20,7 +20,6 @@ namespace Server.Mobiles { public InternalBuyInfo() { - Add( new GenericBuyInfo( typeof( Clock ), 22, 20, 0x104B, 0 ) ); Add( new GenericBuyInfo( typeof( Nails ), 3, 20, 0x102E, 0 ) ); Add( new GenericBuyInfo( typeof( ClockParts ), 3, 20, 0x104F, 0 ) ); @@ -75,7 +74,6 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( Tambourine ), 21, 20, 0x0E9E, 0 ) ); Add( new GenericBuyInfo( typeof( LapHarp ), 21, 20, 0x0EB2, 0 ) ); Add( new GenericBuyInfo( typeof( Lute ), 21, 20, 0x0EB3, 0 ) ); - } } diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs b/Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs index 1b321f5df..9cb0d5c20 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs @@ -40,10 +40,6 @@ namespace Server.Mobiles Add( new GenericBuyInfo( typeof( Tourmaline ), 75, 20, 0xF2D, 0 ) ); Add( new GenericBuyInfo( typeof( Amber ), 50, 20, 0xF25, 0 ) ); Add( new GenericBuyInfo( typeof( Diamond ), 200, 20, 0xF26, 0 ) ); - - Add( new GenericBuyInfo( typeof( Board ), 3, 20, 0x1BD7, 0 ) ); - Add( new GenericBuyInfo( typeof( IronIngot ), 6, 20, 0x1BF2, 0 ) ); - } } diff --git a/Scripts/Multis/Boats/Plank.cs b/Scripts/Multis/Boats/Plank.cs index 168413e6a..647cdc6bc 100644 --- a/Scripts/Multis/Boats/Plank.cs +++ b/Scripts/Multis/Boats/Plank.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using Server; +using Server.Factions; using Server.Multis; namespace Server.Items @@ -140,6 +141,9 @@ namespace Server.Items { if ( IsOpen ) { + if ( from is BaseFactionGuard ) + return false; + if ( (from.Direction & Direction.Running) != 0 || (m_Boat != null && !m_Boat.Contains( from )) ) return true; diff --git a/Scripts/Multis/Camps/OrcCamp.cs b/Scripts/Multis/Camps/OrcCamp.cs index c4f7380ba..7e517ea8c 100644 --- a/Scripts/Multis/Camps/OrcCamp.cs +++ b/Scripts/Multis/Camps/OrcCamp.cs @@ -3,11 +3,11 @@ using Server.Items; using Server.Mobiles; namespace Server.Multis -{ +{ public class OrcCamp : BaseCamp { public virtual Mobile Orcs{ get{ return new Orc(); } } - + private Mobile m_Prisoner; [Constructable] diff --git a/Scripts/Multis/Camps/RatCamp.cs b/Scripts/Multis/Camps/RatCamp.cs index 92fcf3bf0..dce15647d 100644 --- a/Scripts/Multis/Camps/RatCamp.cs +++ b/Scripts/Multis/Camps/RatCamp.cs @@ -3,11 +3,11 @@ using Server.Items; using Server.Mobiles; namespace Server.Multis -{ +{ public class RatCamp : BaseCamp { public virtual Mobile Ratmen{ get{ return new Ratman(); } } - + private Mobile m_Prisoner; [Constructable] diff --git a/Scripts/Multis/HouseFoundation.cs b/Scripts/Multis/HouseFoundation.cs index 822690834..345b1f764 100644 --- a/Scripts/Multis/HouseFoundation.cs +++ b/Scripts/Multis/HouseFoundation.cs @@ -9,6 +9,7 @@ using Server.Gumps; using Server.Items; using Server.Mobiles; using Server.Network; +using Server.Spells; using Server.Targeting; namespace Server.Multis @@ -646,8 +647,12 @@ namespace Server.Multis public void BeginCustomize( Mobile m ) { - if( !m.CheckAlive() ) + if( !m.CheckAlive() ) { return; + } else if ( SpellHelper.CheckCombat( m, true ) ) { + m.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle?? + return; + } RelocateEntities(); diff --git a/Scripts/Regions/HouseRegion.cs b/Scripts/Regions/HouseRegion.cs index 27a9a7d1b..1bd95854d 100644 --- a/Scripts/Regions/HouseRegion.cs +++ b/Scripts/Regions/HouseRegion.cs @@ -239,10 +239,10 @@ namespace Server.Regions if ( !isFriend ) return; - + if ( !from.Alive ) return; - + if ( Core.ML && Insensitive.Equals( e.Speech, "I wish to resize my house" ) ) { if ( from.Map != sign.Map || !from.InRange( sign, 0 ) ) @@ -264,10 +264,9 @@ namespace Server.Regions from.SendLocalizedMessage( 501320 ); // Only the house owner may do this. } } - + if ( !m_House.IsInside( from ) || !m_House.IsActive ) return; - else if ( e.HasKeyword( 0x33 ) ) // remove thyself { if ( isFriend ) diff --git a/Scripts/Skills/AnimalTaming.cs b/Scripts/Skills/AnimalTaming.cs index a2797b1a9..6eaf9e6b3 100644 --- a/Scripts/Skills/AnimalTaming.cs +++ b/Scripts/Skills/AnimalTaming.cs @@ -74,7 +74,7 @@ namespace Server.SkillHandlers { bc.HitsMaxSeed = (int)Math.Max( 1, bc.HitsMaxSeed * scalar ); bc.Hits = bc.Hits; - } + } if ( bc.StamMaxSeed > 0 ) { diff --git a/Scripts/Skills/Begging.cs b/Scripts/Skills/Begging.cs index e75e6a597..518efbc85 100644 --- a/Scripts/Skills/Begging.cs +++ b/Scripts/Skills/Begging.cs @@ -65,7 +65,7 @@ namespace Server.SkillHandlers else number = 500402; // You are too far away to beg from her. } - else if (!( Core.ML ) && from.Mounted ) // If we're on a mount, who would give us money? TODO: guessed it's removed since ML + else if ( !Core.ML && from.Mounted ) // If we're on a mount, who would give us money? TODO: guessed it's removed since ML { number = 500404; // They seem unwilling to give you any money. } diff --git a/Scripts/Skills/Peacemaking.cs b/Scripts/Skills/Peacemaking.cs index d7602d972..d453ca483 100644 --- a/Scripts/Skills/Peacemaking.cs +++ b/Scripts/Skills/Peacemaking.cs @@ -56,7 +56,7 @@ namespace Server.SkillHandlers } else if ( from.Region.IsPartOf( typeof( Engines.ConPVP.SafeZone ) ) ) { - from.SendMessage( "You may not peacemake here." ); + from.SendMessage( "You may not peacemake in this area." ); } else if ( ((Mobile)targeted).Region.IsPartOf( typeof( Engines.ConPVP.SafeZone ) ) ) { diff --git a/Scripts/SpecialSystems/Items/Ressurection/ResGate.cs b/Scripts/SpecialSystems/Items/Resurrection/ResGate.cs similarity index 100% rename from Scripts/SpecialSystems/Items/Ressurection/ResGate.cs rename to Scripts/SpecialSystems/Items/Resurrection/ResGate.cs diff --git a/Scripts/Spells/Fourth/ArchProtection.cs b/Scripts/Spells/Fourth/ArchProtection.cs index 4e412046d..ac4d46b1c 100644 --- a/Scripts/Spells/Fourth/ArchProtection.cs +++ b/Scripts/Spells/Fourth/ArchProtection.cs @@ -90,7 +90,9 @@ namespace Server.Spells.Fourth { Caster.DoBeneficial( m ); m.VirtualArmorMod += val; - new InternalTimer( m, Caster, val ).Start(); + + AddEntry( m, val ); + new InternalTimer( m, Caster ).Start(); m.FixedParticles( 0x375A, 9, 20, 5027, EffectLayer.Waist ); m.PlaySound( 0x1F7 ); @@ -103,12 +105,30 @@ namespace Server.Spells.Fourth FinishSequence(); } + private static Dictionary _Table = new Dictionary(); + + private static void AddEntry( Mobile m, Int32 v ) + { + _Table[m] = v; + } + + public static void RemoveEntry( Mobile m ) + { + if ( _Table.ContainsKey( m ) ) { + int v = _Table[m]; + _Table.Remove( m ); + m.EndAction( typeof( ArchProtectionSpell ) ); + m.VirtualArmorMod -= v; + if ( m.VirtualArmorMod < 0 ) + m.VirtualArmorMod = 0; + } + } + private class InternalTimer : Timer { private Mobile m_Owner; - private int m_Val; - public InternalTimer( Mobile target, Mobile caster, int val ) : base( TimeSpan.FromSeconds( 0 ) ) + public InternalTimer( Mobile target, Mobile caster ) : base( TimeSpan.FromSeconds( 0 ) ) { double time = caster.Skills[SkillName.Magery].Value * 1.2; if ( time > 144 ) @@ -117,15 +137,11 @@ namespace Server.Spells.Fourth Priority = TimerPriority.OneSecond; m_Owner = target; - m_Val = val; } protected override void OnTick() { - m_Owner.EndAction( typeof( ArchProtectionSpell ) ); - m_Owner.VirtualArmorMod -= m_Val; - if ( m_Owner.VirtualArmorMod < 0 ) - m_Owner.VirtualArmorMod = 0; + ArchProtectionSpell.RemoveEntry( m_Owner ); } }