Fixes dictionary uses (#7)
This commit is contained in:
parent
d4a52344f2
commit
916d404c51
161 changed files with 1211 additions and 1722 deletions
|
|
@ -488,10 +488,7 @@ namespace Server.Items
|
|||
if ( m_TypeTable == null )
|
||||
return CraftResource.None;
|
||||
|
||||
if (!m_TypeTable.TryGetValue(resourceType, out CraftResource res))
|
||||
return CraftResource.None;
|
||||
|
||||
return res;
|
||||
return m_TypeTable.TryGetValue(resourceType, out CraftResource res) ? res : CraftResource.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue