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

@ -84,22 +84,24 @@ namespace Server.Items
return;
}
var foundPlayer = GetMobilesInRange(3)
.Where(mob => mob.Player && mob.Alive && mob.AccessLevel <= AccessLevel.Player)
.Any(mob => Z + 8 >= mob.Z && mob.Z + 16 > Z);
if (!foundPlayer)
foreach (var mob in GetMobilesInRange(3))
{
m_Spurt?.Delete();
m_Spurt = null;
}
else if (m_Spurt?.Deleted != false)
{
m_Spurt = new Static(0x3709);
m_Spurt.MoveToWorld(Location, Map);
if (mob.Player && mob.Alive && mob.AccessLevel <= AccessLevel.Player && Z + 8 >= mob.Z && mob.Z + 16 > Z)
{
if (m_Spurt?.Deleted != false)
{
m_Spurt = new Static(0x3709);
m_Spurt.MoveToWorld(Location, Map);
Effects.PlaySound(GetWorldLocation(), Map, 0x309);
Effects.PlaySound(GetWorldLocation(), Map, 0x309);
}
return;
}
}
m_Spurt?.Delete();
m_Spurt = null;
}
public override bool OnMoveOver(Mobile m)