Exemplo n.º 1
0
 public void WelcomeMesage(string Message)
 {
     ServerPacket Welcome = new ServerPacket();
     Welcome.Init(810);
     Welcome.AppendUInt(1);
     Welcome.AppendStringWithBreak(Message);
     GetConnection().SendPacket(Welcome);
 }
Exemplo n.º 2
0
        public void UpdateState(bool inDb, bool inRoom)
        {
            if (inDb)
            {
                using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                {
                    dbClient.AddParamWithValue("extra_data", this.ExtraData);
                    dbClient.ExecuteQuery("UPDATE room_items SET extra_data = @extra_data WHERE id = '" + Id + "' LIMIT 1");
                }
            }

            if (inRoom)
            {
                ServerPacket Message = new ServerPacket();

                if (IsFloorItem)
                {
                    Message.Init(88);
                    Message.AppendStringWithBreak(Id.ToString());
                    Message.AppendStringWithBreak(ExtraData);
                }
                else
                {
                    Message.Init(85);
                    Serialize(Message);
                }

                GetRoom().SendMessage(Message);
            }
        }
Exemplo n.º 3
0
        public void SendNotif(string Message, Boolean FromHotelManager)
        {
            ServerPacket nMessage = new ServerPacket();

            if (FromHotelManager)
            {
                nMessage.Init(139);
            }
            else
            {
                nMessage.Init(161);
            }

            nMessage.AppendStringWithBreak(Message);
            GetConnection().SendPacket(nMessage);
        }