fix: Updates encoded packet handler to use function pointers (#1066)

This commit is contained in:
Kamron Batman 2022-06-15 17:20:36 -07:00 • committed by GitHub
parent f24b98f8e2
commit 057cf87e60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 79 additions and 54 deletions

View file

@ -6,12 +6,12 @@ namespace Server.Items
{
public static class WeaponAbilityPackets
{
public static void Configure()
public static unsafe void Configure()
{
IncomingPackets.RegisterEncoded(0x19, true, SetAbility);
IncomingPackets.RegisterEncoded(0x19, true, &SetAbility);
}
public static void SetAbility(NetState state, IEntity e, EncodedReader reader)
public static unsafe void SetAbility(NetState state, IEntity e, EncodedReader reader)
{
var m = state.Mobile;
var index = reader.ReadInt32();