Пример #1
0
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().HasFuse("acc_supporttool"))
     {
         uint   uint_ = Event.PopWiredUInt();
         bool   flag  = Event.PopWiredBoolean();
         bool   flag2 = Event.PopWiredBoolean();
         bool   flag3 = Event.PopWiredBoolean();
         string text  = "";
         if (flag)
         {
             text += "Klingeln aktivieren";
         }
         if (flag2)
         {
             text += "Raumnamen aktualisieren";
         }
         if (flag3)
         {
             text += "Habbos aus Raum kicken";
         }
         HabboIM.GetGame().GetClientManager().method_31(Session, "HabboIM -Raum Aktion", text);
         HabboIM.GetGame().GetModerationTool().method_12(Session, uint_, flag3, flag, flag2);
     }
 }
Пример #2
0
 public void Fill(Room Room)
 {
     this.Id               = Room.Id;
     this.Name             = Room.Name;
     this.Description      = Room.Description;
     this.Type             = Room.Type;
     this.Owner            = Room.Owner;
     this.Category         = Room.Category;
     this.State            = Room.State;
     this.UsersNow         = Room.UsersNow;
     this.UsersMax         = Room.UsersMax;
     this.ModelName        = Room.ModelName;
     this.CCTs             = Room.CCTs;
     this.Score            = Room.Score;
     this.Tags             = Room.Tags;
     this.AllowPet         = Room.AllowPet;
     this.AllowPetsEating  = Room.AllowPetsEating;
     this.AllowWalkthrough = Room.AllowWalkthrough;
     this.Hidewall         = Room.Hidewall;
     this.Wallthick        = Room.Wallthick;
     this.Floorthick       = Room.Floorthick;
     this.myIcon           = Room.RoomIcon;
     this.Password         = Room.Password;
     this.Event            = Room.Event;
     this.Wallpaper        = Room.Wallpaper;
     this.Floor            = Room.Floor;
     this.Landscape        = Room.Landscape;
     this.Achievement      = Room.Achievement;
     this.class28_0        = HabboIM.GetGame().GetRoomManager().GetModel(this.ModelName, this.Id);
 }
Пример #3
0
        public void Handle(GameClient Session, ClientMessage Event)
        {
            Room room = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

            if (room != null)
            {
                RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
                if (roomUserByHabbo != null)
                {
                    roomUserByHabbo.Unidle();
                    int num = Event.PopWiredInt32();
                    if (num < 0 || num > 4 || (!Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && num > 1))
                    {
                        num = 0;
                    }
                    if (num > 0 && roomUserByHabbo.CarryItemID > 0)
                    {
                        roomUserByHabbo.CarryItem(0);
                    }
                    roomUserByHabbo.DanceId = num;
                    ServerMessage serverMessage = new ServerMessage(480u);
                    serverMessage.AppendInt32(roomUserByHabbo.VirtualId);
                    serverMessage.AppendInt32(num);
                    room.SendMessage(serverMessage, null);
                    if (Session.GetHabbo().CurrentQuestId > 0 && HabboIM.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "DANCE")
                    {
                        HabboIM.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
                    }
                }
            }
        }
Пример #4
0
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null)
     {
         Session.SendMessage(HabboIM.GetGame().GetNavigator().method_12(Session, -3));
     }
 }
Пример #5
0
        public Item method_10()
        {
            switch (HabboIM.smethod_5(0, 6))
            {
            case 0:
                return(HabboIM.GetGame().GetItemManager().method_2(164U));

            case 1:
                return(HabboIM.GetGame().GetItemManager().method_2(165U));

            case 2:
                return(HabboIM.GetGame().GetItemManager().method_2(166U));

            case 3:
                return(HabboIM.GetGame().GetItemManager().method_2(167U));

            case 4:
                return(HabboIM.GetGame().GetItemManager().method_2(168U));

            case 5:
                return(HabboIM.GetGame().GetItemManager().method_2(169U));

            case 6:
                return(HabboIM.GetGame().GetItemManager().method_2(170U));

            default:
                return((Item)null);
            }
        }
Пример #6
0
        public ServerMessage ComposeBadgeListMessage()
        {
            List <Badge> list = new List <Badge>();

            ServerMessage Message = new ServerMessage(229u);

            Message.AppendInt32(this.BadgeCount);

            foreach (Badge current in this.Badges)
            {
                Message.AppendUInt(HabboIM.GetGame().GetAchievementManager().method_0(current.Code));
                Message.AppendStringWithBreak(current.Code);

                if (current.Slot > 0)
                {
                    list.Add(current);
                }
            }

            Message.AppendInt32(list.Count);

            foreach (Badge current in list)
            {
                Message.AppendInt32(current.Slot);
                Message.AppendStringWithBreak(current.Code);
            }

            return(Message);
        }
        public void Handle(GameClient Session, ClientMessage Event)
        {
            ServerMessage Message = new ServerMessage(36u);

            Message.AppendInt32(HabboIM.GetGame().GetCatalog().method_8(Event.PopFixedString()) ? 0 : 2);
            Session.SendMessage(Message);
        }
        public void Handle(GameClient Session, ClientMessage Event)
        {
            Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

            if (@class != null && @class.CheckRights(Session, true))
            {
                ServerMessage Message = new ServerMessage(465u);
                Message.AppendUInt(@class.Id);
                Message.AppendStringWithBreak(@class.Name);
                Message.AppendStringWithBreak(@class.Description);
                Message.AppendInt32(@class.State);
                Message.AppendInt32(@class.Category);
                Message.AppendInt32(@class.UsersMax);
                Message.AppendInt32(100);
                Message.AppendInt32(@class.Tags.Count);
                foreach (string current in @class.Tags)
                {
                    Message.AppendStringWithBreak(current);
                }
                Message.AppendInt32(@class.UsersWithRights.Count);
                foreach (uint current2 in @class.UsersWithRights)
                {
                    Message.AppendUInt(current2);
                    Message.AppendStringWithBreak(HabboIM.GetGame().GetClientManager().GetNameById(current2));
                }
                Message.AppendInt32(@class.UsersWithRights.Count);
                Message.AppendBoolean(@class.AllowPet);
                Message.AppendBoolean(@class.AllowPetsEating);
                Message.AppendBoolean(@class.AllowWalkthrough);
                Message.AppendBoolean(@class.Hidewall);
                Message.AppendInt32(@class.Wallthick);
                Message.AppendInt32(@class.Floorthick);
                Session.SendMessage(Message);
            }
        }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     try
     {
         Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
         {
             RoomItem class2 = null;
             foreach (RoomItem class3 in @class.Hashtable_1.Values)
             {
                 if (class3.GetBaseItem().InteractionType.ToLower() == "dimmer")
                 {
                     class2 = class3;
                     break;
                 }
             }
             if (class2 != null)
             {
                 if (@class.MoodlightData.Enabled)
                 {
                     @class.MoodlightData.method_1();
                 }
                 else
                 {
                     @class.MoodlightData.method_0();
                 }
                 class2.ExtraData = @class.MoodlightData.method_7();
                 class2.method_4();
             }
         }
     }
     catch
     {
     }
 }
        public void Handle(GameClient Session, ClientMessage Event)
        {
            uint     num    = Event.PopWiredUInt();
            RoomData @class = HabboIM.GetGame().GetRoomManager().method_12(num);

            if (@class == null || Session.GetHabbo().list_1.Count >= 30 || Session.GetHabbo().list_1.Contains(num) || @class.Type == "public")
            {
                ServerMessage Message = new ServerMessage(33u);
                Message.AppendInt32(-9001);
                Session.SendMessage(Message);
            }
            else
            {
                ServerMessage Message2 = new ServerMessage(459u);
                Message2.AppendUInt(num);
                Message2.AppendBoolean(true);
                Session.SendMessage(Message2);
                Session.GetHabbo().list_1.Add(num);
                using (DatabaseClient class2 = HabboIM.GetDatabase().GetClient())
                {
                    class2.ExecuteQuery(string.Concat(new object[]
                    {
                        "INSERT INTO user_favorites (user_id,room_id) VALUES ('",
                        Session.GetHabbo().Id,
                        "','",
                        num,
                        "')"
                    }));
                }
            }
        }
        public void Handle(GameClient Session, ClientMessage Event)
        {
            uint   num  = Event.PopWiredUInt();
            string text = HabboIM.FilterString(Event.PopFixedString());

            if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null)
            {
                if (num == 0u && Session.GetHabbo().HasFuse("cmd_sa"))
                {
                    ServerMessage Message = new ServerMessage(134u);
                    Message.AppendUInt(0u);
                    Message.AppendString(Session.GetHabbo().Username + ": " + text);
                    HabboIM.GetGame().GetClientManager().method_17(Session, Message);
                }
                else
                {
                    if (num == 0u)
                    {
                        ServerMessage Message2 = new ServerMessage(261u);
                        Message2.AppendInt32(4);
                        Message2.AppendUInt(0u);
                        Session.SendMessage(Message2);
                    }
                    else
                    {
                        if (Session != null && Session.GetHabbo() != null)
                        {
                            Session.GetHabbo().GetMessenger().method_18(num, text);
                        }
                    }
                }
            }
        }
Пример #12
0
        public void Handle(GameClient Session, ClientMessage Event)
        {
            uint num  = Event.PopWiredUInt();
            Room room = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

            if (room != null)
            {
                RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(num);
                if (room != null && room.CheckRights(Session, true) && roomUserByHabbo != null && !roomUserByHabbo.IsBot && !room.UsersWithRights.Contains(num))
                {
                    room.UsersWithRights.Add(num);
                    using (DatabaseClient client = HabboIM.GetDatabase().GetClient())
                    {
                        client.ExecuteQuery(string.Concat(new object[]
                        {
                            "INSERT INTO room_rights (room_id,user_id) VALUES (",
                            room.Id,
                            ",",
                            num,
                            ")"
                        }));
                    }
                    ServerMessage serverMessage = new ServerMessage(510u);
                    serverMessage.AppendUInt(room.Id);
                    serverMessage.AppendUInt(num);
                    serverMessage.AppendStringWithBreak(roomUserByHabbo.GetClient().GetHabbo().Username);
                    Session.SendMessage(serverMessage);
                    roomUserByHabbo.AddStatus("flatctrl", "");
                    roomUserByHabbo.UpdateNeeded = true;
                    roomUserByHabbo.GetClient().SendMessage(new ServerMessage(42u));
                }
            }
        }
Пример #13
0
 public void Handle(GameClient session, ClientMessage message)
 {
     try
     {
         ServerMessage response = new ServerMessage(950u);
         session.GetHabbo().GetUserDataFactory().UpdateFriendStream();
         int streamCount = session.GetHabbo().GetUserDataFactory().GetFriendStream().Rows.Count;
         response.AppendInt32(streamCount);
         DataTable dataTable_ = session.GetHabbo().GetUserDataFactory().GetFriendStream();
         foreach (DataRow row in dataTable_.Rows)
         {
             int type = (int)row["type"];
             if (type == 5)
             {
                 uint id      = (uint)row["id"];
                 int  likes   = 0;
                 bool canlike = false;
                 using (DatabaseClient @class = HabboIM.GetDatabase().GetClient())
                 {
                     likes = @class.ReadInt32("SELECT COUNT(friend_stream_id) FROM friend_stream_likes WHERE friend_stream_id = '" + id + "' LIMIT 1", 30);
                     DataRow datarow = @class.ReadDataRow(string.Concat(new object[]
                     {
                         "SELECT id FROM friend_stream_likes WHERE friend_stream_id = '",
                         id,
                         "' AND userid = '",
                         session.GetHabbo().Id,
                         "' LIMIT 1"
                     }), 30);
                     canlike = (datarow == null);
                 }
                 uint   userid   = (uint)row["userid"];
                 string username = HabboIM.GetGame().GetClientManager().GetNameById(userid);
                 string gender   = row["gender"].ToString().ToLower();
                 string look     = (string)row["look"];
                 int    time     = (int)((HabboIM.GetUnixTimestamp() - (double)row["time"]) / 60.0);
                 string data     = (string)row["data"];
                 response.AppendUInt(id);
                 response.AppendInt32(1); // type 1
                 response.AppendStringWithBreak(userid.ToString());
                 response.AppendStringWithBreak(username);
                 response.AppendStringWithBreak(gender);
                 response.AppendStringWithBreak("http://live-hotel.biz/web-gallery/friendstream/index.gif?figure=" + look + ".gif");
                 response.AppendInt32(time);
                 response.AppendInt32(2);
                 response.AppendInt32(likes);
                 response.AppendBoolean(canlike);
                 response.AppendStringWithBreak("1");
                 response.AppendStringWithBreak(data);
             }
         }
         session.SendMessage(response);
     }
     catch (Exception x)
     {
         session.SendNotification("Es trat folgender Fehler auf:\r\n" + x);
         Console.ForegroundColor = ConsoleColor.Red;
         Console.WriteLine(x);
         Console.ForegroundColor = ConsoleColor.Gray;
     }
 }
Пример #14
0
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null)
         {
             RoomUser class2 = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
             if (class2 != null)
             {
                 class2.Unidle();
                 int num  = Event.PopWiredInt32();
                 int num2 = Event.PopWiredInt32();
                 if (num != class2.X || num2 != class2.Y)
                 {
                     int int_ = Class107.smethod_0(class2.X, class2.Y, num, num2);
                     class2.method_9(int_);
                     if (class2.class34_1 != null && class2.RoomUser_0 != null)
                     {
                         class2.RoomUser_0.method_9(int_);
                     }
                 }
             }
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetConnection() != null)
     {
         Session.GetConnection().SendData(HabboIM.GetGame().GetNavigator().SerializeNavigator(Session, Event.PopFixedInt32()));
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     try
     {
         Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
         {
             ServerMessage Message = new ServerMessage(365u);
             Message.AppendInt32(@class.MoodlightData.Presets.Count);
             Message.AppendInt32(@class.MoodlightData.CurrentPreset);
             int num = 0;
             foreach (MoodlightPreset current in @class.MoodlightData.Presets)
             {
                 num++;
                 Message.AppendInt32(num);
                 Message.AppendInt32(int.Parse(HabboIM.BooleanToString(current.BackgroundOnly)) + 1);
                 Message.AppendStringWithBreak(current.ColorCode);
                 Message.AppendInt32(current.ColorIntensity);
             }
             Session.SendMessage(Message);
         }
     }
     catch
     {
     }
 }
        public void Handle(GameClient Session, ClientMessage Event)
        {
            Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

            if (@class != null)
            {
                RoomItem class2 = @class.method_28(Event.PopWiredUInt());
                if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
                {
                    string text  = Event.PopFixedString();
                    string text2 = text.Split(new char[]
                    {
                        ' '
                    })[0];
                    string str = HabboIM.DoFilter(text.Substring(text2.Length + 1), true, true);
                    if (@class.method_26(Session) || text.StartsWith(class2.ExtraData))
                    {
                        string text3 = text2;
                        if (text3 != null && (text3 == "FFFF33" || text3 == "FF9CFF" || text3 == "9CCEFF" || text3 == "9CFF9C"))
                        {
                            class2.ExtraData = text2 + " " + str;
                            class2.UpdateState(true, true);
                        }
                    }
                }
            }
        }
Пример #18
0
        public void Handle(GameClient Session, ClientMessage Event)
        {
            uint num = Event.PopWiredUInt();

            Event.PopFixedString();
            Event.PopWiredInt32();
            RoomData @class = HabboIM.GetGame().GetRoomManager().method_12(num);

            if (@class != null)
            {
                if (@class.Type == "private")
                {
                    ServerMessage Message = new ServerMessage(286u);
                    Message.AppendBoolean(@class.IsPublicRoom);
                    Message.AppendUInt(num);
                    Session.SendMessage(Message);
                }
                else
                {
                    ServerMessage Message2 = new ServerMessage(453u);
                    Message2.AppendUInt(@class.Id);
                    Message2.AppendStringWithBreak(@class.CCTs);
                    Message2.AppendUInt(@class.Id);
                    Session.SendMessage(Message2);
                }
            }
        }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Event.PopWiredInt32();
         Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null && @class.CheckRights(Session, true))
         {
             RoomItem class2 = @class.method_28(Event.PopWiredUInt());
             if (class2 != null)
             {
                 string text = class2.GetBaseItem().InteractionType.ToLower();
                 if (text == null || !(text == "postit"))
                 {
                     @class.method_29(Session, class2.uint_0, false, true);
                     Session.GetHabbo().GetInventoryComponent().method_11(class2.uint_0, class2.uint_2, class2.ExtraData, false);
                     Session.GetHabbo().GetInventoryComponent().method_9(true);
                     if (Session.GetHabbo().CurrentQuestId > 0 && HabboIM.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "PICKUPITEM")
                     {
                         HabboIM.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
                     }
                 }
             }
         }
     }
 }
		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && Session.GetHabbo().RespectPoints > 0)
			{
				RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
				if (class2 != null && class2.GetClient().GetHabbo().Id != Session.GetHabbo().Id && !class2.IsBot)
				{
					Session.GetHabbo().RespectPoints--;
					Session.GetHabbo().RespectGiven++;
					class2.GetClient().GetHabbo().Respect++;
					using (DatabaseClient class3 = HabboIM.GetDatabase().GetClient())
					{
						class3.ExecuteQuery("UPDATE user_stats SET Respect = respect + 1 WHERE Id = '" + class2.GetClient().GetHabbo().Id + "' LIMIT 1");
						class3.ExecuteQuery("UPDATE user_stats SET RespectGiven = RespectGiven + 1 WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
						class3.ExecuteQuery("UPDATE user_stats SET dailyrespectpoints = dailyrespectpoints - 1 WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
					}
					ServerMessage Message = new ServerMessage(440u);
					Message.AppendUInt(class2.GetClient().GetHabbo().Id);
					Message.AppendInt32(class2.GetClient().GetHabbo().Respect);
					@class.SendMessage(Message, null);
                    Session.GetHabbo().CheckRespectGivedAchievements();
                    class2.GetClient().GetHabbo().CheckRespectReceivedAchievements();
                    if (Session.GetHabbo().CurrentQuestId > 0 && HabboIM.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "GIVE_RESPECT")
					{
                        HabboIM.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
					}
				}
			}
		}
Пример #21
0
        public void Handle(GameClient Session, ClientMessage Event)
        {
            Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

            if (@class != null)
            {
                if ([email protected])
                {
                    Session.GetHabbo().Whisper(HabboIMEnvironment.GetExternalText("trade_error_roomdisabled"));
                }
                else
                {
                    RoomUser class2 = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
                    RoomUser class3 = @class.method_52(Event.PopWiredInt32());
                    if (class2 != null && class3 != null && class3.GetClient().GetHabbo().TradingDisabled)
                    {
                        @class.method_77(class2, class3);
                    }
                    else
                    {
                        Session.GetHabbo().Whisper(HabboIMEnvironment.GetExternalText("trade_error_targetdisabled"));
                    }
                }
            }
        }
Пример #22
0
        public void Handle(GameClient Session, ClientMessage Event)
        {
            uint     num    = Event.PopWiredUInt();
            RoomData @class = HabboIM.GetGame().GetRoomManager().method_12(num);

            if (num == 0u || (@class != null && !(@class.Owner.ToLower() != Session.GetHabbo().Username.ToLower())))
            {
                Session.GetHabbo().HomeRoomId = num;
                using (DatabaseClient class2 = HabboIM.GetDatabase().GetClient())
                {
                    class2.ExecuteQuery(string.Concat(new object[]
                    {
                        "UPDATE users SET home_room = '",
                        num,
                        "' WHERE Id = '",
                        Session.GetHabbo().Id,
                        "' LIMIT 1;"
                    }));
                    Session.GetHabbo().Whisper("Dein Hauptwohnsitz wurde erfolgreich aktualisiert!");
                }
                ServerMessage Message = new ServerMessage(455u);
                Message.AppendUInt(num);
                Session.SendMessage(Message);
            }
        }
Пример #23
0
        public void method_7(string string_0, uint uint_1, uint uint_2, int int_0)
        {
            CatalogItem catalogItem = this.method_5(int_0).method_1(uint_2);
            uint        num         = this.method_14();
            Item        obj         = this.method_10();

            using (DatabaseClient client = HabboIM.GetDatabase().GetClient())
            {
                client.AddParamWithValue("gift_message", (object)("!" + ChatCommandHandler.smethod_4(HabboIM.DoFilter(string_0, true, true))));
                client.ExecuteQuery("INSERT INTO items (Id,user_id,base_item,wall_pos) VALUES ('" + (object)num + "','" + (object)uint_1 + "','" + (object)obj.UInt32_0 + "','')", 30);
                client.ExecuteQuery(string.Concat(new object[3]
                {
                    (object)"INSERT INTO items_extra_data (item_id,extra_data) VALUES ('",
                    (object)num,
                    (object)"',@gift_message)"
                }), 30);
                client.ExecuteQuery("INSERT INTO user_presents (item_id,base_id,amount,extra_data) VALUES ('" + (object)num + "','" + (object)catalogItem.method_0().UInt32_0 + "','" + (object)catalogItem.int_3 + "','')", 30);
            }
            GameClient gameClient = HabboIM.GetGame().GetClientManager().method_2(uint_1);

            if (gameClient == null)
            {
                return;
            }
            gameClient.SendNotification("Du hast ein Geschenk in Inventar erhalten!");
            gameClient.GetHabbo().GetInventoryComponent().method_9(true);
        }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().HasFuse("acc_chatlogs"))
     {
         Session.SendMessage(HabboIM.GetGame().GetModerationTool().method_20(Event.PopWiredUInt()));
     }
 }
Пример #25
0
 public void FillNull(uint mId)
 {
     this.Id               = mId;
     this.Name             = "Unknown Room";
     this.Description      = "-";
     this.Type             = "private";
     this.Owner            = "-";
     this.Category         = 0;
     this.UsersNow         = 0;
     this.UsersMax         = 0;
     this.ModelName        = "NO_MODEL";
     this.CCTs             = "";
     this.Score            = 0;
     this.Tags             = new List <string>();
     this.AllowPet         = true;
     this.AllowPetsEating  = false;
     this.AllowWalkthrough = true;
     this.Hidewall         = false;
     this.HideOwner        = false;
     this.allRights        = false;
     this.Wallthick        = 0;
     this.Floorthick       = 0;
     this.Password         = "";
     this.Wallpaper        = "0.0";
     this.Floor            = "0.0";
     this.Landscape        = "0.0";
     this.Event            = null;
     this.Achievement      = 0u;
     this.bool_3           = false;
     this.myIcon           = new RoomIcon(1, 1, new Dictionary <int, int>());
     this.class28_0        = HabboIM.GetGame().GetRoomManager().GetModel(this.ModelName, mId);
 }
Пример #26
0
        public void Handle(GameClient Session, ClientMessage Event)
        {
            uint num    = Event.PopWiredUInt();
            Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

            if (@class != null && [email protected])
            {
                RoomUser class2 = @class.method_48(num);
                if (class2 == null || class2.PetData == null)
                {
                    DataRow dataRow = null;
                    using (DatabaseClient class3 = HabboIM.GetDatabase().GetClient())
                    {
                        class3.AddParamWithValue("petid", num);
                        dataRow = class3.ReadDataRow("SELECT Id, user_id, room_id, name, type, race, color, expirience, energy, nutrition, respect, createstamp, x, y, z FROM user_pets WHERE Id = @petid LIMIT 1");
                    }
                    if (dataRow != null)
                    {
                        Session.SendMessage(HabboIM.GetGame().GetCatalog().method_12(dataRow).SerializeInfo());
                    }
                }
                else
                {
                    Session.SendMessage(class2.PetData.SerializeInfo());
                }
            }
        }
        public void Handle(GameClient Session, ClientMessage Event)
        {
            Room @class = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

            if (@class != null && @class.CheckRights(Session, true))
            {
                foreach (uint current in @class.UsersWithRights)
                {
                    RoomUser class2 = @class.GetRoomUserByHabbo(current);
                    if (class2 != null && !class2.IsBot)
                    {
                        class2.GetClient().SendMessage(new ServerMessage(43u));
                    }
                    ServerMessage Message = new ServerMessage(511u);
                    Message.AppendUInt(@class.Id);
                    Message.AppendUInt(current);
                    Session.SendMessage(Message);
                }
                using (DatabaseClient class3 = HabboIM.GetDatabase().GetClient())
                {
                    class3.ExecuteQuery("DELETE FROM room_rights WHERE room_id = '" + @class.Id + "'");
                }
                @class.UsersWithRights.Clear();
            }
        }
Пример #28
0
        public void Handle(GameClient session, ClientMessage message)
        {
            if (session != null && session.GetHabbo() != null)
            {
                Room room = HabboIM.GetGame().GetRoomManager().GetRoom(session.GetHabbo().CurrentRoomId);

                if (room != null)
                {
                    RoomUser targetUser = room.GetRoomUserByHabbo(message.PopWiredUInt());

                    if (targetUser != null && !targetUser.IsBot && targetUser.GetClient() != null)
                    {
                        ServerMessage Message = new ServerMessage(228u);

                        Message.AppendUInt(targetUser.GetClient().GetHabbo().Id);
                        Message.AppendInt32(targetUser.GetClient().GetHabbo().GetBadgeComponent().VisibleBadges);

                        using (TimedLock.Lock(targetUser.GetClient().GetHabbo().GetBadgeComponent().GetBadges()))
                        {
                            foreach (Badge current in targetUser.GetClient().GetHabbo().GetBadgeComponent().GetBadges())
                            {
                                if (current.Slot > 0)
                                {
                                    Message.AppendInt32(current.Slot);
                                    Message.AppendStringWithBreak(current.Code);
                                }
                            }
                        }

                        session.SendMessage(Message);
                    }
                }
            }
        }
Пример #29
0
        internal void method_5(bool bool_1)
        {
            Hashtable hashtable = this.hashtable_0.Clone() as Hashtable;

            foreach (MessengerBuddy @class in hashtable.Values)
            {
                try
                {
                    GameClient class2 = HabboIM.GetGame().GetClientManager().method_2(@class.UInt32_0);
                    if (class2 != null && class2.GetHabbo() != null && class2.GetHabbo().GetMessenger() != null)
                    {
                        class2.GetHabbo().GetMessenger().method_6(this.uint_0);
                        if (bool_1)
                        {
                            class2.GetHabbo().GetMessenger().method_7();
                        }
                    }
                }
                catch
                {
                }
            }
            hashtable.Clear();
            hashtable = null;
        }
Пример #30
0
        public ServerMessage method_7(GameClient Session)
        {
            ServerMessage result;

            using (DatabaseClient @class = HabboIM.GetDatabase().GetClient())
            {
                DataTable       dataTable = @class.ReadDataTable("SELECT * FROM rooms JOIN user_roomvisits ON rooms.Id = user_roomvisits.room_id WHERE user_roomvisits.user_id = '" + Session.GetHabbo().Id + "' ORDER BY entry_timestamp DESC LIMIT 50;");
                List <RoomData> list      = new List <RoomData>();
                List <uint>     list2     = new List <uint>();
                if (dataTable != null)
                {
                    foreach (DataRow dataRow in dataTable.Rows)
                    {
                        RoomData class2 = HabboIM.GetGame().GetRoomManager().method_17((uint)dataRow["Id"], dataRow);
                        class2.method_1(dataRow);
                        list.Add(class2);
                        list2.Add(class2.Id);
                    }
                }
                ServerMessage Message = new ServerMessage(451u);
                Message.AppendInt32(0);
                Message.AppendInt32(7);
                Message.AppendStringWithBreak("");
                Message.AppendInt32(list.Count);
                foreach (RoomData current in list)
                {
                    current.method_3(Message, false, false);
                }
                result = Message;
            }
            return(result);
        }