Fixes small compile errors for both Mono and Windows

This commit is contained in:
Kamron Batman 2018-11-03 18:07:35 -07:00
parent 916d404c51
commit 647d6c0fd0
3 changed files with 9 additions and 12 deletions

View file

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

View file

@ -4728,16 +4728,12 @@ namespace Server.Mobiles
public virtual bool HasRecipe(Recipe r) public virtual bool HasRecipe(Recipe r)
{ {
if (r == null) return r != null && HasRecipe(r.ID);
return false;
return HasRecipe(r.ID);
} }
public virtual bool HasRecipe(int recipeID) public virtual bool HasRecipe(int recipeID)
{ {
m_AcquiredRecipes?.TryGetValue(recipeID, out bool value); return m_AcquiredRecipes.TryGetValue(recipeID, out bool value) && value;
return value;
} }
public virtual void AcquireRecipe(Recipe r) public virtual void AcquireRecipe(Recipe r)

View file

@ -7,7 +7,7 @@
<!-- Automatically check for missing packages during build in Visual Studio --> <!-- Automatically check for missing packages during build in Visual Studio -->
<add key="automatic" value="True" /> <add key="automatic" value="True" />
</packageRestore> </packageRestore>
</configuration> <packages>
<packages> <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net47" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net47" /> </packages>
</packages> </configuration>