From f20b1af7786903b24f778f4e3fdc4f197da22a54 Mon Sep 17 00:00:00 2001 From: xavier Date: Sat, 20 Mar 2010 12:57:07 +0000 Subject: [PATCH] Healing Cross-healing times were not properly calculated. http://www.uodemise.com/forum/showthread.php?t=120698 Housing Secured containers should count against lockdowns http://www.uodemise.com/forum/showthread.php?t=140087 --- Scripts/Items/Skill Items/Misc/Bandage.cs | 20 +++++++++++++++----- Scripts/Multis/BaseHouse.cs | 12 +++++++++--- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Scripts/Items/Skill Items/Misc/Bandage.cs b/Scripts/Items/Skill Items/Misc/Bandage.cs index b41806910..627bd84ef 100644 --- a/Scripts/Items/Skill Items/Misc/Bandage.cs +++ b/Scripts/Items/Skill Items/Misc/Bandage.cs @@ -472,10 +472,18 @@ namespace Server.Items { if ( Core.AOS && GetPrimarySkill( patient ) == SkillName.Veterinary ) { - //if ( dex >= 40 ) seconds = 2.0; - //else - // seconds = 3.0; + } + else if ( Core.AOS ) + { + if (dex < 204) + { + seconds = 3.2-(Math.Sin((double)dex/130)*2.5) + resDelay; + } + else + { + seconds = 0.7 + resDelay; + } } else { @@ -492,14 +500,16 @@ namespace Server.Items if ( context != null ) context.StopHeal(); - - context = new BandageContext( healer, patient, TimeSpan.FromSeconds( seconds ) ); + seconds *= 1000; + + context = new BandageContext( healer, patient, TimeSpan.FromMilliseconds( seconds ) ); m_Table[healer] = context; if ( !onSelf ) patient.SendLocalizedMessage( 1008078, false, healer.Name ); // : Attempting to heal you. + healer.SendLocalizedMessage( 500956 ); // You begin applying the bandages. return context; } diff --git a/Scripts/Multis/BaseHouse.cs b/Scripts/Multis/BaseHouse.cs index b3317ee93..5c2d963b5 100644 --- a/Scripts/Multis/BaseHouse.cs +++ b/Scripts/Multis/BaseHouse.cs @@ -291,12 +291,18 @@ namespace Server.Multis ArrayList list = m_Secures; - for ( int i = 0; list != null && i < list.Count; ++i ) + if ( list != null ) { - SecureInfo si = (SecureInfo)list[i]; + for ( int i = 0; i < list.Count; ++i ) + { + SecureInfo si = (SecureInfo)list[i]; - fromSecures += si.Item.TotalItems; + fromSecures += si.Item.TotalItems; + } + + fromLockdowns += list.Count; } + if ( m_LockDowns != null ) fromLockdowns += m_LockDowns.Count;