fix: Fixes boat movement & moves weapon ability out of core (#750)
* Fixes boats only moving once. * Removes event sink for weapon ability * Moves weapon ability packets out of the core.
This commit is contained in:
parent
c789a7f78a
commit
fd59b080f4
12 changed files with 142 additions and 130 deletions
|
|
@ -48,7 +48,6 @@ namespace Server.Network
|
|||
IncomingPackets.Register(0xD7, 0, true, EncodedCommand);
|
||||
IncomingPackets.Register(0xF4, 0, false, CrashReport);
|
||||
|
||||
IncomingPackets.RegisterEncoded(0x19, true, SetAbility);
|
||||
IncomingPackets.RegisterEncoded(0x28, true, GuildGumpRequest);
|
||||
IncomingPackets.RegisterEncoded(0x32, true, QuestGumpRequest);
|
||||
}
|
||||
|
|
@ -584,17 +583,12 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void SetAbility(this NetState state, IEntity e, EncodedReader reader)
|
||||
{
|
||||
EventSink.InvokeSetAbility(state.Mobile, reader.ReadInt32());
|
||||
}
|
||||
|
||||
public static void GuildGumpRequest(this NetState state, IEntity e, EncodedReader reader)
|
||||
public static void GuildGumpRequest(NetState state, IEntity e, EncodedReader reader)
|
||||
{
|
||||
EventSink.InvokeGuildGumpRequest(state.Mobile);
|
||||
}
|
||||
|
||||
public static void QuestGumpRequest(this NetState state, IEntity e, EncodedReader reader)
|
||||
public static void QuestGumpRequest(NetState state, IEntity e, EncodedReader reader)
|
||||
{
|
||||
EventSink.InvokeQuestGumpRequest(state.Mobile);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,23 +63,6 @@ namespace Server.Network
|
|||
public static void SendDeathStatus(this NetState ns, bool dead) =>
|
||||
ns?.Send(stackalloc byte[] { 0x2C, dead ? (byte)0 : (byte)2 });
|
||||
|
||||
public static void SendToggleSpecialAbility(this NetState ns, int abilityId, bool active)
|
||||
{
|
||||
if (ns == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var writer = new SpanWriter(stackalloc byte[8]);
|
||||
writer.Write((byte)0xBF); // Packet ID
|
||||
writer.Write((ushort)8);
|
||||
writer.Write((short)0x25);
|
||||
writer.Write((short)abilityId);
|
||||
writer.Write(active);
|
||||
|
||||
ns.Send(writer.Span);
|
||||
}
|
||||
|
||||
public static void SendDisplayProfile(this NetState ns, Serial m, string header, string body, string footer)
|
||||
{
|
||||
if (ns == null)
|
||||
|
|
@ -352,10 +335,6 @@ namespace Server.Network
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void SendPingAck(this NetState ns, byte ping) => ns?.Send(stackalloc byte[] { 0x73, ping });
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void SendClearWeaponAbility(this NetState ns) =>
|
||||
ns?.Send(stackalloc byte[] { 0xBF, 0x00, 0x5, 0x00, 0x21 });
|
||||
|
||||
public static void SendDisplayHuePicker(this NetState ns, Serial huePickerSerial, int huePickerItemID)
|
||||
{
|
||||
if (ns == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue