private static void ProcessRequestCategoryListings(Habbo sender, IncomingMessage message) { bool excludeFullRooms = message.PopWiredBoolean(); int categoryID = message.PopWiredInt32(); Category category = CoreManager.ServerCore.GetNavigator().GetCategory(categoryID); if (category == null) new MNavigatorCategoryListing // TODO: Remove this. Maybe even throw an exception? { ID = categoryID, ExcludeFullRooms = excludeFullRooms, Name = "Non-Existant Category", ParentID = categoryID, IsPublicCategory = true, Listings = new Listing[0], UnknownA = 0, UnknownB = 10000, UnknownC = 0 }.Send(sender); else new MNavigatorCategoryListing { ID = categoryID, ExcludeFullRooms = excludeFullRooms, Name = category.Name, ParentID = (category.PrimaryCategory != null ? category.PrimaryCategory.ID : category.ID), IsPublicCategory = category.IsPublicCategory, Listings = category.GetListings(), UnknownA = 0, UnknownB = 10000, UnknownC = 0 }.Send(sender); }
private static void ProcessRemoveFriends(Habbo sender, IncomingMessage message) { // How many friends have been deleted? int amount = message.PopWiredInt32(); MessengerObject messenger = sender.GetMessenger(); // Handle each one. for (int i = 0; i < amount; i++) { // Get the ID of the friend about to be removed. int friendID = message.PopWiredInt32(); // Remove the friend from all categories. messenger.RemoveFriend(friendID); } messenger.SendWaitingUpdateMessage(); }
private static void ProcessRequestCategoryListings(Habbo sender, IncomingMessage message) { bool excludeFullRooms = message.PopWiredBoolean(); int categoryID = message.PopWiredInt32(); Category category = CoreManager.ServerCore.GetNavigator().GetCategory(categoryID); if (category == null) { new MNavigatorCategoryListing // TODO: Remove this. Maybe even throw an exception? { ID = categoryID, ExcludeFullRooms = excludeFullRooms, Name = "Non-Existant Category", ParentID = categoryID, IsPublicCategory = true, Listings = new Listing[0], UnknownA = 0, UnknownB = 10000, UnknownC = 0 } }