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

@ -476,14 +476,14 @@ namespace Server.Engines.Doom
}
}
public static void PlayEffect(IEntity from, IEntity to, int itemid, int speed, bool explodes)
private static void PlayEffect(IEntity from, IEntity to, int itemid, int speed, bool explodes)
{
Effects.SendMovingParticles(from, to, itemid, speed, 0, true, explodes, 2, 0, 0);
}
public static void SendLocationEffect(IPoint3D p, int itemID, int speed, int duration, int hue)
private static void SendLocationEffect(Point3D p, int itemID, int speed, int duration, int hue)
{
Effects.SendPacket(p, Map.Malas, new LocationEffect(p, itemID, speed, duration, hue, 0));
Effects.SendLocationEffect(p, Map.Malas, itemID, speed, duration, hue);
}
public static void PlayerSendASCII(Mobile player, int index)

View file

@ -68,7 +68,7 @@ namespace Server.Ethics.Evil
{
SpellHelper.Turn(from.Mobile, p);
Effects.PlaySound(p, from.Mobile.Map, 0x1FB);
Effects.PlaySound(new Point3D(p), from.Mobile.Map, 0x1FB);
from.Mobile.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You curse the area.");

View file

@ -68,7 +68,7 @@ namespace Server.Ethics.Hero
{
SpellHelper.Turn(from.Mobile, p);
Effects.PlaySound(p, from.Mobile.Map, 0x299);
Effects.PlaySound(new Point3D(p), from.Mobile.Map, 0x299);
from.Mobile.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You consecrate the area.");

View file

@ -330,7 +330,7 @@ namespace Server.Items
{
case 0:
{
Effects.SendLocationEffect(to, to.Map, 0x113A, 20, 10);
Effects.SendLocationEffect(to, 0x113A, 20);
to.PlaySound(0x231);
to.LocalOverheadMessage(MessageType.Regular, 0x44, 1010523); // A toxic vapor envelops thee.
@ -340,7 +340,7 @@ namespace Server.Items
}
case 1:
{
Effects.SendLocationEffect(to, to.Map, 0x3709, 30);
Effects.SendLocationEffect(to, 0x3709, 30);
to.PlaySound(0x54);
to.LocalOverheadMessage(MessageType.Regular, 0xEE, 1010524); // Searing heat scorches thy skin.

View file

@ -157,24 +157,7 @@ namespace Server.Engines.Quests.Necro
var hue = Utility.RandomList(0x481, 0x482, 0x489, 0x497, 0x66D);
Effects.SendPacket(
from,
map,
new HuedEffect(
EffectType.Moving,
Serial.Zero,
Serial.Zero,
0x36D4,
from,
to,
0,
0,
false,
true,
hue,
0
)
);
Effects.SendMovingEffect(map, 0x36D4, from, to,0, 0, false, true, hue);
}
}

View file

@ -66,7 +66,7 @@ namespace Server.Engines.Quests.Haven
public override bool HandlesOnMovement => Canoneer?.Deleted == false && Canoneer.Active;
public void DoFireEffect(IPoint3D target)
public void DoFireEffect(Point3D target)
{
var from = CannonDirection switch
{
@ -85,7 +85,7 @@ namespace Server.Engines.Quests.Haven
public void Fire(Mobile from, Mobile target)
{
DoFireEffect(target);
DoFireEffect(target.Location);
target.Damage(9999, from);
}