public void Handle(GameClient Session, ClientMessage Event)
 {
     uint num = Event.PopWiredUInt();
     string text = GoldTree.FilterString(Event.PopFixedString());
     if (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);
             GoldTree.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);
                 }
             }
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().method_23() != null)
     {
         Session.SendMessage(Session.GetHabbo().method_23().method_15());
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room class14_ = Session.GetHabbo().CurrentRoom;
     if (class14_ != null)
     {
         Event.PopWiredUInt();
         string string_ = Event.PopFixedString();
         RoomUser @class = class14_.method_56(string_);
         if (@class != null)
         {
             uint uint_ = @class.GetClient().GetHabbo().Id;
             if (Session.GetHabbo().list_2.Contains(uint_))
             {
                 Session.GetHabbo().list_2.Remove(uint_);
                 using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
                 {
                     class2.ExecuteQuery(string.Concat(new object[]
                     {
                         "DELETE FROM user_ignores WHERE user_id = ",
                         Session.GetHabbo().Id,
                         " AND ignore_id = ",
                         uint_,
                         " LIMIT 1;"
                     }));
                 }
                 ServerMessage Message = new ServerMessage(419u);
                 Message.AppendInt32(3);
                 Session.SendMessage(Message);
             }
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room class14_ = Session.GetHabbo().CurrentRoom;
     if (class14_ != null)
     {
         Event.PopWiredUInt();
         string string_ = Event.PopFixedString();
         RoomUser @class = class14_.method_56(string_);
         if (@class != null && @class.GetClient().GetHabbo().Rank <= 2u)
         {
             uint uint_ = @class.GetClient().GetHabbo().Id;
             if (!Session.GetHabbo().list_2.Contains(uint_))
             {
                 Session.GetHabbo().list_2.Add(uint_);
                 using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
                 {
                     class2.ExecuteQuery(string.Concat(new object[]
                     {
                         "INSERT INTO user_ignores(user_id, ignore_id) VALUES (",
                         Session.GetHabbo().Id,
                         ", ",
                         uint_,
                         ");"
                     }));
                 }
                 ServerMessage Message = new ServerMessage(419u);
                 Message.AppendInt32(1);
                 Session.SendMessage(Message);
             }
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     DataTable dataTable = null;
     using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
     {
         dataTable = @class.ReadDataTable("SELECT asking_price FROM catalog_marketplace_offers WHERE user_id = '" + Session.GetHabbo().Id + "' AND state = '2'");
     }
     if (dataTable != null)
     {
         int num = 0;
         foreach (DataRow dataRow in dataTable.Rows)
         {
             num += (int)dataRow["asking_price"];
         }
         if (num >= 1)
         {
             Session.GetHabbo().Credits += num;
             Session.GetHabbo().method_13(true);
         }
         using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
         {
             @class.ExecuteQuery("DELETE FROM catalog_marketplace_offers WHERE user_id = '" + Session.GetHabbo().Id + "' AND state = '2'");
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Room @class = GoldTree.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.int_3 || num2 != class2.int_4)
                 {
                     int int_ = Class107.smethod_0(class2.int_3, class2.int_4, 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)
 {
     uint num = Event.PopWiredUInt();
     RoomData @class = GoldTree.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 = GoldTree.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)
        {
            int int_ = Event.PopWiredInt32();
            uint uint_ = Event.PopWiredUInt();
            string string_ = Event.PopFixedString();

            if (Session == null || Session.GetHabbo() == null)
            {
                return;
            }

            if (Session.GetHabbo().int_24 > 1)
            {
                int num = 0;
                while (num < Session.GetHabbo().int_24 && GoldTree.GetGame().GetCatalog().method_6(Session, int_, uint_, string_, false, "", "", num == 0))
                {
                    num++;
                }
                Session.GetHabbo().int_24 = 1;
            }
            else
            {
                GoldTree.GetGame().GetCatalog().method_6(Session, int_, uint_, string_, false, "", "", true);
            }
        }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && !Session.GetHabbo().list_4.Contains(@class.Id) && [email protected](Session, true))
     {
         switch (Event.PopWiredInt32())
         {
         case -1:
             @class.Score--;
             break;
         case 0:
             return;
         case 1:
             @class.Score++;
             break;
         default:
             return;
         }
         using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
         {
             class2.ExecuteQuery(string.Concat(new object[]
             {
                 "UPDATE rooms SET score = '",
                 @class.Score,
                 "' WHERE Id = '",
                 @class.Id,
                 "' LIMIT 1"
             }));
         }
         Session.GetHabbo().list_4.Add(@class.Id);
         ServerMessage Message = new ServerMessage(345u);
         Message.AppendInt32(@class.Score);
         Session.SendMessage(Message);
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null)
     {
         Session.SendMessage(Session.GetHabbo().GetMessenger().SerializeUpdates());
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Session.SendMessage(GoldTree.GetGame().GetCatalog().method_18(Session.GetHabbo().Rank));
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room room = GoldTree.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 (GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "DANCE")
             {
                 GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
             }
         }
     }
 }
 public override void OnPlace(GameClient Session, RoomItem Item)
 {
     RoomMusicController roomMusicController = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
     roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(Item);
     roomMusicController.Stop();
     Session.GetHabbo().CurrentRoom.LoadMusic();
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null)
         {
             RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
             if (class2 != null && !class2.IsBot && class2.GetClient() != null)
             {
                 ServerMessage Message = new ServerMessage(228u);
                 Message.AppendUInt(class2.GetClient().GetHabbo().Id);
                 Message.AppendInt32(class2.GetClient().GetHabbo().method_22().Int32_1);
                 using (TimedLock.Lock(class2.GetClient().GetHabbo().method_22().List_0))
                 {
                     foreach (Badge current in class2.GetClient().GetHabbo().method_22().List_0)
                     {
                         if (current.Slot > 0)
                         {
                             Message.AppendInt32(current.Slot);
                             Message.AppendStringWithBreak(current.Code);
                         }
                     }
                 }
                 Session.SendMessage(Message);
             }
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && (@class.AllowPet || @class.CheckRights(Session, true)))
     {
         uint uint_ = Event.PopWiredUInt();
         Pet class2 = Session.GetHabbo().method_23().method_4(uint_);
         if (class2 != null && !class2.PlacedInRoom)
         {
             int num = Event.PopWiredInt32();
             int num2 = Event.PopWiredInt32();
             if (@class.method_30(num, num2, 0.0, true, false))
             {
                 if (@class.Int32_2 >= LicenseTools.int_2)
                 {
                     Session.SendNotif(GoldTreeEnvironment.smethod_1("error_maxpets") + LicenseTools.int_2);
                 }
                 else
                 {
                     class2.PlacedInRoom = true;
                     class2.RoomId = @class.Id;
                     List<RandomSpeech> list = new List<RandomSpeech>();
                     List<BotResponse> list2 = new List<BotResponse>();
                     @class.method_4(new RoomBot(class2.PetId, class2.RoomId, AIType.const_0, "freeroam", class2.Name, "", class2.Look, num, num2, 0, 0, 0, 0, 0, 0, ref list, ref list2, 0), class2);
                     if (@class.CheckRights(Session, true))
                     {
                         Session.GetHabbo().method_23().method_6(class2.PetId, @class.Id);
                     }
                 }
             }
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     DataTable dataTable_ = Session.GetHabbo().dataTable_0;
     if (dataTable_ != null)
     {
         ServerMessage Message = new ServerMessage(915u);
         Message.AppendInt32(dataTable_.Rows.Count);
         foreach (DataRow dataRow in dataTable_.Rows)
         {
             GroupsManager @class = Groups.smethod_2((int)dataRow["groupid"]);
             Message.AppendInt32(@class.int_0);
             Message.AppendStringWithBreak(@class.string_0);
             Message.AppendStringWithBreak(@class.string_2);
             if (Session.GetHabbo().int_0 == @class.int_0) // is favorite group?
             {
                 Message.AppendBoolean(true);
             }
             else
             {
                 Message.AppendBoolean(false);
             }
         }
         Session.SendMessage(Message);
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && Session.GetHabbo().int_21 > 0)
     {
         RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
         if (class2 != null && class2.GetClient().GetHabbo().Id != Session.GetHabbo().Id && !class2.IsBot)
         {
             Session.GetHabbo().int_21--;
             Session.GetHabbo().RespectGiven++;
             class2.GetClient().GetHabbo().Respect++;
             using (DatabaseClient class3 = GoldTree.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 (GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "GIVE_RESPECT")
             {
                 GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
             }
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && @class.Boolean_2)
     {
         @class.method_78(Session.GetHabbo().Id);
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     try
     {
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null)
         {
             if (@class.method_72("stickiepole") > 0 || @class.method_26(Session))
             {
                 uint uint_ = Event.PopWiredUInt();
                 string text = Event.PopFixedString();
                 string[] array = text.Split(new char[]
                 {
                     ' '
                 });
                 if (array[0].Contains("-"))
                 {
                     array[0] = array[0].Replace("-", "");
                 }
                 UserItem class2 = Session.GetHabbo().method_23().method_10(uint_);
                 if (class2 != null)
                 {
                     if (array[0].StartsWith(":"))
                     {
                         string text2 = @class.method_98(text);
                         if (text2 == null)
                         {
                             ServerMessage Message = new ServerMessage(516u);
                             Message.AppendInt32(11);
                             Session.SendMessage(Message);
                             return;
                         }
                         RoomItem RoomItem_ = new RoomItem(class2.uint_0, @class.Id, class2.uint_1, class2.string_0, 0, 0, 0.0, 0, text2, @class);
                         if (@class.method_82(Session, RoomItem_, true, null))
                         {
                             Session.GetHabbo().method_23().method_12(uint_, 1u, false);
                         }
                     }
                     using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient())
                     {
                         class3.ExecuteQuery(string.Concat(new object[]
                         {
                             "UPDATE items SET room_id = '",
                             @class.Id,
                             "' WHERE Id = '",
                             class2.uint_0,
                             "' LIMIT 1"
                         }));
                     }
                 }
             }
         }
     }
     catch
     {
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (GoldTree.GetGame().GetModerationTool().method_9(Session.GetHabbo().Id))
     {
         GoldTree.GetGame().GetModerationTool().method_10(Session.GetHabbo().Id);
         ServerMessage Message5_ = new ServerMessage(320u);
         Session.SendMessage(Message5_);
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().GetMessenger() != null)
     {
         if (Session.GetHabbo().CurrentQuestId > 0 && GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "REQUEST_FRIEND")
         {
             GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
         }
         Session.GetHabbo().GetMessenger().method_16(Event.PopFixedString());
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().GetMessenger() != null)
     {
         int num = Event.PopWiredInt32();
         for (int i = 0; i < num; i++)
         {
             Session.GetHabbo().GetMessenger().method_13(Event.PopWiredUInt());
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().GetMessenger() != null)
     {
         if (Session.GetHabbo().CurrentQuestId == 4u)
         {
             GoldTree.GetGame().GetQuestManager().ProgressUserQuest(4u, Session);
         }
         Session.GetHabbo().GetMessenger().method_16(Event.PopFixedString());
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null)
     {
         RoomUser class2 = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
         if (class2 != null)
         {
             class2.method_1(Session, GoldTree.FilterString(Event.PopFixedString()), true);
         }
     }
 }
        public void Handle(GameClient Session, ClientMessage Event)
        {
            ServerMessage Message = new ServerMessage(950u);
            int StreamCount = 0;
            foreach (DataRow dRow in Session.GetHabbo().Class12_0.DataTable_12.Rows)
            {
                StreamCount = StreamCount + 1;
            }
            DataTable dataTable_ = Session.GetHabbo().Class12_0.DataTable_12;
            foreach (DataRow dataRow in dataTable_.Rows)
            {
                int type = (int)dataRow["type"];
                if (type == 1)
                {
                    DataRow[] DataRow_ = Session.GetHabbo().Class12_0.DataTable_8.Select("id = " + (uint)dataRow["userid"]);
                    uint userid = (uint)dataRow["userid"];
                    string username = (string)DataRow_[0]["username"];
                    string gender = (string)dataRow["gender"].ToString().ToLower();
                    string look = (string)dataRow["look"];
                    int time = (int)((GoldTree.GetUnixTimestamp() - (double)dataRow["time"]) / 60);
                    string data = (string)dataRow["data"];

                    Message.AppendInt32(StreamCount);
                    Message.AppendUInt(1u);
                    Message.AppendInt32(type);
                    Message.AppendStringWithBreak(userid.ToString());
                    Message.AppendStringWithBreak(username);
                    Message.AppendStringWithBreak(gender);
                    Message.AppendStringWithBreak("http://127.0.0.1/retro/r63/c_images/friendstream/index.gif?figure=" + look + ".gif");
                    Message.AppendInt32WithBreak(time);
                    Message.AppendInt32WithBreak(type + 1);

                    uint RoomID;
                    RoomData RoomData;
                    if (uint.TryParse(data, out RoomID))
                        RoomData = GoldTree.GetGame().GetRoomManager().method_12(RoomID);
                    else
                        RoomData = GoldTree.GetGame().GetRoomManager().method_12(0);

                    if (RoomData != null)
                    {
                        Message.AppendStringWithBreak(RoomData.Id.ToString()); //data
                        Message.AppendStringWithBreak(RoomData.Name); //extra data
                    }
                    else
                    {
                        Message.AppendStringWithBreak("");
                        Message.AppendStringWithBreak("Room deleted");
                    }
                }
            }
            Session.SendMessage(Message);
        }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Dictionary<Room, int> dictionary = GoldTree.GetGame().GetRoomManager().method_21();
     Room @class = null;
     IEnumerable<Room> arg_35_0 = dictionary.Keys;
     if (FindNewFriendsMessageEvent.func_0 == null)
     {
         FindNewFriendsMessageEvent.func_0 = new Func<Room, int>(FindNewFriendsMessageEvent.smethod_0);
     }
     IOrderedEnumerable<Room> orderedEnumerable = arg_35_0.OrderByDescending(FindNewFriendsMessageEvent.func_0);
     int num = 0;
     foreach (Room current in orderedEnumerable)
     {
         num++;
         string a = GoldTree.smethod_5(1, 5).ToString();
         if (a == "2")
         {
             goto IL_83;
         }
         if (num == orderedEnumerable.Count<Room>())
         {
             goto IL_83;
         }
         bool arg_A2_0 = true;
         IL_A2:
         if (arg_A2_0)
         {
             continue;
         }
         @class = current;
         break;
         IL_83:
         arg_A2_0 = (Session == null ||Session.GetHabbo() == null || Session.GetHabbo().CurrentRoom == null || Session.GetHabbo().CurrentRoom == current);
         goto IL_A2;
     }
     if (@class == null)
     {
         ServerMessage Message = new ServerMessage(831u);
         Message.AppendBoolean(false);
         Session.SendMessage(Message);
     }
     else
     {
         ServerMessage Message2 = new ServerMessage(286u);
         Message2.AppendBoolean(@class.Boolean_3);
         Message2.AppendUInt(@class.Id);
         Session.SendMessage(Message2);
         ServerMessage Message3 = new ServerMessage(831u);
         Message3.AppendBoolean(true);
         Session.SendMessage(Message3);
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         bool Enabled = Event.PopBase64Boolean();
         Session.GetHabbo().FriendStreamEnabled = Enabled;
         using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
         {
             @class.AddParamWithValue("user_id", Session.GetHabbo().Id);
             @class.ExecuteQuery("UPDATE users SET friend_stream_enabled = '" + (Enabled ? 1 : 0) + "' WHERE Id = @user_id LIMIT 1;");
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && @class.Boolean_2)
     {
         Trade class2 = @class.method_76(Session.GetHabbo().Id);
         UserItem class3 = Session.GetHabbo().method_23().method_10(Event.PopWiredUInt());
         if (class2 != null && class3 != null)
         {
             class2.method_3(Session.GetHabbo().Id, class3);
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().uint_2 > 0u)
     {
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().uint_2);
         if (@class != null && Session.GetHabbo().int_0 > 0)
         {
             GroupsManager class2 = Groups.smethod_2(Session.GetHabbo().int_0);
             if (class2 != null && [email protected]_17.Contains(class2))
             {
                 @class.list_17.Add(class2);
                 ServerMessage Message = new ServerMessage(309u);
                 Message.AppendInt32(@class.list_17.Count);
                 foreach (GroupsManager current in @class.list_17)
                 {
                     Message.AppendInt32(current.int_0);
                     Message.AppendStringWithBreak(current.string_2);
                 }
                 @class.SendMessage(Message, null);
             }
             else
             {
                 foreach (GroupsManager current2 in @class.list_17)
                 {
                     if (current2 == class2 && current2.string_2 != class2.string_2)
                     {
                         ServerMessage Message = new ServerMessage(309u);
                         Message.AppendInt32(@class.list_17.Count);
                         foreach (GroupsManager current in @class.list_17)
                         {
                             Message.AppendInt32(current.int_0);
                             Message.AppendStringWithBreak(current.string_2);
                         }
                         @class.SendMessage(Message, null);
                     }
                 }
             }
         }
         if (@class != null && @class.list_17.Count > 0)
         {
             ServerMessage Message = new ServerMessage(309u);
             Message.AppendInt32(@class.list_17.Count);
             foreach (GroupsManager current in @class.list_17)
             {
                 Message.AppendInt32(current.int_0);
                 Message.AppendStringWithBreak(current.string_2);
             }
             Session.SendMessage(Message);
         }
     }
 }
 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && @class.method_26(Session))
     {
         uint uint_ = Event.PopWiredUInt();
         RoomUser class2 = @class.GetRoomUserByHabbo(uint_);
         if (class2 != null && !class2.IsBot && ([email protected](class2.GetClient(), true) && !class2.GetClient().GetHabbo().HasFuse("acc_unkickable")))
         {
             @class.method_78(Session.GetHabbo().Id);
             @class.method_47(class2.GetClient(), true, true);
         }
     }
 }
Esempio n. 31
0
        internal void CloseAll()
        {
            StringBuilder stringBuilder = new StringBuilder();
            bool          flag          = false;

            using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
            {
                for (int i = 0; i < this.Session.Length; i++)
                {
                    GameClient class2 = this.Session[i];
                    if (class2 != null && class2.GetHabbo() != null)
                    {
                        try
                        {
                            class2.GetHabbo().method_23().method_19(@class, true);
                            stringBuilder.Append(class2.GetHabbo().String_0);
                            flag = true;
                        }
                        catch
                        {
                        }
                    }
                }
                if (flag)
                {
                    try
                    {
                        @class.ExecuteQuery(stringBuilder.ToString());
                    }
                    catch (Exception ex)
                    {
                        Logging.smethod_8(ex.ToString());
                    }
                }
            }
            Console.WriteLine("Done saving users inventory!");
            Console.WriteLine("Closing server connections...");
            try
            {
                for (int i = 0; i < this.Session.Length; i++)
                {
                    GameClient class2 = this.Session[i];
                    if (class2 != null && class2.GetConnection() != null)
                    {
                        try
                        {
                            class2.GetConnection().Dispose();
                        }
                        catch
                        {
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logging.smethod_8(ex.ToString());
            }
            Array.Clear(this.Session, 0, this.Session.Length);
            Console.WriteLine("Connections closed!");
        }