public void WriteCharacterDisplay(Packet packet)
{
packet.WriteUShort(MapObjectID);
packet.WriteString(Name, 16);
packet.WriteInt(Position.X);
packet.WriteInt(Position.Y);
packet.WriteByte(Rotation); // Rotation
packet.WriteByte((byte)State); // Player State (1,2 - Player, 3 - Dead, 4 - Resting, 5 - Vendor, 6 - On Mount)
packet.WriteByte((byte)Job);
if (State != PlayerState.Resting && State != PlayerState.Vendor && this.House == null)
{
WriteLook(packet);
WriteEquipment(packet);
}
else
{
this.House.WritePacket(packet);
}
WriteRefinement(packet);
packet.WriteUShort(0xffff); // Mount Handle
packet.WriteUShort(0xffff);
packet.WriteByte(0xff); // Emote (0xff = nothing)
packet.WriteUShort(0xffff);
packet.WriteShort(0);
packet.WriteUShort(0); // Mob ID (title = 10)
packet.Fill(53, 0); // Buff Bits? Something like that
packet.WriteInt(character.GuildID.HasValue ? character.GuildID.Value : 0); // Guild ID
packet.WriteByte(0x02); // UNK (0x02)
packet.WriteBool(false); // In Guild Academy (0 - No, 1 - Yes)
packet.WriteBool(true); // Pet AutoPickup (0 - Off, 1 - On)
packet.WriteByte(this.Level);
}