Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
namespace Server.Items
{
@ -8,7 +9,7 @@ namespace Server.Items
/// </summary>
public class Feint : WeaponAbility
{
public static Hashtable Registry{ get; } = new Hashtable();
public static Dictionary<Mobile, FeintTimer> Registry{ get; } = new Dictionary<Mobile, FeintTimer>();
public override int BaseMana => 30;
@ -29,10 +30,10 @@ namespace Server.Items
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
if (Registry.Contains(defender))
FeintTimer timer = Registry[defender];
if (timer != null)
{
FeintTimer existingtimer = (FeintTimer)Registry[defender];
existingtimer.Stop();
timer.Stop();
Registry.Remove(defender);
}
@ -43,12 +44,12 @@ namespace Server.Items
attacker.FixedParticles(0x3728, 1, 13, 0x7F3, 0x962, 0, EffectLayer.Waist);
Timer t = new FeintTimer(defender,
(int)(20.0 + 3.0 * (Math.Max(attacker.Skills[SkillName.Ninjitsu].Value,
attacker.Skills[SkillName.Bushido].Value) - 50.0) / 7.0)); //20-50 % decrease
timer = new FeintTimer(defender,
(int)(20.0 + 3.0 * (Math.Max(attacker.Skills.Ninjitsu.Value,
attacker.Skills.Bushido.Value) - 50.0) / 7.0)); //20-50 % decrease
t.Start();
Registry.Add(defender, t);
timer.Start();
Registry.Add(defender, timer);
}
public class FeintTimer : Timer
@ -71,4 +72,4 @@ namespace Server.Items
}
}
}
}
}