Refactored how zones work. Cleaned out a lot of duplciations and smoothed out how Zones/PrivateAreas work.

This commit is contained in:
Filip Maj 2022-02-05 14:05:32 -05:00
parent 56ba641e2a
commit 563118372a
32 changed files with 247 additions and 417 deletions

View file

@ -32,7 +32,7 @@ namespace Meteor.Map.packets.send.actor
public const ushort OPCODE = 0x013D;
public const uint PACKET_SIZE = 0x48;
public static SubPacket BuildPacket(uint sourceActorId, uint displayNameID, string customName, bool isSexMale = true)
public static SubPacket BuildPacket(uint sourceActorId, int displayNameID, string customName, bool isSexMale = true)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@ -42,7 +42,7 @@ namespace Meteor.Map.packets.send.actor
{
binWriter.Write((UInt32)displayNameID);
if (customName != null && (displayNameID == 0 || displayNameID == 0xFFFFFFFF))
if (customName != null && (displayNameID == 0 || displayNameID == -1))
{
binWriter.Write(Encoding.ASCII.GetBytes(customName), 0, Encoding.ASCII.GetByteCount(customName) >= 0x20 ? 0x19 : Encoding.ASCII.GetByteCount(customName));