From 2d60d61a6bd03ec886f984360432ed4ddd2784d0 Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Thu, 24 Oct 2013 14:23:03 -0700 Subject: [PATCH] misc merge/tidy from Zenvera --- Scripts/Engines/ConPVP/DuelContext.cs | 3 +++ Scripts/Items/Addons/SHTeleporter.cs | 2 +- .../Broken Furniture Collection/BrokenFallenChair.cs | 7 +++++-- Scripts/Items/Weapons/Axes/BaseAxe.cs | 2 +- Scripts/Items/Weapons/BaseWeapon.cs | 2 +- Scripts/Items/Weapons/Maces/BaseBashing.cs | 2 +- Scripts/Items/Weapons/PoleArms/BasePoleArm.cs | 2 +- Scripts/Misc/Email.cs | 11 ++++++++++- 8 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Scripts/Engines/ConPVP/DuelContext.cs b/Scripts/Engines/ConPVP/DuelContext.cs index 4584b16c2..d4140c06d 100644 --- a/Scripts/Engines/ConPVP/DuelContext.cs +++ b/Scripts/Engines/ConPVP/DuelContext.cs @@ -494,6 +494,9 @@ namespace Server.Engines.ConPVP pl.Eliminated = true; + if ( mob.Poison != null ) + mob.Poison = null; + Requip( mob, corpse ); DelayBounce( TimeSpan.FromSeconds( 4.0 ), mob, corpse ); diff --git a/Scripts/Items/Addons/SHTeleporter.cs b/Scripts/Items/Addons/SHTeleporter.cs index 640e84eff..0edfc8a11 100644 --- a/Scripts/Items/Addons/SHTeleporter.cs +++ b/Scripts/Items/Addons/SHTeleporter.cs @@ -31,7 +31,7 @@ namespace Server.Items set { m_TeleOffset = value; } } - [CommandProperty( AccessLevel.Counselor )] + [CommandProperty(AccessLevel.GameMaster)] public Point3D TelePoint { get { return new Point3D( Location.X + TeleOffset.X, Location.Y + TeleOffset.Y, Location.Z + TeleOffset.Z ); } diff --git a/Scripts/Items/Special/Broken Furniture Collection/BrokenFallenChair.cs b/Scripts/Items/Special/Broken Furniture Collection/BrokenFallenChair.cs index 1a66d0d49..379f4ae3e 100644 --- a/Scripts/Items/Special/Broken Furniture Collection/BrokenFallenChair.cs +++ b/Scripts/Items/Special/Broken Furniture Collection/BrokenFallenChair.cs @@ -2,7 +2,7 @@ using System; namespace Server.Items { - [Flipable( 0xC19, 0xC1a )] + [Flipable( 0xC19, 0xC1A )] public class BrokenFallenChairComponent : AddonComponent { public override int LabelNumber { get { return 1076264; } } // Broken Fallen Chair @@ -19,7 +19,7 @@ namespace Server.Items { base.Serialize( writer ); - writer.WriteEncodedInt( 0 ); // version + writer.WriteEncodedInt( 1 ); // version } public override void Deserialize( GenericReader reader ) @@ -27,6 +27,9 @@ namespace Server.Items base.Deserialize( reader ); int version = reader.ReadEncodedInt(); + + if (version < 1 && ItemID == 0xC17) + ItemID = 0xC19; } } diff --git a/Scripts/Items/Weapons/Axes/BaseAxe.cs b/Scripts/Items/Weapons/Axes/BaseAxe.cs index 4d050950d..9c1083dc1 100644 --- a/Scripts/Items/Weapons/Axes/BaseAxe.cs +++ b/Scripts/Items/Weapons/Axes/BaseAxe.cs @@ -154,7 +154,7 @@ namespace Server.Items { base.OnHit( attacker, defender, damageBonus ); - if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility( attacker, "Concussion Blow", false ) ) + if (!Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && attacker.Skills[SkillName.Anatomy].Value >= 80 && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility(attacker, "Concussion Blow", false)) { StatMod mod = defender.GetStatMod( "Concussion" ); diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index cef3c423b..10488e661 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -1638,7 +1638,7 @@ namespace Server.Items attacker.PlaySound( 0x44D ); } - if ( m_MaxHits > 0 && ((MaxRange <= 1 && (defender is Slime || defender is AcidElemental)) || Utility.Random( 25 ) == 0) ) // Stratics says 50% chance, seems more like 4%.. + if ( m_MaxHits > 0 && ((MaxRange <= 1 && (defender is Slime || defender is AcidElemental)) || Utility.RandomDouble() < .04) ) // Stratics says 50% chance, seems more like 4%.. { if ( MaxRange <= 1 && (defender is Slime || defender is AcidElemental) ) attacker.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500263 ); // *Acid blood scars your weapon!* diff --git a/Scripts/Items/Weapons/Maces/BaseBashing.cs b/Scripts/Items/Weapons/Maces/BaseBashing.cs index 5e38b4c08..00b0d6b8a 100644 --- a/Scripts/Items/Weapons/Maces/BaseBashing.cs +++ b/Scripts/Items/Weapons/Maces/BaseBashing.cs @@ -46,7 +46,7 @@ namespace Server.Items { double damage = base.GetBaseDamage( attacker ); - if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility( attacker, "Crushing Blow", false ) ) + if (!Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && attacker.Skills[SkillName.Anatomy].Value >= 80 && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility(attacker, "Crushing Blow", false)) { damage *= 1.5; diff --git a/Scripts/Items/Weapons/PoleArms/BasePoleArm.cs b/Scripts/Items/Weapons/PoleArms/BasePoleArm.cs index 2ada1ef88..678c61eff 100644 --- a/Scripts/Items/Weapons/PoleArms/BasePoleArm.cs +++ b/Scripts/Items/Weapons/PoleArms/BasePoleArm.cs @@ -107,7 +107,7 @@ namespace Server.Items { base.OnHit( attacker, defender, damageBonus ); - if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility( attacker, "Concussion Blow", false ) ) + if (!Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && attacker.Skills[SkillName.Anatomy].Value >= 80 && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility(attacker, "Concussion Blow", false)) { StatMod mod = defender.GetStatMod( "Concussion" ); diff --git a/Scripts/Misc/Email.cs b/Scripts/Misc/Email.cs index 2f2b3bb76..f7d428d7a 100644 --- a/Scripts/Misc/Email.cs +++ b/Scripts/Misc/Email.cs @@ -23,6 +23,7 @@ namespace Server.Misc */ public static readonly string EmailServer = null; + public static readonly int EmailPort = 25; public static readonly string FromAddress = null; public static readonly string CrashAddresses = null; @@ -43,13 +44,21 @@ namespace Server.Misc public static void Configure() { if ( EmailServer != null ) - _Client = new SmtpClient( EmailServer ); + _Client = new SmtpClient( EmailServer, EmailPort ); } public static bool Send( MailMessage message ) { try { + // .NET relies on the MTA to generate Message-ID header. Not all MTAs will add this header. + + DateTime now = DateTime.UtcNow; + string messageID = String.Format("<{0}.{1}@{2}>", now.ToString("yyyyMMdd"), now.ToString("HHmmssff"), EmailServer ); + message.Headers.Add("Message-ID", messageID ); + + message.Headers.Add("X-Mailer", "RunUO"); + lock ( _Client ) { _Client.Send( message ); }