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:
parent
1c9439e4fd
commit
361ec4dba4
53 changed files with 958 additions and 833 deletions
|
|
@ -81,24 +81,21 @@ namespace Server.Items
|
|||
{
|
||||
if (dropped is BasePiece piece && piece.Board == this && base.OnDragDropInto(from, dropped, point))
|
||||
{
|
||||
Packet p = new PlaySound(0x127, GetWorldLocation());
|
||||
|
||||
p.Acquire();
|
||||
|
||||
if (RootParent == from)
|
||||
{
|
||||
from.Send(p);
|
||||
from.SendSound(0x127, GetWorldLocation());
|
||||
}
|
||||
else
|
||||
{
|
||||
Span<byte> buffer = stackalloc byte[OutgoingEffectPackets.SoundPacketLength];
|
||||
OutgoingEffectPackets.CreateSoundEffect(ref buffer, 0x127, GetWorldLocation());
|
||||
|
||||
foreach (var state in GetClientsInRange(2))
|
||||
{
|
||||
state.Send(p);
|
||||
state.Send(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
p.Release();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue