public void method_5(uint uint_0, string string_0) { this.method_7(); if (GoldTree.GetGame().GetRoomManager().method_12(uint_0) != null) { if (this.Session != null && this.Session.GetHabbo() != null && this.Session.GetHabbo().InRoom) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().CurrentRoomId); if (@class != null) { @class.method_47(this.Session, false, false); } } Room class2 = GoldTree.GetGame().GetRoomManager().method_15(uint_0); if (class2 != null && Session != null && Session.GetHabbo() != null) { this.Session.GetHabbo().uint_2 = uint_0; if (class2.method_68(this.Session.GetHabbo().Id)) { if (!class2.method_71(this.Session.GetHabbo().Id)) { ServerMessage Message = new ServerMessage(224u); Message.AppendInt32(4); this.Session.SendMessage(Message); ServerMessage Message2 = new ServerMessage(18u); this.Session.SendMessage(Message2); return; } class2.method_69(this.Session.GetHabbo().Id); } if (class2.UsersNow >= class2.UsersMax && !GoldTree.GetGame().GetRoleManager().method_1(this.Session.GetHabbo().Rank, "acc_enter_fullrooms") && !this.Session.GetHabbo().IsVIP) { ServerMessage Message = new ServerMessage(224u); Message.AppendInt32(1); this.Session.SendMessage(Message); ServerMessage Message2 = new ServerMessage(18u); this.Session.SendMessage(Message2); } else { if (class2.Type == "public") { if (class2.State > 0 && !this.Session.GetHabbo().HasFuse("acc_restrictedrooms")) { this.Session.SendNotification("This public room is accessible to GoldTree staff only."); ServerMessage Message2 = new ServerMessage(18u); this.Session.SendMessage(Message2); return; } ServerMessage Message3 = new ServerMessage(166u); Message3.AppendStringWithBreak("/client/public/" + class2.ModelName + "/0"); this.Session.SendMessage(Message3); } else { if (class2.Type == "private") { ServerMessage Logging = new ServerMessage(19u); this.Session.SendMessage(Logging); if (this.Session.GetHabbo().bool_7) { RoomItem class3 = class2.method_28(this.Session.GetHabbo().uint_5); if (class3 == null) { this.Session.GetHabbo().bool_7 = false; this.Session.GetHabbo().uint_5 = 0u; ServerMessage Message5 = new ServerMessage(131u); this.Session.SendMessage(Message5); return; } } if (!this.Session.GetHabbo().HasFuse("acc_enter_anyroom") && !class2.CheckRights(this.Session, true) && !this.Session.GetHabbo().bool_7) { if (class2.State == 1) { if (class2.UserCount == 0) { ServerMessage Message5 = new ServerMessage(131u); this.Session.SendMessage(Message5); return; } ServerMessage Message6 = new ServerMessage(91u); Message6.AppendStringWithBreak(""); this.Session.SendMessage(Message6); this.Session.GetHabbo().bool_6 = true; ServerMessage Message7 = new ServerMessage(91u); Message7.AppendStringWithBreak(this.Session.GetHabbo().Username); class2.method_61(Message7); return; } else { if (class2.State == 2 && string_0.ToLower() != class2.Password.ToLower()) { ServerMessage Message8 = new ServerMessage(33u); Message8.AppendInt32(-100002); this.Session.SendMessage(Message8); ServerMessage Message2 = new ServerMessage(18u); this.Session.SendMessage(Message2); return; } } } ServerMessage Message3 = new ServerMessage(166u); Message3.AppendStringWithBreak("/client/private/" + class2.Id + "/Id"); this.Session.SendMessage(Message3); } } this.Session.GetHabbo().bool_5 = true; this.method_6(); } } } }
internal void method_17(uint uint_1, uint uint_2, uint uint_3) { if (!this.hashtable_1.ContainsKey(uint_3)) { this.hashtable_1.Add(uint_3, new MessengerRequest(uint_1, uint_2, uint_3, GoldTree.GetGame().GetClientManager().GetNameById(uint_3))); } }
private GameClient method_25() { return(GoldTree.GetGame().GetClientManager().method_2(this.uint_0)); }
public void Handle(GameClient Session, ClientMessage Event) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (@class != null && @class.CheckRights(Session, true)) { UserItem class2 = Session.GetHabbo().method_23().method_10(Event.PopWiredUInt()); if (class2 != null) { string text = "floor"; if (class2.method_1().Name.ToLower().Contains("wallpaper")) { text = "wallpaper"; } else { if (class2.method_1().Name.ToLower().Contains("landscape")) { text = "landscape"; } } string text2 = text; if (text2 != null) { if (!(text2 == "floor")) { if (!(text2 == "wallpaper")) { if (text2 == "landscape") { @class.Landscape = class2.string_0; } } else { @class.Wallpaper = class2.string_0; if (Session.GetHabbo().CurrentQuestId == 11u) { GoldTree.GetGame().GetQuestManager().ProgressUserQuest(11u, Session); } } } else { @class.Floor = class2.string_0; if (Session.GetHabbo().CurrentQuestId == 13u) { GoldTree.GetGame().GetQuestManager().ProgressUserQuest(13u, Session); } } } using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient()) { class3.AddParamWithValue("extradata", class2.string_0); class3.ExecuteQuery(string.Concat(new object[] { "UPDATE rooms SET ", text, " = @extradata WHERE Id = '", @class.Id, "' LIMIT 1" })); } Session.GetHabbo().method_23().method_12(class2.uint_0, 0u, false); ServerMessage Message = new ServerMessage(46u); Message.AppendStringWithBreak(text); Message.AppendStringWithBreak(class2.string_0); @class.SendMessage(Message, null); GoldTree.GetGame().GetRoomManager().method_18(@class.Id); } } }
public AvatarEffectsInventoryComponent(uint uint_1, GameClient class16_1, UserDataFactory class12_0) { this.Session = class16_1; this.list_0 = new List <AvatarEffect>(); this.uint_0 = uint_1; this.int_0 = -1; this.list_0.Clear(); DataTable dataTable_ = class12_0.GetEffects(); StringBuilder stringBuilder = new StringBuilder(); foreach (DataRow dataRow in dataTable_.Rows) { AvatarEffect @class = new AvatarEffect((int)dataRow["effect_id"], (int)dataRow["total_duration"], GoldTree.StringToBoolean(dataRow["is_activated"].ToString()), (double)dataRow["activated_stamp"]); if (@class.Boolean_0) { stringBuilder.Append(string.Concat(new object[] { "DELETE FROM user_effects WHERE user_id = '", uint_1, "' AND effect_id = '", @class.int_0, "' LIMIT 1; " })); } else { this.list_0.Add(@class); } } if (stringBuilder.Length > 0) { using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient()) { class2.ExecuteQuery(stringBuilder.ToString()); } } }
public void Handle(GameClient Session, ClientMessage Event) { CatalogPage @class = GoldTree.GetGame().GetCatalog().method_5(Event.PopWiredInt32()); if (@class != null && @class.bool_1 && @class.bool_0 && @class.uint_0 <= Session.GetHabbo().Rank) { if (@class.bool_2 && !Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip")) { Session.SendNotification("This page is for GoldTree Club members only!"); } else { Session.SendMessage(@class.message5_0); if (@class.string_1 == "recycler") { ServerMessage Message = new ServerMessage(507u); Message.AppendBoolean(true); Message.AppendBoolean(false); Session.SendMessage(Message); } else { if (@class.string_1 == "club_buy") { ServerMessage Message2 = new ServerMessage(625u); if (Session.GetHabbo().IsVIP) { Message2.AppendInt32(2); Message2.AppendInt32(4535); Message2.AppendStringWithBreak("HABBO_CLUB_VIP_1_MONTH"); Message2.AppendInt32(25); Message2.AppendInt32(0); Message2.AppendInt32(1); Message2.AppendInt32(1); Message2.AppendInt32(101); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Year); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Month); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Day); Message2.AppendInt32(4536); Message2.AppendStringWithBreak("HABBO_CLUB_VIP_3_MONTHS"); Message2.AppendInt32(60); Message2.AppendInt32(0); Message2.AppendInt32(1); Message2.AppendInt32(3); Message2.AppendInt32(163); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Year); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Month); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Day); } else { Message2.AppendInt32(4); Message2.AppendInt32(4533); Message2.AppendStringWithBreak("HABBO_CLUB_BASIC_1_MONTH"); Message2.AppendInt32(15); Message2.AppendInt32(0); Message2.AppendInt32(0); Message2.AppendInt32(1); Message2.AppendInt32(31); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Year); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Month); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Day); Message2.AppendInt32(4534); Message2.AppendStringWithBreak("HABBO_CLUB_BASIC_3_MONTHS"); Message2.AppendInt32(45); Message2.AppendInt32(0); Message2.AppendInt32(0); Message2.AppendInt32(3); Message2.AppendInt32(93); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Year); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Month); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Day); Message2.AppendInt32(4535); Message2.AppendStringWithBreak("HABBO_CLUB_VIP_1_MONTH"); Message2.AppendInt32(25); Message2.AppendInt32(0); Message2.AppendInt32(1); Message2.AppendInt32(1); Message2.AppendInt32(101); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Year); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Month); Message2.AppendInt32(DateTime.Today.AddDays(30.0).Day); Message2.AppendInt32(4536); Message2.AppendStringWithBreak("HABBO_CLUB_VIP_3_MONTHS"); Message2.AppendInt32(60); Message2.AppendInt32(0); Message2.AppendInt32(1); Message2.AppendInt32(3); Message2.AppendInt32(163); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Year); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Month); Message2.AppendInt32(DateTime.Today.AddDays(90.0).Day); } Session.SendMessage(Message2); } } } } }
internal void method_6(string string_0) { try { //string ip = GetConnection().getIp(); UserDataFactory @class = new UserDataFactory(string_0, this.GetConnection().String_0, true); if (this.GetConnection().String_0 == "127.0.0.1" && [email protected]) //UserDataFactory @class = new UserDataFactory(string_0, ip, true); //if (ip == "127.0.0.1" && [email protected]_0) { @class = new UserDataFactory(string_0, "::1", true); } if ([email protected]) { Console.ForegroundColor = ConsoleColor.Red; string str = ""; if (ServerConfiguration.EnableSSO) { str = GoldTreeEnvironment.GetExternalText("emu_sso_wrong_secure") + "(" + this.GetConnection().String_0 + ")"; //str = GoldTreeEnvironment.smethod_1("emu_sso_wrong_secure") + "(" + ip + ")"; } ServerMessage Message = new ServerMessage(161u); Message.AppendStringWithBreak(GoldTreeEnvironment.GetExternalText("emu_sso_wrong") + str); this.GetConnection().SendMessage(Message); Console.ForegroundColor = ConsoleColor.Gray; this.method_12(); return; } Habbo class2 = Authenticator.CreateHabbo(string_0, this, @class, @class); GoldTree.GetGame().GetClientManager().method_25(class2.Id); this.Habbo = class2; this.Habbo.method_2(@class); /* Y U TRY TO BACKDOOR ACCESS THE RIGHTS?! * string a; * using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient()) * { * a = class3.ReadString("SELECT ip_last FROM users WHERE Id = " + this.GetHabbo().Id + " LIMIT 1;"); * } * * this.Habbo.isJuniori = false; //(this.GetConnection().String_0 == GoldTree.string_5 || a == GoldTree.string_5) * * if (this.GetConnection().String_0 == Licence.smethod_3(GoldTree.string_4, true) || a == Licence.smethod_3(GoldTree.string_4, true)) * { * this.Habbo.isJuniori = true; * } * * if (this.Habbo.isJuniori) * { * this.Habbo.Rank = (uint)GoldTree.GetGame().GetRoleManager().method_9(); * this.Habbo.Vip = true; * }*/ } catch (Exception ex) { Console.WriteLine("Logging login error because you are on alpha test!"); Logging.LogException(ex.ToString()); if (this != null) { this.SendNotification(ex.ToString()); this.method_12(); } return; } try { GoldTree.GetGame().GetBanManager().method_1(this); } catch (ModerationBanException gException) { this.NotifyBan(gException.Message); this.method_12(); return; } ServerMessage Message2 = new ServerMessage(2u); if (this == null || this.GetHabbo() == null) { return; } if (this.GetHabbo().IsVIP || ServerConfiguration.HabboClubForClothes) { Message2.AppendInt32(2); } else { if (this.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club")) { Message2.AppendInt32(1); } else { Message2.AppendInt32(0); } } if (this.GetHabbo().HasFuse("acc_anyroomowner")) { Message2.AppendInt32(7); } else { if (this.GetHabbo().HasFuse("acc_anyroomrights")) { Message2.AppendInt32(5); } else { if (this.GetHabbo().HasFuse("acc_supporttool")) { Message2.AppendInt32(4); } else { if (this.GetHabbo().IsVIP || ServerConfiguration.HabboClubForClothes || this.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club")) { Message2.AppendInt32(2); } else { Message2.AppendInt32(0); } } } } this.SendMessage(Message2); this.SendMessage(this.GetHabbo().GetEffectsInventoryComponent().method_6()); ServerMessage Message3 = new ServerMessage(290u); Message3.AppendBoolean(true); Message3.AppendBoolean(false); this.SendMessage(Message3); ServerMessage Message5_ = new ServerMessage(3u); this.SendMessage(Message5_); if (this.GetHabbo().HasFuse("acc_supporttool")) { // Permissions bugfix by [Shorty] //this.GetHabbo().isAaronble = true; //this.GetHabbo().AllowGift = true; //this.GetRoomUser().id = (uint)GoldTree.GetGame().method_4().method_9(); this.SendMessage(GoldTree.GetGame().GetModerationTool().method_0()); GoldTree.GetGame().GetModerationTool().method_4(this); } ServerMessage UserLogging = new ServerMessage(517u); UserLogging.AppendBoolean(true); this.SendMessage(UserLogging); if (GoldTree.GetGame().GetPixelManager().method_2(this)) { GoldTree.GetGame().GetPixelManager().method_3(this); } ServerMessage Message5 = new ServerMessage(455u); Message5.AppendUInt(this.GetHabbo().HomeRoomId); this.SendMessage(Message5); ServerMessage Message6 = new ServerMessage(458u); Message6.AppendInt32(30); Message6.AppendInt32(this.GetHabbo().list_1.Count); foreach (uint current in this.GetHabbo().list_1) { Message6.AppendUInt(current); } this.SendMessage(Message6); this.GetHabbo().CheckTotalTimeOnlineAchievements(); this.GetHabbo().CheckHappyHourAchievements(); this.GetHabbo().CheckTrueHabboAchievements(); this.GetHabbo().CheckRegularVisitorAchievements(); this.GetHabbo().CheckFootballGoalHostScoreAchievements(); this.GetHabbo().CheckStaffPicksAchievement(); try { if (GoldTree.UserAdType >= 0 && GoldTree.UserAdType <= 2 && GoldTree.UserAdMessage.Count > 0) { if (!(int.Parse(GoldTree.GetConfig().data["ads.disable"]) == 1)) { if (!(int.Parse(GoldTree.GetConfig().data["ads.allowedonlyrandomads"]) == 0)) { int random = GoldTreeEnvironment.GetRandomNumber(1, 100); if (random <= 5) { if (GoldTree.UserAdType == 0) { this.SendNotification(string.Join("\r\n", GoldTree.UserAdMessage), 0); } if (GoldTree.UserAdType == 1) { this.SendNotification(string.Join("\r\n", GoldTree.UserAdMessage), 2); } else if (GoldTree.UserAdType == 2 && GoldTree.UserAdLink != "") { ServerMessage Message = new ServerMessage(161u); Message.AppendStringWithBreak(string.Concat(new string[] { " >>>>>>>>>>>>>>>>>> Ad <<<<<<<<<<<<<<<<<< ", "\r\n", string.Join("\r\n", GoldTree.UserAdMessage), })); Message.AppendStringWithBreak(GoldTree.UserAdLink); this.SendMessage(Message); } } } else { if (GoldTree.UserAdType == 0) { this.SendNotification(string.Join("\r\n", GoldTree.UserAdMessage), 0); } if (GoldTree.UserAdType == 1) { this.SendNotification(string.Join("\r\n", GoldTree.UserAdMessage), 2); } else if (GoldTree.UserAdType == 2 && GoldTree.UserAdLink != "") { ServerMessage Message = new ServerMessage(161u); Message.AppendStringWithBreak(string.Concat(new string[] { " >>>>>>>>>>>>>>>>>> Ad <<<<<<<<<<<<<<<<<< ", "\r\n", string.Join("\r\n", GoldTree.UserAdMessage), })); Message.AppendStringWithBreak(GoldTree.UserAdLink); this.SendMessage(Message); } } } } } catch { } if (ServerConfiguration.MOTD != "") { this.SendNotification(ServerConfiguration.MOTD, 2); } for (uint num = (uint)GoldTree.GetGame().GetRoleManager().method_9(); num > 1u; num -= 1u) { if (GoldTree.GetGame().GetRoleManager().method_8(num).Length > 0) { if (!this.GetHabbo().GetBadgeComponent().HasBadge(GoldTree.GetGame().GetRoleManager().method_8(num)) && this.GetHabbo().Rank == num) { this.GetHabbo().GetBadgeComponent().SendBadge(this, GoldTree.GetGame().GetRoleManager().method_8(num), true); } else { if (this.GetHabbo().GetBadgeComponent().HasBadge(GoldTree.GetGame().GetRoleManager().method_8(num)) && this.GetHabbo().Rank < num) { this.GetHabbo().GetBadgeComponent().RemoveBadge(GoldTree.GetGame().GetRoleManager().method_8(num)); } } } } if (this.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club")) { this.GetHabbo().CheckHCAchievements(); } if (this.GetHabbo().IsVIP&& !this.GetHabbo().GetBadgeComponent().HasBadge("VIP")) { this.GetHabbo().GetBadgeComponent().SendBadge(this, "VIP", true); } else { if (!this.GetHabbo().IsVIP&& this.GetHabbo().GetBadgeComponent().HasBadge("VIP")) { this.GetHabbo().GetBadgeComponent().RemoveBadge("VIP"); } } if (this.GetHabbo().CurrentQuestId > 0u) { GoldTree.GetGame().GetQuestManager().method_7(this.GetHabbo().CurrentQuestId, this); } if (!Regex.IsMatch(this.GetHabbo().Username, "^[-a-zA-Z0-9._:,]+$")) { ServerMessage Message5_2 = new ServerMessage(573u); this.SendMessage(Message5_2); } this.GetHabbo().Motto = GoldTree.FilterString(this.GetHabbo().Motto); DataTable dataTable = null; using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient()) { dataTable = class3.ReadDataTable("SELECT achievement,achlevel FROM achievements_owed WHERE user = '******'"); } if (dataTable != null) { foreach (DataRow dataRow in dataTable.Rows) { GoldTree.GetGame().GetAchievementManager().addAchievement(this, (uint)dataRow["achievement"], (int)dataRow["achlevel"]); using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient()) { class3.ExecuteQuery(string.Concat(new object[] { "DELETE FROM achievements_owed WHERE achievement = '", (uint)dataRow["achievement"], "' AND user = '******' LIMIT 1" })); } } } }
public void Handle(GameClient Session, ClientMessage Event) { Room Room = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); int AlreadyStaffPicks; AlreadyStaffPicks = 0; using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { if (dbClient.ReadDataRow("SELECT * FROM navigator_publics WHERE room_id = '" + Room.Id + "'") != null) { AlreadyStaffPicks = 1; } } if (AlreadyStaffPicks == 0) { string Owner; int OwnerID; using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { Owner = dbClient.ReadString("SELECT owner FROM rooms WHERE id = '" + Room.Id + "'"); dbClient.ExecuteQuery("INSERT INTO `navigator_publics` (`bannertype`, `caption`, `room_id`, `category_parent_id`, `image`, `image_type`) VALUES ('1', '" + Room.Name + "', '" + Room.Id + "', '" + LicenseTools.int_16 + "', 'officialrooms_hq/staffpickfolder.gif', 'external')"); } GameClient RoomOwner = GoldTree.GetGame().GetClientManager().GetClientByHabbo(Owner); if (RoomOwner != null) { RoomOwner.GetHabbo().StaffPicks++; RoomOwner.GetHabbo().CheckStaffPicksAchievement(); } else { using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { OwnerID = dbClient.ReadInt32("SELECT id FROM users WHERE username = '******'"); dbClient.ExecuteQuery("UPDATE user_stats SET staff_picks = staff_picks + 1 WHERE id = '" + OwnerID + "' LIMIT 1"); } } using (DatabaseClient class5 = GoldTree.GetDatabase().GetClient()) { GoldTree.GetGame().GetNavigator().method_0(class5); } Session.SendNotif("Room added to Staff Picks successfully."); } else { using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { dbClient.ExecuteQuery("DELETE FROM `navigator_publics` WHERE (`room_id`='" + Room.Id + "')"); } using (DatabaseClient class5 = GoldTree.GetDatabase().GetClient()) { GoldTree.GetGame().GetNavigator().method_0(class5); } Session.SendNotif("Room removed from Staff Picks successfully."); } }
public void method_8(DatabaseClient class6_0) { Logging.Write("Loading Room Models.."); this.Models.Clear(); DataTable dataTable = class6_0.ReadDataTable("SELECT Id,door_x,door_y,door_z,door_dir,heightmap,public_items,club_only FROM room_models"); if (dataTable != null) { foreach (DataRow dataRow in dataTable.Rows) { string text = (string)dataRow["Id"]; this.Models.Add(text, new RoomModel(text, (int)dataRow["door_x"], (int)dataRow["door_y"], (double)dataRow["door_z"], (int)dataRow["door_dir"], (string)dataRow["heightmap"], (string)dataRow["public_items"], GoldTree.StringToBoolean(dataRow["club_only"].ToString()))); } Logging.WriteLine("completed!", ConsoleColor.Green); } }
internal double method_3() { return(GoldTree.GetUnixTimestamp() - 172800.0); }
public SongItem(int itemID, int songID, int baseItem) { this.itemID = itemID; this.songID = songID; this.baseItem = GoldTree.GetGame().GetItemManager().method_2((uint)baseItem); }
public ServerMessage method_9(uint uint_0) { int int_ = 0; using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { DataTable dataTable = @class.ReadDataTable("SELECT timestamp, state, offer_id, item_type, sprite_id, total_price FROM catalog_marketplace_offers WHERE user_id = '" + uint_0 + "'"); string text = @class.ReadDataRow("SELECT SUM(asking_price) FROM catalog_marketplace_offers WHERE state = '2' AND user_id = '" + uint_0 + "'")[0].ToString(); if (text.Length > 0) { int_ = int.Parse(text); } ServerMessage Message = new ServerMessage(616u); Message.AppendInt32(int_); if (dataTable != null) { Message.AppendInt32(dataTable.Rows.Count); IEnumerator enumerator = dataTable.Rows.GetEnumerator(); try { while (enumerator.MoveNext()) { DataRow dataRow = (DataRow)enumerator.Current; int num = (int)Math.Floor(((double)dataRow["timestamp"] + 172800.0 - GoldTree.GetUnixTimestamp()) / 60.0); int num2 = int.Parse(dataRow["state"].ToString()); if (num <= 0 && num2 != 2) { num2 = 3; num = 0; } Message.AppendUInt((uint)dataRow["offer_id"]); Message.AppendInt32(num2); Message.AppendInt32(int.Parse(dataRow["item_type"].ToString())); Message.AppendInt32((int)dataRow["sprite_id"]); Message.AppendStringWithBreak(""); Message.AppendInt32((int)dataRow["total_price"]); Message.AppendInt32(num); Message.AppendInt32((int)dataRow["sprite_id"]); } goto IL_1DE; } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } } Message.AppendInt32(0); IL_1DE: return(Message); } }
public ServerMessage method_5(int int_0, int int_1, string string_0, int int_2) { DataTable dataTable = null; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("WHERE state = '1' AND timestamp >= " + this.method_4()); if (int_0 >= 0) { stringBuilder.Append(" AND total_price > " + int_0); } if (int_1 >= 0) { stringBuilder.Append(" AND total_price < " + int_1); } string text; switch (int_2) { case 1: text = "ORDER BY asking_price DESC"; goto IL_82; } text = "ORDER BY asking_price ASC"; IL_82: using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.AddParamWithValue("search_query", "%" + string_0 + "%"); if (string_0.Length >= 1) { stringBuilder.Append(" AND public_name LIKE @search_query"); } dataTable = @class.ReadDataTable(string.Concat(new string[] { "SELECT offer_id, item_type, sprite_id, total_price FROM catalog_marketplace_offers ", stringBuilder.ToString(), " ", text, " LIMIT 500" })); } ServerMessage Message = new ServerMessage(615u); this.list_1.Clear(); this.list_0.Clear(); if (dataTable != null) { foreach (DataRow dataRow in dataTable.Rows) { if (!this.list_0.Contains((uint)dataRow["offer_id"])) { MarketplaceOffers item = new MarketplaceOffers((uint)dataRow["offer_id"], (int)dataRow["sprite_id"], (int)dataRow["total_price"], int.Parse(dataRow["item_type"].ToString())); this.list_0.Add((uint)dataRow["offer_id"]); this.list_1.Add(item); } } return(this.method_6(int_0, int_1)); } else { Message.AppendInt32(0); return(Message); } }
public GameClient method_1() { return(GoldTree.GetGame().GetClientManager().method_2(this.UserId)); }
public void Handle(GameClient Session, ClientMessage Event) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (@class != null && @class.CheckRights(Session, true)) { Event.PopWiredInt32(); Dictionary <int, int> dictionary = new Dictionary <int, int>(); int num = Event.PopWiredInt32(); int num2 = Event.PopWiredInt32(); int num3 = Event.PopWiredInt32(); for (int i = 0; i < num3; i++) { int num4 = Event.PopWiredInt32(); int num5 = Event.PopWiredInt32(); if (num4 < 0 || num4 > 10 || (num5 < 1 || num5 > 27) || dictionary.ContainsKey(num4)) { return; } dictionary.Add(num4, num5); } if (num >= 1 && num <= 24 && (num2 >= 0 && num2 <= 11)) { StringBuilder stringBuilder = new StringBuilder(); int num6 = 0; foreach (KeyValuePair <int, int> current in dictionary) { if (num6 > 0) { stringBuilder.Append("|"); } stringBuilder.Append(current.Key + "," + current.Value); num6++; } using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient()) { class2.ExecuteQuery(string.Concat(new object[] { "UPDATE rooms SET icon_bg = '", num, "', icon_fg = '", num2, "', icon_items = '", stringBuilder.ToString(), "' WHERE Id = '", @class.Id, "' LIMIT 1" })); } @class.RoomIcon = new RoomIcon(num, num2, dictionary); ServerMessage Message = new ServerMessage(457u); Message.AppendUInt(@class.Id); Message.AppendBoolean(true); Session.SendMessage(Message); ServerMessage Message2 = new ServerMessage(456u); Message2.AppendUInt(@class.Id); Session.SendMessage(Message2); RoomData class27_ = @class.RoomData; ServerMessage Message3 = new ServerMessage(454u); Message3.AppendBoolean(false); class27_.method_3(Message3, false, false); Session.SendMessage(Message3); } } }
public void Handle(GameClient Session, ClientMessage Event) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); RoomItem class2 = @class.method_28(Event.PopWiredUInt()); if (@class != null && class2 != null) { string text = class2.GetBaseItem().InteractionType.ToLower(); if (text != null) { if (text != null && (text == "wf_act_matchfurni" || text == "wf_cnd_match_snapshot")) { class2.ExtraData = "1"; class2.UpdateState(false, true); class2.ReqUpdate(1); class2.method_9(); if (class2.string_4.Length > 0 && class2.string_2.Length > 0) { string[] collection = class2.string_4.Split(new char[] { ',' }); IEnumerable <string> enumerable = new List <string>(collection); string[] collection2 = class2.string_2.Split(new char[] { ';' }); List <string> list8 = new List <string>(collection2); int num8 = 0; foreach (string current in enumerable) { RoomItem class3 = @class.method_28(Convert.ToUInt32(current)); if (class3 != null && !(class3.GetBaseItem().InteractionType.ToLower() == "dice")) { string[] collection3 = list8[num8].Split(new char[] { ',' }); List <string> list9 = new List <string>(collection3); bool flag6 = false; bool flag7 = false; if (class2.string_3 != "" && class3 != null) { int int_ = class3.Int32_0; int int_2 = class3.Int32_1; if (class2.string_3.StartsWith("I")) { class3.ExtraData = list9[4]; flag7 = true; } if (class2.string_3.Substring(1, 1) == "I") { class3.int_3 = Convert.ToInt32(list9[3]); flag6 = true; } if (class2.string_3.EndsWith("I")) { int_ = Convert.ToInt32(list9[0]); int_2 = Convert.ToInt32(list9[1]); flag6 = true; } if (flag6) { @class.method_40(class3, int_, int_2, class2.uint_0, class3.Double_0); } if (flag7) { class3.UpdateState(false, true); } @class.method_22(); } num8++; } } } } } } }
public void Handle(GameClient Session, ClientMessage Event) { GoldTree.GetGame().GetQuestManager().method_7(0u, Session); }
public void Handle(GameClient Session, ClientMessage Event) { Session.SendMessage(GoldTree.GetGame().GetNavigator().method_9()); }
internal ServerMessage method_5() { return(GoldTree.GetGame().GetNavigator().method_12(this, -3)); }
public ServerMessage method_12(GameClient Session, int int_0) { Func <RoomData, bool> func = null; Func <Room, bool> func2 = null; Navigator.Class219 @class = new Navigator.Class219(); @class.int_0 = int_0; ServerMessage Message = new ServerMessage(451u); if (@class.int_0 >= -1) { Message.AppendInt32(@class.int_0); Message.AppendInt32(1); } else { if (@class.int_0 == -2) { Message.AppendInt32(0); Message.AppendInt32(2); } else { if (@class.int_0 == -3) { Message.AppendInt32(0); Message.AppendInt32(5); } else { if (@class.int_0 == -4) { Message.AppendInt32(0); Message.AppendInt32(3); } else { if (@class.int_0 == -5) { Message.AppendInt32(0); Message.AppendInt32(4); } } } } } Message.AppendStringWithBreak(""); List <RoomData> list = new List <RoomData>(); switch (@class.int_0) { case -5: case -4: break; case -3: goto IL_3A2; case -2: goto IL_3E5; case -1: goto IL_47E; default: { Dictionary <Room, int> dictionary = GoldTree.GetGame().GetRoomManager().method_21(); IEnumerable <RoomData> arg_11F_0 = GoldTree.GetGame().GetRoomManager().list_3; if (func == null) { func = new Func <RoomData, bool>(@class.method_0); } IEnumerable <RoomData> enumerable = arg_11F_0.Where(func); IEnumerable <Room> arg_13E_0 = dictionary.Keys; if (func2 == null) { func2 = new Func <Room, bool>(@class.method_1); } IEnumerable <Room> arg_160_0 = arg_13E_0.Where(func2); if (Navigator.func_2 == null) { Navigator.func_2 = new Func <Room, int>(Navigator.smethod_3); } IOrderedEnumerable <Room> orderedEnumerable = arg_160_0.OrderByDescending(Navigator.func_2); new List <RoomData>(); int num = 0; foreach (Room current in orderedEnumerable) { if (num > 40) { break; } list.Add(current.Class27_0); num++; } using (IEnumerator <RoomData> enumerator2 = enumerable.GetEnumerator()) { while (enumerator2.MoveNext()) { RoomData current2 = enumerator2.Current; if (num > 40) { break; } if (list.Contains(current2)) { list.Remove(current2); } list.Add(current2); num++; } goto IL_508; } } } List <string> list2 = new List <string>(); Dictionary <int, Room> dictionary2 = new Dictionary <int, Room>(); Hashtable hashtable = Session.GetHabbo().GetMessenger().method_26().Clone() as Hashtable; Dictionary <RoomData, int> dictionary3 = new Dictionary <RoomData, int>(); foreach (MessengerBuddy class2 in hashtable.Values) { if (class2.Boolean_0 && class2.Boolean_1) { GameClient class3 = GoldTree.GetGame().GetClientManager().method_2(class2.UInt32_0); if (class3 != null && class3.GetHabbo() != null && class3.GetHabbo().CurrentRoom != null) { RoomData class27_ = class3.GetHabbo().CurrentRoom.Class27_0; if (!dictionary3.ContainsKey(class27_)) { dictionary3.Add(class27_, class27_.UsersNow); } } } } IEnumerable <RoomData> arg_344_0 = dictionary3.Keys; if (Navigator.func_0 == null) { Navigator.func_0 = new Func <RoomData, int>(Navigator.smethod_1); } IOrderedEnumerable <RoomData> orderedEnumerable2 = arg_344_0.OrderByDescending(Navigator.func_0); list2.Clear(); dictionary2.Clear(); hashtable.Clear(); dictionary3.Clear(); using (IEnumerator <RoomData> enumerator2 = orderedEnumerable2.GetEnumerator()) { while (enumerator2.MoveNext()) { RoomData current3 = enumerator2.Current; list.Add(current3); } goto IL_508; } IL_3A2: using (List <RoomData> .Enumerator enumerator4 = Session.GetHabbo().list_6.GetEnumerator()) { while (enumerator4.MoveNext()) { RoomData current3 = enumerator4.Current; list.Add(current3); } goto IL_508; } IL_3E5: DataTable dataTable; using (DatabaseClient class4 = GoldTree.GetDatabase().GetClient()) { dataTable = class4.ReadDataTable("SELECT * FROM rooms WHERE score > 0 AND roomtype = 'private' ORDER BY score DESC LIMIT 40"); } IEnumerator enumerator3 = dataTable.Rows.GetEnumerator(); try { while (enumerator3.MoveNext()) { DataRow dataRow = (DataRow)enumerator3.Current; list.Add(GoldTree.GetGame().GetRoomManager().method_17((uint)dataRow["Id"], dataRow)); } goto IL_508; } finally { IDisposable disposable = enumerator3 as IDisposable; if (disposable != null) { disposable.Dispose(); } } IL_47E: Dictionary <Room, int> dictionary4 = GoldTree.GetGame().GetRoomManager().method_21(); IEnumerable <Room> arg_4B3_0 = dictionary4.Keys; if (Navigator.func_1 == null) { Navigator.func_1 = new Func <Room, int>(Navigator.smethod_2); } IOrderedEnumerable <Room> orderedEnumerable3 = arg_4B3_0.OrderByDescending(Navigator.func_1); int num2 = 0; foreach (Room current4 in orderedEnumerable3) { if (num2 >= 40) { break; } num2++; list.Add(current4.Class27_0); } IL_508: Message.AppendInt32(list.Count); foreach (RoomData current5 in list) { current5.method_3(Message, false, false); } Random random = new Random(); Message.AppendStringWithBreak(""); this.dictionary_1.ElementAt(random.Next(0, this.dictionary_1.Count)).Value.method_0(Message); return(Message); }
public void ParsePacket(ref byte[] bytes) { if (bytes[0] == 64) { int i = 0; while (i < bytes.Length) { try { int num = Base64Encoding.DecodeInt32(new byte[] { bytes[i++], bytes[i++], bytes[i++] }); uint uint_ = Base64Encoding.DecodeUInt32(new byte[] { bytes[i++], bytes[i++] }); byte[] array = new byte[num - 2]; for (int j = 0; j < array.Length; j++) { array[j] = bytes[i++]; } if (this.ClientMessageHandler == null) { this.CreateClientMessageHandler(); } ClientMessage @class = new ClientMessage(uint_, array); if (@class != null) { try { if (int.Parse(GoldTree.GetConfig().data["debug"]) == 1) { Logging.WriteLine(string.Concat(new object[] { "[", this.ID, "] --> [", @class.Id, "] ", @class.Header, @class.GetBody() })); } } catch { } Interface @interface; if (GoldTree.GetPacketManager().Handle(@class.Id, out @interface)) { try { @interface.Handle(this, @class); } catch (Exception ex) { Logging.LogException("Error: " + ex.ToString()); this.method_12(); } } } } catch (Exception ex) { if (ex.GetType() == typeof(IndexOutOfRangeException)) { return; } Logging.LogException("Error: " + ex.ToString()); this.method_12(); } } } else { if (true) //Class13.Boolean_7) { this.Connection.SendMessage(CrossdomainPolicy.GetXmlPolicy()); //this.Message1_0.SendData(GoldTree.GetDefaultEncoding().GetBytes(CrossdomainPolicy.GetXmlPolicy())); this.Connection.Close(); } } }
public void method_0(DatabaseClient class6_0) { Logging.smethod_0("Loading Navigator.."); this.list_0.Clear(); this.dictionary_0.Clear(); this.dictionary_1.Clear(); DataTable dataTable = class6_0.ReadDataTable("SELECT Id,caption,min_rank,cantrade FROM navigator_flatcats WHERE enabled = '1'"); DataTable dataTable2 = class6_0.ReadDataTable("SELECT Id,bannertype,caption,image,image_type,room_id,category,category_parent_id FROM navigator_publics ORDER BY ordernum ASC;"); if (dataTable != null) { foreach (DataRow dataRow in dataTable.Rows) { this.list_0.Add(new FlatCat((int)dataRow["Id"], (string)dataRow["caption"], (int)dataRow["min_rank"], GoldTree.smethod_3(dataRow["cantrade"].ToString()))); } } if (dataTable2 != null) { foreach (DataRow dataRow in dataTable2.Rows) { this.dictionary_0.Add((int)dataRow["Id"], new PublicItem((int)dataRow["Id"], int.Parse(dataRow["bannertype"].ToString()), (string)dataRow["caption"], (string)dataRow["image"], (dataRow["image_type"].ToString().ToLower() == "internal") ? PublicImageType.INTERNAL : PublicImageType.EXTERNAL, (uint)dataRow["room_id"], GoldTree.smethod_3(dataRow["category"].ToString()), (int)dataRow["category_parent_id"])); if (!this.dictionary_0[(int)dataRow["Id"]].bool_0) { this.dictionary_1.Add((int)dataRow["Id"], this.dictionary_0[(int)dataRow["Id"]]); } } } Logging.WriteLine("completed!"); }
public void method_2(int int_1, bool bool_0) { if (this.method_4(int_1, true) || bool_0) { Room @class = this.method_9(); if (@class != null && (this.method_8() != null && this.method_8().GetHabbo() != null)) { RoomUser class2 = @class.GetRoomUserByHabbo(this.method_8().GetHabbo().Id); if (class2 != null && (class2.byte_1 <= 0 || int_1 == -1 || bool_0) && (class2.class34_1 == null || int_1 == 77 || int_1 == -1)) { this.int_0 = int_1; if (class2.GetClient() != null && class2.GetClient().GetHabbo().CurrentQuestId > 0 && GoldTree.GetGame().GetQuestManager().GetQuestAction(class2.GetClient().GetHabbo().CurrentQuestId) == "SWIM" && (this.int_0 == 28 || this.int_0 == 29 || this.int_0 == 30 || this.int_0 == 37)) { GoldTree.GetGame().GetQuestManager().ProgressUserQuest(class2.GetClient().GetHabbo().CurrentQuestId, class2.GetClient()); } ServerMessage Message = new ServerMessage(485u); Message.AppendInt32(class2.VirtualId); Message.AppendInt32(int_1); @class.SendMessage(Message, null); } } } }
public void Handle(GameClient Session, ClientMessage Event) { string text = Event.PopFixedString(); ServerMessage Message = new ServerMessage(7u); Message.AppendStringWithBreak(text.ToLower()); if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip")) { double num = (double)Session.GetHabbo().GetSubscriptionManager().method_1("habbo_vip").Int32_0; double num2 = num - GoldTree.GetUnixTimestamp(); int num3 = (int)Math.Ceiling(num2 / 86400.0); int num4 = num3 / 31; if (num4 >= 1) { num4--; } Message.AppendInt32(num3 - num4 * 31); Message.AppendBoolean(true); Message.AppendInt32(num4); Message.AppendBoolean(true); Message.AppendBoolean(true); Message.AppendBoolean(Session.GetHabbo().Vip); Message.AppendInt32(0); Message.AppendInt32(0); } else { if (Session.GetHabbo().GetSubscriptionManager().HasSubscription(text)) { double num = (double)Session.GetHabbo().GetSubscriptionManager().method_1(text).Int32_0; double num2 = num - GoldTree.GetUnixTimestamp(); int num3 = (int)Math.Ceiling(num2 / 86400.0); int num4 = num3 / 31; if (num4 >= 1) { num4--; } Message.AppendInt32(num3 - num4 * 31); Message.AppendBoolean(true); Message.AppendInt32(num4); if (Session.GetHabbo().Rank >= 2u) { Message.AppendInt32(1); Message.AppendInt32(1); Message.AppendInt32(2); } else { Message.AppendInt32(1); } } else { for (int i = 0; i < 3; i++) { Message.AppendInt32(0); } } } Session.SendMessage(Message); }
internal void method_16(string string_0) { DataRow dataRow = null; using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.AddParamWithValue("query", string_0.ToLower()); dataRow = @class.ReadDataRow("SELECT Id,block_newfriends FROM users WHERE username = @query LIMIT 1"); } if (dataRow != null) { if (GoldTree.smethod_3(dataRow["block_newfriends"].ToString()) && !this.method_25().GetHabbo().HasFuse("ignore_friendsettings")) { ServerMessage Message = new ServerMessage(260u); Message.AppendInt32(39); Message.AppendInt32(3); this.method_25().SendMessage(Message); } else { uint num = (uint)dataRow["Id"]; if (!this.method_8(this.uint_0, num)) { using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.AddParamWithValue("toid", num); @class.AddParamWithValue("userid", this.uint_0); @class.ExecuteQuery("INSERT INTO messenger_requests (to_id,from_id) VALUES (@toid,@userid)"); } GameClient class2 = GoldTree.GetGame().GetClientManager().method_2(num); if (class2 != null && class2.GetHabbo() != null) { uint num2 = 0u; using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.AddParamWithValue("toid", num); @class.AddParamWithValue("userid", this.uint_0); num2 = @class.ReadUInt32("SELECT Id FROM messenger_requests WHERE to_id = @toid AND from_id = @userid ORDER BY Id DESC LIMIT 1"); } MessengerRequest class3 = new MessengerRequest(num2, num, this.uint_0, GoldTree.GetGame().GetClientManager().GetNameById(this.uint_0)); class2.GetHabbo().GetMessenger().method_17(num2, num, this.uint_0); ServerMessage Message5_ = new ServerMessage(132u); class3.method_0(Message5_); class2.SendMessage(Message5_); } } } } }
private Room method_14() { return(GoldTree.GetGame().GetRoomManager().GetRoom(this.uint_0)); }
internal void method_18(uint uint_1, string string_0) { if (!this.method_9(uint_1, this.uint_0)) { this.method_20(6, uint_1); } else { GameClient @class = GoldTree.GetGame().GetClientManager().method_2(uint_1); if (@class == null || @class.GetHabbo().GetMessenger() == null) { this.method_20(5, uint_1); } else { if (this.method_25().GetHabbo().bool_3) { this.method_20(4, uint_1); } else { if (@class.GetHabbo().bool_3) { this.method_20(3, uint_1); } if (this.method_25().GetHabbo().method_4() > 0) { TimeSpan timeSpan = DateTime.Now - this.method_25().GetHabbo().dateTime_0; if (timeSpan.Seconds > 4) { this.method_25().GetHabbo().int_23 = 0; } if (timeSpan.Seconds < 4 && this.method_25().GetHabbo().int_23 > 5) { this.method_20(4, uint_1); return; } this.method_25().GetHabbo().dateTime_0 = DateTime.Now; this.method_25().GetHabbo().int_23++; } string_0 = ChatCommandHandler.smethod_4(string_0); if (LicenseTools.Boolean_4 && !this.method_25().GetHabbo().isJuniori) { using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient()) { class2.AddParamWithValue("message", "<PM to " + @class.GetHabbo().Username + ">: " + string_0); class2.ExecuteQuery(string.Concat(new object[] { "INSERT INTO chatlogs (user_id,room_id,hour,minute,timestamp,message,user_name,full_date) VALUES ('", this.method_25().GetHabbo().Id, "','0','", DateTime.Now.Hour, "','", DateTime.Now.Minute, "',UNIX_TIMESTAMP(),@message,'", this.method_25().GetHabbo().Username, "','", DateTime.Now.ToLongDateString(), "')" })); } } @class.GetHabbo().GetMessenger().method_19(string_0, this.uint_0); } } } }
public void method_0() { this.bool_0 = true; this.double_0 = GoldTree.GetUnixTimestamp(); }
public void SendMessage(string string_1) { this.SendData(GoldTree.GetDefaultEncoding().GetBytes(string_1)); }
public void method_6() { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().uint_2); if (@class != null && this.Session.GetHabbo().bool_5) { ServerMessage Message = new ServerMessage(69u); Message.AppendStringWithBreak(@class.ModelName); Message.AppendUInt(@class.Id); this.Session.SendMessage(Message); if (this.Session.GetHabbo().bool_8) { ServerMessage Message2 = new ServerMessage(254u); this.Session.SendMessage(Message2); } if (@class.Type == "private") { if (@class.Wallpaper != "0.0") { ServerMessage Message3 = new ServerMessage(46u); Message3.AppendStringWithBreak("wallpaper"); Message3.AppendStringWithBreak(@class.Wallpaper); this.Session.SendMessage(Message3); } if (@class.Floor != "0.0") { ServerMessage Logging = new ServerMessage(46u); Logging.AppendStringWithBreak("floor"); Logging.AppendStringWithBreak(@class.Floor); this.Session.SendMessage(Logging); } ServerMessage Message5 = new ServerMessage(46u); Message5.AppendStringWithBreak("landscape"); Message5.AppendStringWithBreak(@class.Landscape); this.Session.SendMessage(Message5); if (@class.CheckRights(this.Session, true)) { ServerMessage Message6 = new ServerMessage(42u); this.Session.SendMessage(Message6); ServerMessage Message7 = new ServerMessage(47u); this.Session.SendMessage(Message7); } else { if (@class.method_26(this.Session)) { ServerMessage Message6 = new ServerMessage(42u); this.Session.SendMessage(Message6); } } ServerMessage Message8 = new ServerMessage(345u); if (this.Session.GetHabbo().list_4.Contains(@class.Id) || @class.CheckRights(this.Session, true)) { Message8.AppendInt32(@class.Score); } else { Message8.AppendInt32(-1); } this.Session.SendMessage(Message8); if (@class.HasEvent) { this.Session.SendMessage(@class.Event.Serialize(this.Session)); } else { ServerMessage Message9 = new ServerMessage(370u); Message9.AppendStringWithBreak("-1"); this.Session.SendMessage(Message9); } } this.method_4(); } }