Upgrades code style - First batch (#22)

This commit is contained in:
Kamron Batman 2018-08-14 06:16:50 +08:00 • committed by GitHub
parent 8ee42c8ea2
commit 632e8b4757
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1834 changed files with 10245 additions and 10437 deletions

View file

@ -82,7 +82,7 @@ namespace Server.Misc
m_DisallowedFeatures &= ~feature;
}
public static Features DisallowedFeatures { get { return m_DisallowedFeatures; } }
public static Features DisallowedFeatures => m_DisallowedFeatures;
}
private static class Negotiator
@ -107,13 +107,12 @@ namespace Server.Misc
if (m != null && m.NetState != null && m.NetState.Running)
{
Timer t;
m.Send(new BeginHandshake());
if (Settings.KickOnFailure)
m.Send(new BeginHandshake());
if (m_Dictionary.TryGetValue(m, out t) && t != null)
if (m_Dictionary.TryGetValue(m, out Timer t) && t != null)
t.Stop();
m_Dictionary[m] = t = Timer.DelayCall(Settings.HandshakeTimeout, OnHandshakeTimeout_Callback, m);
@ -128,10 +127,8 @@ namespace Server.Misc
if (state == null || state.Mobile == null || !state.Running)
return;
Timer t;
Mobile m = state.Mobile;
if (m_Dictionary.TryGetValue(m, out t))
if (m_Dictionary.TryGetValue( m, out Timer t ))
{
if (t != null)
t.Stop();
@ -192,4 +189,4 @@ namespace Server.Misc
}
}
}
}
}