fix(linq): Removes linq and fixes fishing error (#674)
This commit is contained in:
parent
b112be4e1f
commit
410b18ceca
19 changed files with 253 additions and 62 deletions
|
|
@ -321,7 +321,20 @@ namespace Server.Items
|
|||
|
||||
public static bool HasDiggingTool(Mobile m)
|
||||
{
|
||||
return m.Backpack?.FindItemsByType<BaseHarvestTool>().Any(tool => tool.HarvestSystem == Mining.System) == true;
|
||||
if (m.Backpack == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var tool in m.Backpack.FindItemsByType<BaseHarvestTool>())
|
||||
{
|
||||
if (tool.HarvestSystem == Mining.System)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void OnBeginDig(Mobile from)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue