fix(linq): Removes linq and fixes fishing error (#674)

This commit is contained in:
Kamron Batman 2021-08-04 22:24:38 -07:00 • committed by GitHub
parent b112be4e1f
commit 410b18ceca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 253 additions and 62 deletions

View file

@ -80,7 +80,19 @@ namespace Server.Items
public void Refresh()
{
var found = GetMobilesInRange(CurrentRange).Any(mob => !mob.Hidden || mob.AccessLevel <= AccessLevel.Player);
var found = false;
var eable = GetMobilesInRange(CurrentRange);
foreach (var mob in eable)
{
if (!mob.Hidden || mob.AccessLevel <= AccessLevel.Player)
{
found = true;
break;
}
}
eable.Free();
ItemID = found ? ActiveItemID : InactiveItemID;
Visible = ItemID != 0x1;