Effects packets (#308)

- [X] Changes effect packets
- [X] Updates playing sounds
- [X] Updates Effects class to have more options so there are less direct calls to building the packets
- [X] Changes bonding status packet
This commit is contained in:
Kamron Batman 2020-11-12 00:52:38 -08:00 • committed by GitHub
parent 1c9439e4fd
commit 361ec4dba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 958 additions and 833 deletions

View file

@ -43,6 +43,7 @@ namespace Server.Spells.Fourth
var map = Caster.Map;
var directTarget = p as Mobile;
var loc = new Point3D(p);
if (map != null)
{
@ -54,13 +55,13 @@ namespace Server.Spells.Fourth
targets.Add(directTarget);
}
var eable = map.GetMobilesInRange(new Point3D(p), 2);
var eable = map.GetMobilesInRange(loc, 2);
targets.AddRange(eable.Where(m => m != directTarget).Where(m => AreaCanTarget(m, feluccaRules)));
eable.Free();
}
Effects.PlaySound(p, Caster.Map, 0x299);
Effects.PlaySound(loc, Caster.Map, 0x299);
if (targets.Count > 0)
{

View file

@ -40,9 +40,11 @@ namespace Server.Spells.Fourth
SpellHelper.GetSurfaceTop(ref p);
var loc = new Point3D(p);
if (!Core.AOS)
{
Effects.PlaySound(p, Caster.Map, 0x299);
Effects.PlaySound(loc, Caster.Map, 0x299);
}
if (Caster.Map == null)
@ -51,7 +53,7 @@ namespace Server.Spells.Fourth
return;
}
var targets = Caster.Map.GetMobilesInRange(new Point3D(p), Core.AOS ? 2 : 3)
var targets = Caster.Map.GetMobilesInRange(loc, Core.AOS ? 2 : 3)
.Where(m => Caster.CanBeBeneficial(m, false));
if (Core.AOS)

View file

@ -62,7 +62,7 @@ namespace Server.Spells.Fourth
eastToWest = false;
}
Effects.PlaySound(p, Caster.Map, 0x20C);
Effects.PlaySound(new Point3D(p), Caster.Map, 0x20C);
var itemID = eastToWest ? 0x398C : 0x3996;