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
|
|
@ -394,7 +394,7 @@ namespace Server.Commands.Generic
|
|||
index,
|
||||
CommandLogging.Format(mob)
|
||||
);
|
||||
mob.Send(new PlaySound(index, mob.Location));
|
||||
mob.SendSound(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Server.Commands.Generic;
|
||||
|
|
@ -420,19 +421,16 @@ namespace Server.Commands
|
|||
toAll
|
||||
);
|
||||
|
||||
Packet p = new PlaySound(index, m.Location);
|
||||
|
||||
p.Acquire();
|
||||
Span<byte> buffer = stackalloc byte[OutgoingEffectPackets.SoundPacketLength];
|
||||
OutgoingEffectPackets.CreateSoundEffect(ref buffer, index, m);
|
||||
|
||||
foreach (var state in m.GetClientsInRange(12))
|
||||
{
|
||||
if (toAll || state.Mobile.CanSee(m))
|
||||
{
|
||||
state.Send(p);
|
||||
state.Send(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
p.Release();
|
||||
}
|
||||
|
||||
[Usage("Echo <text>")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue