Zepheus.Zone.Game.NPC.Write C# (CSharp) Method

Write() public method

public Write ( Packet packet ) : void
packet Zepheus.FiestaLib.Networking.Packet
return void
        public void Write(Packet packet)
        {
            packet.WriteUShort(this.MapObjectID);
            packet.WriteByte(2); //always 2 (type i bet shown / transparent?)
            packet.WriteUShort(ID);
            packet.WriteInt(this.Position.X);
            packet.WriteInt(this.Position.Y);
            packet.WriteByte(this.Rotation); //TODO: rotation for NPC (from txt official files?)
            if (Gate != null)
            {
                packet.WriteByte(1);
                packet.WriteString(Gate.MapClient, 12);
                packet.Fill(41, 0);
            }
            else
            {
                packet.Fill(54, 0); //find out later
            }
        }