fix: Minor refactor of spells (#795)
This commit is contained in:
parent
77e5d8521f
commit
a0c3158675
6 changed files with 17 additions and 32 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue