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

@ -180,7 +180,7 @@ namespace Server.Items
{
if (from.AccessLevel == AccessLevel.Player || !from.Hidden)
{
from.Send(new PlaySound(0x20E, from.Location));
from.SendSound(0x20E, from);
}
from.CloseGump<MoongateConfirmGump>();

View file

@ -414,7 +414,7 @@ namespace Server.Items
rune.Delete();
from.Send(new PlaySound(0x42, GetWorldLocation()));
from.SendSound(0x42, GetWorldLocation());
from.SendMessage((rune.Description?.Trim()).DefaultIfNullOrEmpty("(indescript)"));
@ -432,7 +432,7 @@ namespace Server.Items
{
if (CurCharges < MaxCharges)
{
from.Send(new PlaySound(0x249, GetWorldLocation()));
from.SendSound(0x249, GetWorldLocation());
var amount = dropped.Amount;

View file

@ -591,7 +591,7 @@ namespace Server.Items
scroll.Delete();
from.Send(new PlaySound(0x249, GetWorldLocation()));
from.SendSound(0x249, GetWorldLocation());
return true;
}
}

View file

@ -58,7 +58,7 @@ namespace Server.Items
}
}
public void Use(Mobile from, IPoint3D loc)
public void Use(Mobile from, Point3D loc)
{
if (!CheckUse(from))
{
@ -84,23 +84,14 @@ namespace Server.Items
from.Backpack.ConsumeUpTo(typeof(SulfurousAsh), sulfAsh);
from.PlaySound(0x15F);
Effects.SendPacket(
Effects.SendMovingEffect(
from,
from.Map,
new HuedEffect(
EffectType.Moving,
from.Serial,
Serial.Zero,
0x36D4,
from.Location,
loc,
5,
0,
false,
true,
0,
0
)
loc,
0x36D4,
5,
0,
false,
true
);
var eable = from.Map.GetMobilesInRange(new Point3D(loc), 2);
@ -241,14 +232,14 @@ namespace Server.Items
return;
}
IPoint3D loc;
Point3D loc;
if (targeted is Item item)
{
loc = item.GetWorldLocation();
}
else
{
loc = targeted as IPoint3D;
loc = new Point3D(targeted as IPoint3D);
}
m_Horn.Use(from, loc);