fix(core): Converts combat and container packets (#382)

- [X] Converts container packets
- [X] Converts combat packets
This commit is contained in:
Kamron Batman 2021-01-04 21:17:39 -08:00 committed by GitHub
parent ac76c57c39
commit 75c0527284
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 51 deletions

View file

@ -1457,5 +1457,13 @@ namespace Server
{
set.RemoveWhere(entry => entry?.Deleted != false);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int NumberOfSetBits(this ulong i)
{
i -= (i >> 1) & 0x5555555555555555UL;
i = (i & 0x3333333333333333UL) + ((i >> 2) & 0x3333333333333333UL);
return (int)(unchecked(((i + (i >> 4)) & 0xF0F0F0F0F0F0F0FUL) * 0x101010101010101UL) >> 56);
}
}
}