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

@ -63,10 +63,17 @@ namespace Server.SkillHandlers
{
if (!CombatOverride)
{
if (m.GetMobilesInRange(range).Any(check => check.InLOS(m) && check.Combatant == m))
var eable = m.GetMobilesInRange(range);
foreach (var check in eable)
{
badCombat = true;
if (check.InLOS(m) && check.Combatant == m)
{
badCombat = true;
break;
}
}
eable.Free();
}
ok = !badCombat && m.CheckSkill(SkillName.Hiding, 0.0 - bonus, 100.0 - bonus);