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

@ -37,12 +37,7 @@ namespace Server.Spells.Sixth
SpellHelper.GetSurfaceTop(ref p);
var dx = Caster.Location.X - p.X;
var dy = Caster.Location.Y - p.Y;
var rx = (dx - dy) * 44;
var ry = (dx + dy) * 44;
bool eastToWest = rx == 0 && ry >= 0 || rx >= 0 && ry == 0;
var eastToWest = SpellHelper.GetEastToWest(Caster.Location, p);
Effects.PlaySound(new Point3D(p), Caster.Map, 0x20B);