Merges crash bugs into master (#12)

This commit is contained in:
Kamron Batman 2019-03-03 14:28:24 -08:00 committed by GitHub
parent 916d404c51
commit 39dfe86e10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 33 additions and 85 deletions

View file

@ -1104,6 +1104,7 @@ namespace Server.Items
public static void CheckHeaveTimer(Mobile from)
{
Timer t;
if (from.BAC > 0 && from.Map != Map.Internal && !from.Deleted)
{
if (m_Table.ContainsKey(from))
@ -1112,12 +1113,12 @@ namespace Server.Items
if (from.BAC > 60)
from.BAC = 60;
Timer t = new HeaveTimer(from);
t = new HeaveTimer(from);
t.Start();
m_Table[from] = t;
}
else if (m_Table.TryGetValue(from, out Timer t))
else if (m_Table.TryGetValue(from, out t))
{
t.Stop();
m_Table.Remove(from);