fix(core): Converts boat packets (#416)

- [X] Converts boat packets
- [X] Makes a packet container builder for packet 0xF7
- [X] Generalizes world item packet so it works for mobiles too

Notes:
- This PR doesn't address proper smooth movement for boats.
This commit is contained in:
Kamron Batman 2021-01-18 08:38:32 -08:00 • committed by GitHub
parent b4b1b0b122
commit 08f05afd01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 619 additions and 220 deletions

View file

@ -38,13 +38,13 @@ namespace Server.Items
private void SendGMItem(NetState ns)
{
// GM Packet
Span<byte> buffer = stackalloc byte[OutgoingItemPackets.MaxWorldItemPacketLength];
Span<byte> buffer = stackalloc byte[OutgoingEntityPackets.MaxWorldEntityPacketLength];
int length;
if (ns.StygianAbyss)
{
length = OutgoingItemPackets.CreateWorldItemNew(buffer, this, ns.HighSeas);
length = OutgoingEntityPackets.CreateWorldEntity(buffer, this, ns.StygianAbyss, ns.HighSeas);
BinaryPrimitives.WriteUInt16BigEndian(buffer.Slice(8, 2), GMItemId);
}
else