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,13 +9,12 @@ namespace Server.Items
public static readonly TimeSpan AttackEffectDuration = TimeSpan.FromSeconds(10.0);
public static readonly TimeSpan DefenseEffectDuration = TimeSpan.FromSeconds(8.0);
private static Hashtable m_AttackTable = new Hashtable();
private static Hashtable m_DefenseTable = new Hashtable();
private static Dictionary<Mobile, AttackTimer> m_AttackTable = new Dictionary<Mobile, AttackTimer>();
private static Dictionary<Mobile, DefenseTimer> m_DefenseTable = new Dictionary<Mobile, DefenseTimer>();
public static bool IsUnderAttackEffect(Mobile m)
{
return m_AttackTable.Contains(m);
return m_AttackTable.ContainsKey(m);
}
public static bool ApplyAttack(Mobile m)
@ -35,7 +35,7 @@ namespace Server.Items
public static bool IsUnderDefenseEffect(Mobile m)
{
return m_DefenseTable.Contains(m);
return m_DefenseTable.ContainsKey(m);
}
public static bool ApplyDefense(Mobile m)
@ -92,4 +92,4 @@ namespace Server.Items
}
}
}
}
}