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

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