fix: Minor refactor of spells (#795)

This commit is contained in:
IAmDanielDinner 2021-09-20 00:45:05 +02:00 • committed by GitHub
parent 77e5d8521f
commit a0c3158675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 32 deletions

View file

@ -220,7 +220,7 @@ namespace Server.Spells
}
}
if (Core.Expansion == Expansion.AOS)
if (Core.AOS)
{
for (var i = 0; i < m.Aggressors.Count; ++i)
{
@ -257,6 +257,17 @@ namespace Server.Spells
return false;
}
public static bool GetEastToWest(IPoint3D from,IPoint3D target)
{
var dx = from.X - target.X;
var dy = from.Y - target.Y;
var rx = (dx - dy) * 44;
var ry = (dx + dy) * 44;
return (rx >= 0 && ry < 0) || (ry >= 0 && rx < 0);
}
public static bool CanRevealCaster(Mobile m) => m is BaseCreature { Controlled: false };
public static void GetSurfaceTop(ref IPoint3D p)