WriteSByte() public method

public WriteSByte ( sbyte pValue ) : void
pValue sbyte
return void
Example #1
0
        public static void SendInterfaceClock(WorldClient client)
        {
            DateTime dt = DateTime.Now;

            using (var packet = new Packet(SH2Type.InterfaceClock))
            {
                packet.WriteInt(DateTime.Now.DayOfYear); //unk
                packet.WriteInt(DateTime.Now.Minute);
                packet.WriteInt(DateTime.Now.Hour);
                packet.WriteInt(DateTime.Now.Day);
                packet.WriteInt((DateTime.Now.Month - 1));
                packet.WriteInt((DateTime.Now.Year - 1900));
                packet.WriteInt((int)DateTime.Now.DayOfWeek);
                packet.WriteInt((DateTime.Now.DayOfYear - 1));
                packet.Fill(4, 0); //unk
                packet.WriteSByte(Convert.ToSByte((DateTime.Now - DateTime.UtcNow).ToString().Split(':')[0])); //Timezone
                client.SendPacket(packet);
            }
        }
Example #2
0
 public virtual void WriteInfo(Packet packet)
 {
     packet.WriteByte(5); //entry length
     packet.WriteSByte(this.Slot);
     packet.WriteByte(0x24); //status?
     WriteItemStats(packet);
 }