diff --git a/SQL/Database.sql b/SQL/Database.sql index 18becd99..9b0edfbe 100644 --- a/SQL/Database.sql +++ b/SQL/Database.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Host: localhost:3306 --- Generation Time: 17-Dez-2015 às 20:04 +-- Generation Time: 07-Jan-2016 às 15:52 -- Versão do servidor: 5.5.42 -- PHP Version: 5.6.10 @@ -303,7 +303,7 @@ CREATE TABLE `bots_data` ( `id` int(11) unsigned NOT NULL, `room_id` int(11) unsigned NOT NULL DEFAULT '0', `user_id` int(11) unsigned NOT NULL, - `ai_type` enum('generic','guide','pet') CHARACTER SET utf8mb4 NOT NULL DEFAULT 'generic', + `ai_type` enum('generic','guide') CHARACTER SET utf8mb4 NOT NULL DEFAULT 'generic', `name` varchar(100) CHARACTER SET utf8mb4 NOT NULL, `motto` varchar(120) CHARACTER SET utf8mb4 NOT NULL DEFAULT 'Beep Beep', `look` varchar(1000) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', @@ -315,19 +315,12 @@ CREATE TABLE `bots_data` ( `effect` int(2) unsigned NOT NULL DEFAULT '0', `gender` enum('f','m') CHARACTER SET utf8mb4 NOT NULL DEFAULT 'm', `dance` int(11) unsigned NOT NULL DEFAULT '0', - `automatic_chat` tinyint(1) NOT NULL DEFAULT '0', + `automatic_chat` int(1) NOT NULL DEFAULT '0', `speaking_interval` int(8) unsigned NOT NULL DEFAULT '7', - `mix_phrases` tinyint(1) NOT NULL DEFAULT '0', + `mix_phrases` int(1) NOT NULL DEFAULT '0', `speech` text CHARACTER SET utf8mb4, `bot_type` varchar(191) CHARACTER SET utf8mb4 NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; - --- --- Extraindo dados da tabela `bots_data` --- - -INSERT INTO `bots_data` (`id`, `room_id`, `user_id`, `ai_type`, `name`, `motto`, `look`, `x`, `y`, `z`, `rotation`, `walk_mode`, `effect`, `gender`, `dance`, `automatic_chat`, `speaking_interval`, `mix_phrases`, `speech`, `bot_type`) VALUES -(1, 3, 2, 'generic', 'Mah', 'Sacia a sede e você pode dançar!', 'hr-9534-39.hd-600-1.ch-819-92.lg-3058-64.sh-3064-110.wa-2005', 9, 6, 0, 0, 'freeroam', 0, 'f', 0, 1, 7, 1, 'aaaaaaaa;', 'bot_bartender'); +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -2606,7 +2599,7 @@ INSERT INTO `catalog_furnitures` (`id`, `flat_id`, `item_name`, `type`, `stack_h (2204, 0, 'crystal_patch', 's', '0', '1', '0', '1', '0', '1', '1', 'default', 3, '0', '0', 0), (2205, 0, 'ads_boost_surfb', 'i', '1', '1', '0', '1', '0', '1', '1', '', 0, '0', '0', 0), (2206, 0, 'ads_tlc_wheel', 'i', '1', '1', '0', '1', '0', '1', '1', 'habbowheel', 1, '0', '0', 0), -(2207, 0, 'a0 pet5', 's', '1', '0', '0', '0', '0', '0', '0', 'pet5', 0, '0', '0', 0), +(2207, 0, 'pet_pig', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_pig', 0, '0', '0', 0), (2208, 0, 'garden_lupin4', 's', '0.0001', '0', '0', '1', '0', '1', '1', 'default', 3, '0', '0', 0), (2209, 0, 'garden_mursu3', 's', '1', '1', '0', '1', '0', '1', '1', 'default', 0, '0', '0', 0), (2210, 0, 'garden_lupin5', 's', '0.0001', '0', '0', '1', '0', '1', '1', 'default', 3, '0', '0', 0), @@ -2684,8 +2677,8 @@ INSERT INTO `catalog_furnitures` (`id`, `flat_id`, `item_name`, `type`, `stack_h (2282, 0, 'wed_plant', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 2, '0', '0', 0), (2283, 0, 'wed_icesculp', 's', '3', '0', '0', '1', '0', '1', '1', 'default', 2, '0', '0', 0), (2284, 0, 'wed_carsofa', 's', '1.25', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), -(2285, 0, 'a0 pet3', 's', '1', '0', '0', '0', '0', '0', '0', 'pet3', 0, '0', '0', 0), -(2286, 0, 'a0 pet4', 's', '1', '0', '0', '0', '0', '0', '0', 'pet4', 0, '0', '0', 0), +(2285, 0, 'pet_terrier', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_terrier', 0, '0', '0', 0), +(2286, 0, 'pet_bear', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_bear', 0, '0', '0', 0), (2287, 0, 'cmp_fish_bk', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 2, '0', '0', 0), (2288, 0, 'cmp_fish_g', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 2, '0', '0', 0), (2289, 0, 'cmp_fish_gr', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 2, '0', '0', 0), @@ -2741,9 +2734,9 @@ INSERT INTO `catalog_furnitures` (`id`, `flat_id`, `item_name`, `type`, `stack_h (2339, 0, 'ads_capri_tree', 's', '1', '0', '0', '1', '1', '1', '1', 'default', 1, '0', '0', 0), (2340, 0, 'ads_capri_arcade', 's', '1', '0', '0', '1', '1', '1', '1', 'default', 1, '0', '0', 0), (2341, 0, 'prizetrophy_thumb', 's', '1', '0', '0', '1', '1', '1', '1', 'trophy', 1, '0', '0', 0), -(2342, 0, 'a0 pet8', 's', '1', '1', '0', '0', '0', '0', '0', 'pet8', 0, '0', '0', 0), -(2343, 0, 'a0 pet11', 's', '1', '1', '0', '0', '0', '0', '0', 'pet11', 0, '0', '0', 0), -(2344, 0, 'a0 pet10', 's', '1', '0', '0', '0', '0', '0', '0', 'pet10', 0, '0', '0', 0), +(2342, 0, 'pet_spider', 's', '1', '1', '0', '0', '0', '0', '0', 'pet_spider', 0, '0', '0', 0), +(2343, 0, 'pet_frog', 's', '1', '1', '0', '0', '0', '0', '0', 'pet_frog', 0, '0', '0', 0), +(2344, 0, 'pet_chicken\n', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_chicken', 0, '0', '0', 0), (2345, 0, 'usva2_wallrug', 'i', '0', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2346, 0, 'usva3_rug', 's', '0', '1', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2347, 0, 'usva5_sofa', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), @@ -2785,7 +2778,7 @@ INSERT INTO `catalog_furnitures` (`id`, `flat_id`, `item_name`, `type`, `stack_h (2383, 0, 'usva3_wallrug', 'i', '1', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2384, 0, 'usva_wallrug', 'i', '1', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2385, 0, 'usva4_wallrug', 'i', '1', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), -(2386, 0, 'a0 pet9', 's', '1', '0', '0', '0', '0', '0', '0', 'pet9', 0, '0', '0', 0), +(2386, 0, 'pet_turtle', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_turtle', 0, '0', '0', 0), (2387, 0, 'avatar_effect26', 'e', '1', '0', '0', '0', '0', '0', '1', 'default', 1, '0', '0', 0), (2388, 0, 'avatar_effect25', 'e', '1', '0', '0', '0', '0', '0', '1', 'default', 1, '0', '0', 0), (2389, 0, 'avatar_effect24', 'e', '1', '0', '0', '0', '0', '0', '1', 'default', 1, '0', '0', 0), @@ -2845,7 +2838,7 @@ INSERT INTO `catalog_furnitures` (`id`, `flat_id`, `item_name`, `type`, `stack_h (2443, 0, 'wf_floor_switch1', 's', '1', '1', '0', '1', '0', '1', '1', 'floorswitch1', 2, '0', '0', 0), (2444, 0, 'wf_trg_game_starts', 's', '0.5', '1', '0', '1', '0', '1', '1', 'triggergamestart', 1, '0', '0', 0), (2445, 0, 'wf_trg_walks_on_furni', 's', '0.5', '1', '0', '1', '0', '1', '1', 'triggerwalkonfurni', 1, '0', '0', 0), -(2446, 0, 'a0 pet15', 's', '1', '0', '0', '0', '0', '0', '0', 'pet15', 1, '0', '0', 0), +(2446, 0, 'pet_horse', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_horse', 1, '0', '0', 0), (2447, 0, 'ads_mtv_floor', 's', '0.1', '1', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2448, 0, 'studio_monitor', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2449, 0, 'studio_stool', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), @@ -3046,7 +3039,7 @@ INSERT INTO `catalog_furnitures` (`id`, `flat_id`, `item_name`, `type`, `stack_h (2644, 0, 'waasa_chair_wood', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2645, 0, 'waasa_aquarium', 's', '0.0001', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2646, 0, 'newbie_nest', 's', '0.01', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), -(2647, 0, 'a0 pet7', 's', '1', '0', '0', '0', '0', '0', '0', 'pet7', 0, '0', '0', 0), +(2647, 0, 'pet_rhino', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_rhino', 0, '0', '0', 0), (2648, 0, 'coco_chair', 's', '1.3', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2649, 0, 'coco_chair_c2', 's', '1.3', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (2650, 0, 'coco_chair_c3', 's', '1.3', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), @@ -3808,7 +3801,7 @@ INSERT INTO `catalog_furnitures` (`id`, `flat_id`, `item_name`, `type`, `stack_h (3404, 0, 'avatar_effect74', 'e', '1', '1', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (3405, 0, 'avatar_effect75', 'e', '1', '1', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (3406, 0, 'avatar_effect76', 'e', '1', '1', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), -(3407, 0, 'a0 pet14', 's', '1', '0', '0', '0', '0', '0', '0', 'pet14', 0, '0', '0', 0), +(3407, 0, 'pet_monkey', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_monkey', 0, '0', '0', 0), (3408, 0, 'bolly_cherry', 's', '1', '0', '0', '1', '0', '1', '1', 'default', 1, '0', '0', 0), (3409, 0, 'jp_bed', 's', '2', '0', '0', '1', '0', '1', '1', 'bed', 1, '0', '0', 0), (3410, 0, 'jp_ceiling_lamp', 's', '0', '1', '0', '1', '0', '1', '1', 'default', 2, '0', '0', 0), @@ -5465,10 +5458,9 @@ INSERT INTO `catalog_furnitures` (`id`, `flat_id`, `item_name`, `type`, `stack_h (5058, 0, 'DEAL_HC_1', 'h', '0', '0', '0', '0', '0', '0', '0', 'default', 0, '0', '0', 0), (5059, 7335, 'bot_bartender', 'r', '0', '0', '1', '1', '1', '1', '1', 'default', 1, '0', '0', 0), (5060, 7299, 'bot_generic', 'r', '0', '0', '1', '1', '1', '1', '1', 'rentable_bot', 1, '0', '0', 0), -(5061, 0, 'a0 pet1', 's', '1', '0', '0', '0', '0', '0', '0', 'pet1', 0, '0', '0', 0), -(5062, 0, 'a0 pet2', 's', '1', '0', '0', '0', '0', '0', '0', 'pet2', 0, '0', '0', 0), -(5063, 0, 'a0 pet22', 's', '1', '0', '0', '0', '0', '0', '0', 'pet22', 0, '0', '0', 0), -(5064, 0, 'a0 pet12', 's', '1', '0', '0', '0', '0', '0', '0', 'pet0', 0, '0', '0', 0), +(5061, 0, 'pet_cat', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_cat', 0, '0', '0', 0), +(5062, 0, 'pet_croco', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_croco', 0, '0', '0', 0), +(5064, 0, 'pet_dragon', 's', '1', '0', '0', '0', '0', '0', '0', 'pet_dragon', 0, '0', '0', 0), (5065, 0, 'DEAL_HC_3', 'h', '0', '0', '0', '0', '0', '0', '0', 'default', 0, '0', '0', 0), (5066, 0, 'DEAL_HC_6', 'h', '0', '0', '0', '0', '0', '0', '0', 'default', 0, '0', '0', 0), (5067, 0, 'external_image_wallitem_poster', 'i', '0', '1', '1', '1', '1', '1', '1', 'default', 1, '0', '0', 0), @@ -7592,7 +7584,7 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (2001, 59, 'ads_boost_surfb', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2002, 32, 'ads_tlc_wheel', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2003, 59, 'spyro', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2004, 78, 'a0 pet5', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(2004, 78, 'pet_pig', 'pet_pig', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2005, 80, 'garden_lupin4', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2006, 80, 'garden_mursu3', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2007, 80, 'garden_lupin5', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -7669,8 +7661,8 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (2078, 82, 'wed_plant', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2079, 82, 'wed_icesculp', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2080, 82, 'wed_carsofa', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2081, 84, 'a0 pet3', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2082, 85, 'a0 pet4', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(2081, 84, 'pet_terrier\n', 'pet_terrier\n', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(2082, 85, 'pet_bear', 'pet_bear', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2083, 114, 'cmp_fish_bk', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2084, 114, 'cmp_fish_g', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2085, 114, 'cmp_fish_gr', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -8033,7 +8025,7 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (2442, 230, 'holo_dragon', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2443, 193, 'Silver Info', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2444, 74, 'christmas_poop', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2445, 92, 'a0 pet7', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(2445, 92, 'pet_rhino', 'pet_rhino', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2446, 45, 'hween12_cart', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2447, 45, 'hween12_entry', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2448, 45, 'hween12_track', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -8059,9 +8051,9 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (2468, 45, 'hween12_wolf', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2469, 45, 'hween12_strengthtest', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2470, 45, 'hween12_dartboard', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2472, 93, 'a0 pet8', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2473, 94, 'a0 pet11', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2474, 95, 'a0 pet10', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(2472, 93, 'pet_spider\n', 'pet_spider\n', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(2473, 94, 'pet_frog', 'pet_frog', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(2474, 95, 'pet_chicken', 'pet_chicken', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2475, 174, 'throne', NULL, 10000, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2476, 206, 'sfx_xylo', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2477, 206, 'sfx_dubstep3_2', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -8194,7 +8186,7 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (2604, 116, 'usva3_wallrug', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2605, 116, 'usva4_wallrug', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2606, 116, 'usva5_lamp', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2607, 229, 'a0 pet15', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(2607, 229, 'pet_horse', 'pet_horse', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2608, 175, 'obstacle_oxer2', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2609, 175, 'obstacle_water', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2610, 175, 'obstacle_water2', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -8461,9 +8453,9 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (2871, 44, 'theatre_seat_g', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2872, 44, 'cine_tile', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2873, 44, 'cine_bench_b', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2874, 44, 'theatre_seat_b', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(2875, 44, 'cine_roof', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL); +(2874, 44, 'theatre_seat_b', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL); INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cost_credits`, `cost_diamonds`, `cost_loyalty`, `cost_duckets`, `amounts`, `achievement`, `song_id`, `limited_sells`, `limited_stack`, `offer_active`, `club_only`, `extradata`, `badge`, `order_num`) VALUES +(2875, 44, 'cine_roof', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2876, 44, 'cine_popcorn', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2877, 44, 'cine_bench', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (2878, 44, 'cine_bench_g', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -9031,9 +9023,9 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (3442, 58, 'prizetrophy6*2', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3443, 58, 'prizetrophy7*2', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3444, 58, 'prizetrophy7*3', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(3445, 58, 'prizetrophy9*1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(3446, 58, 'prizetrophy8*1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL); +(3445, 58, 'prizetrophy9*1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL); INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cost_credits`, `cost_diamonds`, `cost_loyalty`, `cost_duckets`, `amounts`, `achievement`, `song_id`, `limited_sells`, `limited_stack`, `offer_active`, `club_only`, `extradata`, `badge`, `order_num`) VALUES +(3446, 58, 'prizetrophy8*1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3447, 31, 'greektrophy*1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3448, 58, 'greektrophy*2', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3449, 58, 'greektrophy*3', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -9320,8 +9312,8 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (3732, 230, 'ads_flag_un', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3733, 45, 'hween11_window', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3734, 17, 'xmas11_wall', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(3735, 113, 'a0 pet14', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(3736, 112, 'a0 pet9', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(3735, 113, 'pet_monkey\n', 'pet_monkey\n', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(3736, 112, 'pet_turtle', 'pet_turtle', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3737, 191, 'books_1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3738, 191, 'homework', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (3739, 191, 'gift_mdlcar0', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -9607,9 +9599,9 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (4024, 101, 'bc_block_redbrick*2', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4025, 101, 'bc_block_redbrick*1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4026, 101, 'bc_block_redbrick*3', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(4027, 101, 'bc_block_redbrick*4', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(4028, 101, 'bc_block_redbrick*5', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL); +(4027, 101, 'bc_block_redbrick*4', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL); INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cost_credits`, `cost_diamonds`, `cost_loyalty`, `cost_duckets`, `amounts`, `achievement`, `song_id`, `limited_sells`, `limited_stack`, `offer_active`, `club_only`, `extradata`, `badge`, `order_num`) VALUES +(4028, 101, 'bc_block_redbrick*5', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4029, 101, 'bc_block_redbrick*6', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4030, 101, 'bc_block_redbrick*7', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4031, 101, 'bc_block_artdeco1*1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -10158,9 +10150,9 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (4597, 157, 'wf_cnd_not_in_team', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4598, 155, 'wf_trg_at_time_long', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4599, 156, 'wf_act_move_furni_to', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(4600, 156, 'wf_act_toggle_to_rnd', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(4601, 121, 'wf_act_give_reward', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL); +(4600, 156, 'wf_act_toggle_to_rnd', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL); INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cost_credits`, `cost_diamonds`, `cost_loyalty`, `cost_duckets`, `amounts`, `achievement`, `song_id`, `limited_sells`, `limited_stack`, `offer_active`, `club_only`, `extradata`, `badge`, `order_num`) VALUES +(4601, 121, 'wf_act_give_reward', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4602, 156, 'wf_act_kick_user', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4603, 155, 'wf_trg_period_long', NULL, 6, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4605, 156, 'wf_act_chase', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), @@ -10269,10 +10261,9 @@ INSERT INTO `catalog_items` (`id`, `page_id`, `item_names`, `special_name`, `cos (4750, 5, 'DEAL_HC_1', 'DEAL_HC_2', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4751, 232, 'bot_bartender', 'bot_bartender', 0, 5, 0, 0, '1', 0, 0, 0, 0, '1', '0', 'hr-9534-39.hd-600-1.ch-819-92.lg-3058-64.sh-3064-110.wa-2005', '', NULL), (4752, 232, 'bot_generic', 'bot_generic', 0, 2, 0, 0, '1', 0, 0, 0, 0, '1', '0', 'hr-3020-34.hd-3091-2.ch-225-92.lg-3058-100.sh-3089-1338.ca-3084-78-108.wa-2005', '', NULL), -(4753, 86, 'a0 pet1', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(4754, 88, 'a0 pet2', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(4755, 87, 'a0 pet22', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), -(4756, 96, 'a0 pet12', NULL, 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(4753, 86, 'pet_cat', 'pet_cat', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(4754, 88, 'pet_croco', 'pet_croco', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), +(4756, 96, 'pet_dragon', 'pet_dragon', 5, 0, 0, 0, '1', 0, 0, 0, 0, '1', '0', '', '', NULL), (4757, 257, 'song_disk', 'SONG WhoDaresStacks', 5, 0, 0, 0, '1', 0, 2, 0, 0, '1', '0', 'who_dares_stacks', '', NULL), (4758, 257, 'song_disk', 'SONG ElectricPixels', 5, 0, 0, 0, '1', 0, 3, 0, 0, '1', '0', 'electric_pixels', '', NULL), (4759, 257, 'song_disk', 'SONG GalacticDisco', 5, 0, 0, 0, '1', 0, 4, 0, 0, '1', '0', 'galactic_disco', '', NULL), @@ -10631,6 +10622,39 @@ INSERT INTO `catalog_pages` (`id`, `parent_id`, `code_name`, `caption`, `icon_im -- -------------------------------------------------------- +-- +-- Estrutura da tabela `catalog_pets` +-- + +DROP TABLE IF EXISTS `catalog_pets`; +CREATE TABLE `catalog_pets` ( + `pet_type` varchar(191) CHARACTER SET utf8mb4 NOT NULL, + `pet_race_id` int(11) unsigned NOT NULL COMMENT 'Pet Race (Unique Type Id)' +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Extraindo dados da tabela `catalog_pets` +-- + +INSERT INTO `catalog_pets` (`pet_type`, `pet_race_id`) VALUES +('pet_dog', 0), +('pet_cat', 1), +('pet_croco', 2), +('pet_terrier', 3), +('pet_bear', 4), +('pet_pig', 5), +('pet_lion', 6), +('pet_rhino', 7), +('pet_spider', 8), +('pet_turtle', 9), +('pet_chicken', 10), +('pet_frog', 11), +('pet_dragon', 12), +('pet_monkey', 14), +('pet_horse', 15); + +-- -------------------------------------------------------- + -- -- Estrutura da tabela `catalog_targeted_offers` -- @@ -11279,14 +11303,7 @@ CREATE TABLE `groups_data` ( `colour1` int(11) NOT NULL DEFAULT '242424', `colour2` int(11) NOT NULL DEFAULT '242424', `admindeco` enum('0','1') CHARACTER SET utf8mb4 DEFAULT '1' COMMENT 'Administrators can Decorate' -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `groups_data` --- - -INSERT INTO `groups_data` (`id`, `group_name`, `group_description`, `group_badge`, `owner_id`, `created`, `room_id`, `state`, `colour1`, `colour2`, `admindeco`) VALUES -(1, 'zaaaa', 'aaaaaa', 'b1003s25175s25173s29114s00000', 2, 1450215291, 3, '0', 1, 13, '1'); +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -11309,14 +11326,7 @@ CREATE TABLE `groups_forums_data` ( `who_can_post` int(2) unsigned NOT NULL DEFAULT '1', `who_can_thread` int(2) unsigned NOT NULL DEFAULT '1', `who_can_mod` int(2) unsigned NOT NULL DEFAULT '2' -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `groups_forums_data` --- - -INSERT INTO `groups_forums_data` (`id`, `group_id`, `forum_name`, `forum_description`, `forum_messages_count`, `forum_score`, `forum_lastposter_id`, `forum_lastposter_name`, `forum_lastposter_timestamp`, `who_can_read`, `who_can_post`, `who_can_thread`, `who_can_mod`) VALUES -(1, 1, '', '', 4, 0, 2, 'Kioi', 1450306221, 2, 2, 2, 2); +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -11339,19 +11349,7 @@ CREATE TABLE `groups_forums_posts` ( `subject` varchar(1024) CHARACTER SET utf8mb4 NOT NULL, `post_content` text CHARACTER SET utf8mb4 NOT NULL, `post_hider` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; - --- --- Extraindo dados da tabela `groups_forums_posts` --- - -INSERT INTO `groups_forums_posts` (`id`, `parent_id`, `group_id`, `timestamp`, `pinned`, `locked`, `hidden`, `poster_id`, `poster_name`, `poster_look`, `subject`, `post_content`, `post_hider`) VALUES -(1, 0, 1, 1450274329, '0', '0', '0', 2, 'Kioi', 'sh-290-62.hr-115-42.hd-3093-18.ch-215-62.lg-285-91', 'aaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaa', ''), -(2, 0, 1, 1450274662, '0', '0', '1', 2, 'Kioi', 'sh-290-62.hr-115-42.hd-3093-18.ch-215-62.lg-285-91', 'fffffffffffffffff', 'fffffffffffffff', ''), -(3, 0, 1, 1450301446, '0', '0', '0', 2, 'Kioi', 'sh-290-62.hr-115-42.hd-3093-18.ch-215-62.lg-285-91', 'kkkkkkkkkkkk', 'kkkkkkkkkkkk', ''), -(4, 2, 1, 1450305586, '0', '0', '0', 2, 'Kioi', 'sh-290-62.hr-115-42.hd-3093-18.ch-215-62.lg-285-91', '', 'ffffffffffffff', ''), -(5, 2, 1, 1450305828, '0', '0', '0', 2, 'Kioi', 'sh-290-62.hr-115-42.hd-3093-18.ch-215-62.lg-285-91', '', 'iiiiiiiiiiiiii', ''), -(6, 0, 1, 1450306221, '0', '0', '0', 2, 'Kioi', 'sh-290-62.hr-115-42.hd-3093-18.ch-215-62.lg-285-91', 'hhhhhhhhhhhhhh', 'hhhhhhhhhhhhhh', ''); +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -11366,14 +11364,7 @@ CREATE TABLE `groups_members` ( `user_id` int(11) unsigned NOT NULL, `rank` enum('0','1','2') NOT NULL DEFAULT '0', `date_join` int(50) NOT NULL -) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `groups_members` --- - -INSERT INTO `groups_members` (`id`, `group_id`, `user_id`, `rank`, `date_join`) VALUES -(1, 1, 2, '2', 1450215283); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -11551,34 +11542,7 @@ CREATE TABLE `items_rooms` ( `songcode` varchar(255) NOT NULL DEFAULT '', `group_id` int(11) unsigned NOT NULL DEFAULT '0', `builders` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM AUTO_INCREMENT=27 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `items_rooms` --- - -INSERT INTO `items_rooms` (`id`, `user_id`, `room_id`, `item_name`, `extra_data`, `x`, `y`, `z`, `rot`, `wall_pos`, `rare_id`, `songcode`, `group_id`, `builders`) VALUES -(4, 1, 1, 'fball_score_r', '', 5, 5, 0.000, 2, '', 0, '', 0, '0'), -(5, 0, 0, 'song_disk', 'Claudio\n2015\n11\n15\n512\nTapes from Goa', 0, 0, 0.000, 0, '', 0, 'lost_my_tapes_at_goa', 0, '0'), -(6, 1, 1, 'jukebox_big', '1', 8, 5, 0.000, 0, '', 0, '', 0, '0'), -(9, 1, 1, 'badge_display3', 'ACH_Login1|Claudio|15-11-2015', 9, 9, 0.000, 2, '', 0, '', 0, '0'), -(10, 1, 0, 'duck', '', 0, 0, 0.000, 0, '', 0, '', 0, '0'), -(11, 1, 0, 'duck', '', 0, 0, 0.000, 0, '', 0, '', 0, '0'), -(12, 1, 0, 'a0 pet1', '0', 0, 0, 0.000, 0, '', 0, '', 0, '0'), -(13, 2, 0, 'duck', '', 0, 0, 0.000, 0, '', 0, '', 0, '0'), -(14, 2, 3, 'pirate_bottle_1', '', 6, 9, 0.000, 0, '', 0, '', 0, '0'), -(15, 2, 0, 'wf_trg_walks_on_furni', '', 0, 0, 0.000, 0, '', 0, '', 0, '0'), -(16, 2, 0, 'duck', '', 0, 0, 0.000, 0, '', 0, '', 0, '0'), -(17, 2, 3, 'cine_teleport4', '0', 10, 3, 0.000, 0, '', 0, '', 0, '0'), -(18, 2, 3, 'cine_teleport4', '0', 9, 9, 0.000, 0, '', 0, '', 0, '0'), -(19, 0, 0, 'song_disk', 'Kioi\n2015\n12\n15\n212\nElectric Pixels', 0, 0, 0.000, 0, '', 0, 'electric_pixels', 0, '0'), -(20, 2, 3, 'jukebox_big', '0', 6, 4, 0.000, 0, '', 0, '', 0, '0'), -(21, 2, 0, 'duck', '', 0, 0, 0.000, 0, '', 0, '', 0, '0'), -(22, 2, 0, 'guild_forum', '0', 0, 0, 0.000, 0, '', 0, '', 1, '0'), -(23, 2, 0, 'guild_forum', '0', 0, 0, 0.000, 0, '', 0, '', 1, '0'), -(24, 4, 3, 'duck', '', 9, 11, 0.000, 0, '', 0, '', 0, '0'), -(25, 4, 3, 'duck', '', 5, 12, 0.000, 0, '', 0, '', 0, '0'), -(26, 4, 0, 'jp_irori', '', 0, 0, 0.000, 0, '', 0, '', 0, '0'); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -11593,14 +11557,6 @@ CREATE TABLE `items_songs` ( `songid` int(10) unsigned NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `items_songs` --- - -INSERT INTO `items_songs` (`itemid`, `roomid`, `songid`) VALUES -(5, 1, 5), -(19, 3, 3); - -- -------------------------------------------------------- -- @@ -11640,14 +11596,6 @@ CREATE TABLE `items_teleports` ( `tele_two_id` int(10) unsigned NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `items_teleports` --- - -INSERT INTO `items_teleports` (`tele_one_id`, `tele_two_id`) VALUES -(17, 18), -(18, 17); - -- -------------------------------------------------------- -- @@ -11813,16 +11761,7 @@ CREATE TABLE `moderation_tickets` ( `room_id` int(10) unsigned NOT NULL, `room_name` varchar(100) NOT NULL, `timestamp` double NOT NULL -) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `moderation_tickets` --- - -INSERT INTO `moderation_tickets` (`id`, `score`, `type`, `status`, `sender_id`, `reported_id`, `moderator_id`, `message`, `room_id`, `room_name`, `timestamp`) VALUES -(1, 1, 104, 'open', 4, 0, 0, '', 3, 'aaaa', 1450378012), -(2, 1, 104, 'deleted', 4, 0, 2, '', 3, 'aaaa', 1450378477), -(3, 1, 104, 'invalid', 4, 0, 2, '', 3, 'aaaa', 1450378575); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -11924,222 +11863,6 @@ CREATE TABLE `navigator_publics` ( -- -------------------------------------------------------- --- --- Estrutura da tabela `pets_breeds` --- - -DROP TABLE IF EXISTS `pets_breeds`; -CREATE TABLE `pets_breeds` ( - `id` int(10) NOT NULL, - `breed_id` int(11) NOT NULL DEFAULT '0', - `color1` int(11) NOT NULL DEFAULT '0', - `color2` int(11) NOT NULL DEFAULT '0', - `color1_enabled` enum('0','1') NOT NULL DEFAULT '1', - `color2_enabled` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM AUTO_INCREMENT=195 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `pets_breeds` --- - -INSERT INTO `pets_breeds` (`id`, `breed_id`, `color1`, `color2`, `color1_enabled`, `color2_enabled`) VALUES -(1, 12, 0, 0, '1', '0'), -(2, 12, 1, 1, '1', '0'), -(3, 12, 2, 2, '1', '0'), -(4, 12, 3, 3, '1', '0'), -(5, 12, 4, 4, '1', '0'), -(6, 12, 5, 5, '1', '0'), -(7, 15, 1, 2, '1', '0'), -(8, 15, 2, 7, '1', '0'), -(9, 15, 3, 8, '1', '0'), -(10, 15, 4, 9, '1', '0'), -(11, 15, 1, 6, '1', '0'), -(12, 15, 2, 3, '1', '0'), -(13, 15, 3, 4, '1', '0'), -(14, 15, 4, 5, '1', '0'), -(15, 17, 0, 0, '1', '0'), -(16, 18, 0, 0, '1', '0'), -(17, 19, 0, 0, '1', '0'), -(18, 20, 0, 0, '1', '0'), -(19, 21, 0, 0, '1', '0'), -(20, 22, 0, 0, '1', '0'), -(21, 0, 0, 0, '1', '0'), -(22, 0, 1, 1, '1', '0'), -(23, 0, 2, 2, '1', '0'), -(24, 0, 3, 3, '1', '0'), -(25, 0, 4, 4, '1', '0'), -(26, 0, 5, 5, '1', '0'), -(27, 0, 6, 6, '1', '0'), -(28, 0, 7, 7, '1', '0'), -(29, 0, 8, 8, '1', '0'), -(30, 0, 9, 9, '1', '0'), -(31, 0, 10, 10, '1', '0'), -(32, 0, 11, 11, '1', '0'), -(33, 0, 12, 12, '1', '0'), -(34, 0, 13, 13, '1', '0'), -(35, 0, 14, 14, '1', '0'), -(36, 0, 15, 15, '1', '0'), -(37, 0, 16, 16, '1', '0'), -(38, 0, 17, 17, '1', '0'), -(39, 0, 18, 18, '1', '0'), -(40, 0, 19, 19, '1', '0'), -(41, 0, 20, 20, '1', '0'), -(42, 0, 21, 21, '1', '0'), -(43, 0, 22, 22, '1', '0'), -(44, 0, 23, 23, '1', '0'), -(45, 0, 24, 24, '1', '0'), -(46, 1, 0, 0, '1', '0'), -(47, 1, 1, 1, '1', '0'), -(48, 1, 2, 2, '1', '0'), -(49, 1, 3, 3, '1', '0'), -(50, 1, 4, 4, '1', '0'), -(51, 1, 5, 5, '1', '0'), -(52, 1, 6, 6, '1', '0'), -(53, 1, 7, 7, '1', '0'), -(54, 1, 8, 8, '1', '0'), -(55, 1, 9, 9, '1', '0'), -(56, 1, 10, 10, '1', '0'), -(57, 1, 11, 11, '1', '0'), -(58, 1, 12, 12, '1', '0'), -(59, 1, 13, 13, '1', '0'), -(60, 1, 14, 14, '1', '0'), -(61, 1, 15, 15, '1', '0'), -(62, 1, 16, 16, '1', '0'), -(63, 1, 17, 17, '1', '0'), -(64, 1, 18, 18, '1', '0'), -(65, 1, 19, 19, '1', '0'), -(66, 1, 20, 20, '1', '0'), -(67, 1, 21, 21, '1', '0'), -(68, 1, 22, 22, '1', '0'), -(69, 1, 23, 23, '1', '0'), -(70, 1, 24, 24, '1', '0'), -(71, 10, 0, 0, '1', '0'), -(72, 9, 0, 0, '1', '0'), -(73, 9, 1, 1, '1', '0'), -(74, 9, 2, 2, '1', '0'), -(75, 9, 3, 3, '1', '0'), -(76, 9, 4, 4, '1', '0'), -(77, 9, 5, 5, '1', '0'), -(78, 9, 6, 6, '1', '0'), -(79, 9, 7, 7, '1', '0'), -(80, 9, 8, 8, '1', '0'), -(81, 11, 1, 1, '1', '0'), -(82, 11, 2, 2, '1', '0'), -(83, 11, 3, 3, '1', '0'), -(84, 11, 4, 4, '1', '0'), -(85, 11, 5, 5, '1', '0'), -(86, 11, 6, 6, '1', '0'), -(87, 11, 8, 8, '0', '0'), -(88, 11, 9, 9, '1', '0'), -(89, 11, 10, 10, '1', '0'), -(90, 11, 11, 11, '1', '0'), -(91, 11, 12, 12, '1', '0'), -(92, 11, 13, 13, '1', '0'), -(93, 11, 15, 15, '1', '0'), -(94, 11, 18, 18, '1', '0'), -(95, 8, 0, 0, '1', '0'), -(96, 8, 1, 1, '1', '0'), -(97, 8, 2, 2, '1', '0'), -(98, 8, 3, 3, '1', '0'), -(99, 8, 4, 4, '1', '0'), -(100, 8, 5, 5, '1', '0'), -(101, 8, 6, 6, '1', '0'), -(102, 8, 7, 7, '1', '0'), -(103, 8, 8, 8, '1', '0'), -(104, 8, 9, 9, '1', '0'), -(105, 8, 10, 10, '1', '0'), -(106, 8, 11, 11, '1', '0'), -(107, 8, 14, 14, '1', '0'), -(108, 7, 0, 0, '1', '0'), -(109, 7, 1, 1, '1', '0'), -(110, 7, 2, 2, '1', '0'), -(111, 7, 3, 3, '0', '1'), -(112, 7, 4, 4, '1', '0'), -(113, 7, 5, 5, '1', '0'), -(114, 7, 6, 6, '1', '0'), -(115, 7, 7, 7, '1', '0'), -(116, 7, 0, 0, '1', '0'), -(117, 7, 1, 1, '1', '0'), -(118, 7, 2, 2, '1', '0'), -(119, 7, 3, 3, '0', '1'), -(120, 7, 4, 4, '1', '0'), -(121, 7, 5, 5, '1', '0'), -(122, 7, 6, 6, '1', '0'), -(123, 7, 7, 7, '1', '0'), -(124, 5, 0, 0, '1', '0'), -(125, 5, 1, 1, '1', '0'), -(126, 5, 2, 2, '1', '0'), -(127, 5, 3, 3, '1', '0'), -(128, 5, 5, 5, '1', '0'), -(129, 5, 7, 7, '1', '0'), -(130, 5, 8, 8, '1', '0'), -(131, 3, 0, 0, '1', '0'), -(132, 3, 1, 1, '1', '0'), -(133, 3, 2, 2, '1', '0'), -(134, 3, 3, 3, '1', '0'), -(135, 3, 4, 4, '1', '0'), -(136, 3, 5, 5, '1', '0'), -(137, 3, 6, 6, '1', '0'), -(138, 4, 0, 0, '1', '0'), -(139, 4, 1, 1, '1', '0'), -(140, 4, 2, 2, '1', '0'), -(141, 4, 3, 3, '1', '0'), -(142, 2, 0, 0, '1', '0'), -(143, 2, 1, 1, '1', '0'), -(144, 2, 2, 2, '1', '0'), -(145, 2, 3, 3, '1', '0'), -(146, 2, 4, 4, '1', '0'), -(147, 2, 5, 5, '1', '0'), -(148, 2, 6, 6, '1', '0'), -(149, 2, 7, 7, '1', '0'), -(150, 2, 8, 8, '1', '0'), -(151, 2, 9, 9, '1', '0'), -(152, 2, 10, 10, '1', '0'), -(153, 2, 11, 11, '1', '0'), -(154, 6, 0, 0, '1', '0'), -(155, 6, 1, 1, '1', '0'), -(156, 6, 2, 2, '1', '0'), -(157, 6, 3, 3, '1', '0'), -(158, 6, 4, 4, '1', '0'), -(159, 6, 5, 5, '1', '0'), -(160, 6, 6, 6, '0', '1'), -(161, 6, 7, 7, '0', '1'), -(162, 6, 8, 8, '0', '1'), -(163, 6, 9, 9, '0', '1'), -(164, 6, 10, 10, '0', '1'), -(165, 6, 11, 11, '1', '0'), -(166, 6, 12, 12, '0', '1'), -(167, 17, 1, 1, '1', '0'), -(168, 17, 2, 2, '1', '0'), -(169, 17, 3, 3, '1', '0'), -(170, 17, 4, 4, '1', '0'), -(171, 10, 1, 1, '1', '0'), -(172, 10, 2, 2, '1', '0'), -(173, 10, 3, 3, '1', '0'), -(174, 10, 4, 4, '1', '0'), -(175, 14, 0, 0, '1', '0'), -(176, 14, 1, 1, '1', '0'), -(177, 14, 2, 2, '1', '0'), -(178, 14, 3, 3, '1', '0'), -(179, 14, 5, 5, '1', '0'), -(180, 14, 6, 6, '1', '0'), -(181, 14, 7, 7, '1', '0'), -(182, 14, 8, 8, '1', '0'), -(183, 26, 0, 0, '1', '1'), -(184, 26, 1, 1, '1', '0'), -(185, 26, 2, 2, '1', '1'), -(186, 26, 3, 3, '1', '1'), -(187, 26, 4, 4, '1', '1'), -(188, 26, 5, 5, '1', '1'), -(189, 26, 6, 6, '1', '1'), -(190, 26, 7, 7, '1', '1'), -(191, 26, 8, 8, '1', '1'), -(192, 26, 9, 9, '1', '1'), -(193, 26, 10, 10, '1', '1'), -(194, 26, 11, 11, '1', '1'); - --- -------------------------------------------------------- - -- -- Estrutura da tabela `pets_commands` -- @@ -12147,24 +11870,26 @@ INSERT INTO `pets_breeds` (`id`, `breed_id`, `color1`, `color2`, `color1_enabled DROP TABLE IF EXISTS `pets_commands`; CREATE TABLE `pets_commands` ( `id` int(11) NOT NULL, - `input` varchar(255) NOT NULL COMMENT 'Separate Aliases by ;', - `status` varchar(10) NOT NULL DEFAULT '', - `gesture` varchar(10) NOT NULL DEFAULT '', + `input` varchar(255) CHARACTER SET latin1 NOT NULL COMMENT 'Separate Aliases by ;', + `status` varchar(10) CHARACTER SET latin1 NOT NULL DEFAULT '', + `gesture` varchar(10) CHARACTER SET latin1 NOT NULL DEFAULT '', `experience` int(11) NOT NULL DEFAULT '10', `energy` int(11) NOT NULL DEFAULT '5', `level` int(11) NOT NULL DEFAULT '1', - `pet_type` varchar(255) NOT NULL DEFAULT '1' COMMENT 'Group Pet Type by , (comma)', - `action` enum('breed','follow','sleep','unknown','lazy','default') NOT NULL DEFAULT 'default' -) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; + `pet_type` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT 'pet_dog' COMMENT 'Group Pet Type by , (comma)', + `action` enum('breed','follow','sleep','unknown','lazy','default') CHARACTER SET latin1 NOT NULL DEFAULT 'default', + `pet_speech` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT 'pet.done' +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4; -- -- Extraindo dados da tabela `pets_commands` -- -INSERT INTO `pets_commands` (`id`, `input`, `status`, `gesture`, `experience`, `energy`, `level`, `pet_type`, `action`) VALUES -(1, 'Sit;Sentar;Senta', 'sit', 'joy', 10, 5, 1, '0,1,2,3,4,5,6,7', 'default'), -(2, 'Descansar;Free', '', '', 10, 5, 1, '0,1,2,3,4,5,6,7', 'default'), -(3, 'Lay;Deitar;Deita', 'lay', 'sml', 10, 5, 1, '0,1,2,3,4,5,6,7', 'default'); +INSERT INTO `pets_commands` (`id`, `input`, `status`, `gesture`, `experience`, `energy`, `level`, `pet_type`, `action`, `pet_speech`) VALUES +(1, 'sit;sentar;senta', 'sit', 'joy', 10, 5, 1, 'pet_dog,pet_cat,pet_croco,pet_terrier,pet_bear,pet_pig,pet_lion,pet_rhino,pet_spider,pet_turtle,pet_chicken,pet_frog,pet_dragon,pet_monkey,pet_horse', 'default', 'pet.done'), +(2, 'descansar;free', '', '', 10, 5, 1, 'pet_dog,pet_cat,pet_croco,pet_terrier,pet_bear,pet_pig,pet_lion,pet_rhino,pet_spider,pet_turtle,pet_chicken,pet_frog,pet_dragon,pet_monkey,pet_horse', 'default', 'pet.done'), +(3, 'lay;deitar;deita', 'lay', 'sml', 10, 5, 1, 'pet_dog,pet_cat,pet_croco,pet_terrier,pet_bear,pet_pig,pet_lion,pet_rhino,pet_spider,pet_turtle,pet_chicken,pet_frog,pet_dragon,pet_monkey,pet_horse', 'default', 'pet.done'), +(4, 'here;come here;vem aqui;segue;aqui', '', '', 10, 5, 1, 'pet_dog,pet_cat,pet_croco,pet_terrier,pet_bear,pet_pig,pet_lion,pet_rhino,pet_spider,pet_turtle,pet_chicken,pet_frog,pet_dragon,pet_monkey,pet_horse', 'follow', 'pet.done'); -- -------------------------------------------------------- @@ -12174,30 +11899,33 @@ INSERT INTO `pets_commands` (`id`, `input`, `status`, `gesture`, `experience`, ` DROP TABLE IF EXISTS `pets_data`; CREATE TABLE `pets_data` ( - `id` int(11) unsigned NOT NULL DEFAULT '0', - `type` int(11) unsigned DEFAULT '0', - `race` varchar(11) DEFAULT NULL, - `color` varchar(11) DEFAULT NULL, - `energy` int(11) DEFAULT '0', - `experience` int(11) DEFAULT '0', - `nutrition` int(11) DEFAULT '0', - `respect` int(11) DEFAULT '0', - `createstamp` int(11) DEFAULT NULL, - `have_saddle` int(11) DEFAULT '0', - `hairdye` int(11) DEFAULT '1', - `pethair` int(11) DEFAULT '-1', - `anyone_ride` int(11) DEFAULT '0', + `id` int(11) unsigned NOT NULL, + `pet_type` varchar(191) NOT NULL, + `race_id` int(11) unsigned NOT NULL, + `user_id` int(11) unsigned NOT NULL, + `room_id` int(11) unsigned DEFAULT '0', + `color` varchar(100) NOT NULL, + `ai_type` enum('pet') NOT NULL DEFAULT 'pet', + `name` varchar(100) NOT NULL, + `x` int(11) NOT NULL DEFAULT '0', + `y` int(11) NOT NULL DEFAULT '0', + `z` int(11) NOT NULL DEFAULT '0', + `rotation` int(11) NOT NULL DEFAULT '0', + `walk_mode` enum('stand','freeroam','specified_range') NOT NULL DEFAULT 'stand', + `gender` enum('f','m') NOT NULL DEFAULT 'm', + `energy` int(11) unsigned NOT NULL DEFAULT '0', + `experience` int(11) unsigned NOT NULL DEFAULT '0', + `nutrition` int(11) unsigned NOT NULL DEFAULT '0', + `respect` int(11) unsigned NOT NULL DEFAULT '0', + `createstamp` int(11) unsigned NOT NULL DEFAULT '0', + `have_saddle` enum('1','0','2','3','-1') NOT NULL DEFAULT '0', + `hairdye` int(11) NOT NULL DEFAULT '1', + `pethair` int(11) NOT NULL DEFAULT '-1', + `anyone_ride` enum('0','1','2','3') NOT NULL DEFAULT '0', `rarity` int(3) NOT NULL DEFAULT '0', `lasthealth_stamp` int(11) NOT NULL DEFAULT '-1', - `untilgrown_stamp` int(11) DEFAULT '-1' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Extraindo dados da tabela `pets_data` --- - -INSERT INTO `pets_data` (`id`, `type`, `race`, `color`, `energy`, `experience`, `nutrition`, `respect`, `createstamp`, `have_saddle`, `hairdye`, `pethair`, `anyone_ride`, `rarity`, `lasthealth_stamp`, `untilgrown_stamp`) VALUES -(5, 1, '0', 'C5EDDE', 80, 30, 140, 3, 1447683400, 0, 1, -1, 0, 0, 1447813000, 1447856200); + `untilgrown_stamp` int(11) NOT NULL DEFAULT '-1' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -12217,6 +11945,222 @@ CREATE TABLE `pets_plants` ( -- -------------------------------------------------------- +-- +-- Estrutura da tabela `pets_races` +-- + +DROP TABLE IF EXISTS `pets_races`; +CREATE TABLE `pets_races` ( + `race_type` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Pet Race (Unique Type Id)', + `race_id` int(11) unsigned NOT NULL COMMENT 'Table Unique Identifier', + `color_one` int(11) unsigned NOT NULL DEFAULT '0', + `color_two` int(11) unsigned NOT NULL DEFAULT '0', + `color_one_enabled` enum('0','1') NOT NULL DEFAULT '1', + `color_two_enabled` enum('0','1') NOT NULL DEFAULT '0' +) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8mb4 COMMENT='Races types of Pets'; + +-- +-- Extraindo dados da tabela `pets_races` +-- + +INSERT INTO `pets_races` (`race_type`, `race_id`, `color_one`, `color_two`, `color_one_enabled`, `color_two_enabled`) VALUES +(12, 1, 0, 0, '1', '0'), +(12, 2, 1, 1, '1', '0'), +(12, 3, 2, 2, '1', '0'), +(12, 4, 3, 3, '1', '0'), +(12, 5, 4, 4, '1', '0'), +(12, 6, 5, 5, '1', '0'), +(15, 7, 1, 2, '1', '0'), +(15, 8, 2, 7, '1', '0'), +(15, 9, 3, 8, '1', '0'), +(15, 10, 4, 9, '1', '0'), +(15, 11, 1, 6, '1', '0'), +(15, 12, 2, 3, '1', '0'), +(15, 13, 3, 4, '1', '0'), +(15, 14, 4, 5, '1', '0'), +(17, 15, 0, 0, '1', '0'), +(18, 16, 0, 0, '1', '0'), +(19, 17, 0, 0, '1', '0'), +(20, 18, 0, 0, '1', '0'), +(21, 19, 0, 0, '1', '0'), +(22, 20, 0, 0, '1', '0'), +(0, 21, 0, 0, '1', '0'), +(0, 22, 1, 1, '1', '0'), +(0, 23, 2, 2, '1', '0'), +(0, 24, 3, 3, '1', '0'), +(0, 25, 4, 4, '1', '0'), +(0, 26, 5, 5, '1', '0'), +(0, 27, 6, 6, '1', '0'), +(0, 28, 7, 7, '1', '0'), +(0, 29, 8, 8, '1', '0'), +(0, 30, 9, 9, '1', '0'), +(0, 31, 10, 10, '1', '0'), +(0, 32, 11, 11, '1', '0'), +(0, 33, 12, 12, '1', '0'), +(0, 34, 13, 13, '1', '0'), +(0, 35, 14, 14, '1', '0'), +(0, 36, 15, 15, '1', '0'), +(0, 37, 16, 16, '1', '0'), +(0, 38, 17, 17, '1', '0'), +(0, 39, 18, 18, '1', '0'), +(0, 40, 19, 19, '1', '0'), +(0, 41, 20, 20, '1', '0'), +(0, 42, 21, 21, '1', '0'), +(0, 43, 22, 22, '1', '0'), +(0, 44, 23, 23, '1', '0'), +(0, 45, 24, 24, '1', '0'), +(1, 46, 0, 0, '1', '0'), +(1, 47, 1, 1, '1', '0'), +(1, 48, 2, 2, '1', '0'), +(1, 49, 3, 3, '1', '0'), +(1, 50, 4, 4, '1', '0'), +(1, 51, 5, 5, '1', '0'), +(1, 52, 6, 6, '1', '0'), +(1, 53, 7, 7, '1', '0'), +(1, 54, 8, 8, '1', '0'), +(1, 55, 9, 9, '1', '0'), +(1, 56, 10, 10, '1', '0'), +(1, 57, 11, 11, '1', '0'), +(1, 58, 12, 12, '1', '0'), +(1, 59, 13, 13, '1', '0'), +(1, 60, 14, 14, '1', '0'), +(1, 61, 15, 15, '1', '0'), +(1, 62, 16, 16, '1', '0'), +(1, 63, 17, 17, '1', '0'), +(1, 64, 18, 18, '1', '0'), +(1, 65, 19, 19, '1', '0'), +(1, 66, 20, 20, '1', '0'), +(1, 67, 21, 21, '1', '0'), +(1, 68, 22, 22, '1', '0'), +(1, 69, 23, 23, '1', '0'), +(1, 70, 24, 24, '1', '0'), +(10, 71, 0, 0, '1', '0'), +(9, 72, 0, 0, '1', '0'), +(9, 73, 1, 1, '1', '0'), +(9, 74, 2, 2, '1', '0'), +(9, 75, 3, 3, '1', '0'), +(9, 76, 4, 4, '1', '0'), +(9, 77, 5, 5, '1', '0'), +(9, 78, 6, 6, '1', '0'), +(9, 79, 7, 7, '1', '0'), +(9, 80, 8, 8, '1', '0'), +(11, 81, 1, 1, '1', '0'), +(11, 82, 2, 2, '1', '0'), +(11, 83, 3, 3, '1', '0'), +(11, 84, 4, 4, '1', '0'), +(11, 85, 5, 5, '1', '0'), +(11, 86, 6, 6, '1', '0'), +(11, 87, 8, 8, '0', '0'), +(11, 88, 9, 9, '1', '0'), +(11, 89, 10, 10, '1', '0'), +(11, 90, 11, 11, '1', '0'), +(11, 91, 12, 12, '1', '0'), +(11, 92, 13, 13, '1', '0'), +(11, 93, 15, 15, '1', '0'), +(11, 94, 18, 18, '1', '0'), +(8, 95, 0, 0, '1', '0'), +(8, 96, 1, 1, '1', '0'), +(8, 97, 2, 2, '1', '0'), +(8, 98, 3, 3, '1', '0'), +(8, 99, 4, 4, '1', '0'), +(8, 100, 5, 5, '1', '0'), +(8, 101, 6, 6, '1', '0'), +(8, 102, 7, 7, '1', '0'), +(8, 103, 8, 8, '1', '0'), +(8, 104, 9, 9, '1', '0'), +(8, 105, 10, 10, '1', '0'), +(8, 106, 11, 11, '1', '0'), +(8, 107, 14, 14, '1', '0'), +(7, 108, 0, 0, '1', '0'), +(7, 109, 1, 1, '1', '0'), +(7, 110, 2, 2, '1', '0'), +(7, 111, 3, 3, '0', '1'), +(7, 112, 4, 4, '1', '0'), +(7, 113, 5, 5, '1', '0'), +(7, 114, 6, 6, '1', '0'), +(7, 115, 7, 7, '1', '0'), +(7, 116, 0, 0, '1', '0'), +(7, 117, 1, 1, '1', '0'), +(7, 118, 2, 2, '1', '0'), +(7, 119, 3, 3, '0', '1'), +(7, 120, 4, 4, '1', '0'), +(7, 121, 5, 5, '1', '0'), +(7, 122, 6, 6, '1', '0'), +(7, 123, 7, 7, '1', '0'), +(5, 124, 0, 0, '1', '0'), +(5, 125, 1, 1, '1', '0'), +(5, 126, 2, 2, '1', '0'), +(5, 127, 3, 3, '1', '0'), +(5, 128, 5, 5, '1', '0'), +(5, 129, 7, 7, '1', '0'), +(5, 130, 8, 8, '1', '0'), +(3, 131, 0, 0, '1', '0'), +(3, 132, 1, 1, '1', '0'), +(3, 133, 2, 2, '1', '0'), +(3, 134, 3, 3, '1', '0'), +(3, 135, 4, 4, '1', '0'), +(3, 136, 5, 5, '1', '0'), +(3, 137, 6, 6, '1', '0'), +(4, 138, 0, 0, '1', '0'), +(4, 139, 1, 1, '1', '0'), +(4, 140, 2, 2, '1', '0'), +(4, 141, 3, 3, '1', '0'), +(2, 142, 0, 0, '1', '0'), +(2, 143, 1, 1, '1', '0'), +(2, 144, 2, 2, '1', '0'), +(2, 145, 3, 3, '1', '0'), +(2, 146, 4, 4, '1', '0'), +(2, 147, 5, 5, '1', '0'), +(2, 148, 6, 6, '1', '0'), +(2, 149, 7, 7, '1', '0'), +(2, 150, 8, 8, '1', '0'), +(2, 151, 9, 9, '1', '0'), +(2, 152, 10, 10, '1', '0'), +(2, 153, 11, 11, '1', '0'), +(6, 154, 0, 0, '1', '0'), +(6, 155, 1, 1, '1', '0'), +(6, 156, 2, 2, '1', '0'), +(6, 157, 3, 3, '1', '0'), +(6, 158, 4, 4, '1', '0'), +(6, 159, 5, 5, '1', '0'), +(6, 160, 6, 6, '0', '1'), +(6, 161, 7, 7, '0', '1'), +(6, 162, 8, 8, '0', '1'), +(6, 163, 9, 9, '0', '1'), +(6, 164, 10, 10, '0', '1'), +(6, 165, 11, 11, '1', '0'), +(6, 166, 12, 12, '0', '1'), +(17, 167, 1, 1, '1', '0'), +(17, 168, 2, 2, '1', '0'), +(17, 169, 3, 3, '1', '0'), +(17, 170, 4, 4, '1', '0'), +(10, 171, 1, 1, '1', '0'), +(10, 172, 2, 2, '1', '0'), +(10, 173, 3, 3, '1', '0'), +(10, 174, 4, 4, '1', '0'), +(14, 175, 0, 0, '1', '0'), +(14, 176, 1, 1, '1', '0'), +(14, 177, 2, 2, '1', '0'), +(14, 178, 3, 3, '1', '0'), +(14, 179, 5, 5, '1', '0'), +(14, 180, 6, 6, '1', '0'), +(14, 181, 7, 7, '1', '0'), +(14, 182, 8, 8, '1', '0'), +(26, 183, 0, 0, '1', '1'), +(26, 184, 1, 1, '1', '0'), +(26, 185, 2, 2, '1', '1'), +(26, 186, 3, 3, '1', '1'), +(26, 187, 4, 4, '1', '1'), +(26, 188, 5, 5, '1', '1'), +(26, 189, 6, 6, '1', '1'), +(26, 190, 7, 7, '1', '1'), +(26, 191, 8, 8, '1', '1'), +(26, 192, 9, 9, '1', '1'), +(26, 193, 10, 10, '1', '1'), +(26, 194, 11, 11, '1', '1'); + +-- -------------------------------------------------------- + -- -- Estrutura da tabela `pets_speech` -- @@ -12240,24 +12184,21 @@ INSERT INTO `pets_speech` (`pet_id`, `responses`) VALUES ('pet.unknowncommand', 'No way!;I don''t understand you;Your language is weird.;If I only knew what you''re saying...'), ('pet.while.drink', '*drinking*'), ('pet.while.eat', 'This is delicious;I feel like having dinner with the kings!'), -('speech.pet.26', 'I''m having fun!;Once upon a time I was happy... and it was horrid.;Let''s sing the Jingle Bells!;Are you really going to wear that?;Let''s play something!;Who called me ''ugly''?'), -('speech.pet0', 'Woof woof!;Woooof!;Woof woof woof!'), -('speech.pet1', 'Meow;Meow meow;Meeow!;Meow meow meow...'), -('speech.pet10', 'Grrr;'), -('speech.pet11', 'Grrr;'), -('speech.pet12', 'Grrr;'), -('speech.pet13', 'I''m your best friend!;So... wanna take a ride?;Hmm... *I feel very bored*;Let''s ride together!;Hello!'), -('speech.pet14', 'Grrr;'), -('speech.pet15', 'neiiigh;*trots around*;Neeeigh;*looks at*;*flicks tail*;'), -('speech.pet16', '*Fart*;*Burp*;I''m not Mr. Lordi''s small brother;Ya know what''d be great? Having legs!;I used to be George Michael''s double.;You''re so special...;Choo choo!;Someday I''ll be huge and everyone will love me!;*poking my nose*;*grr?*;Hey hey hey!;OMG! How are you?;I would like to play the bass, but I haven''t got any hands.'), -('speech.pet2', 'Grrrr...;Rrrr...;*hmm*;*sneeze*;*wanting to sleep*'), -('speech.pet3', '¡Woof, woof!;Guau, guau;Guauuu'), -('speech.pet4', '*pack of fresh salmon please*;Rawrrr!;*sniff sniff*;Yawnnnn..;Rawr! ... Rawrrrrr?;snf;'), -('speech.pet5', 'Oink Oink..;*Mellow*;Sniff... Sniff..;snf;Oink!;snf;lay;oink;'), -('speech.pet6', 'Grrr;'), -('speech.pet7', 'Grrr;'), -('speech.pet8', 'Grrr;'), -('speech.pet9', 'Grrr;'), +('speech.pet_bear', '*pack of fresh salmon please*;Rawrrr!;*sniff sniff*;Yawnnnn..;Rawr! ... Rawrrrrr?;snf;'), +('speech.pet_cat', 'Meow;Meow meow;Meeow!;Meow meow meow...'), +('speech.pet_chicken', 'Grrr;'), +('speech.pet_croco', 'Grrrr...;Rrrr...;*hmm*;*sneeze*;*wanting to sleep*'), +('speech.pet_dog', 'Woof woof!;Woooof!;Woof woof woof!'), +('speech.pet_dragon', 'Grrr;'), +('speech.pet_frog', 'Grrr;'), +('speech.pet_horse', 'neiiigh;*trots around*;Neeeigh;*looks at*;*flicks tail*;'), +('speech.pet_lion', 'Grrr;'), +('speech.pet_monkey', 'Grrr;'), +('speech.pet_pig', 'Oink Oink..;*Mellow*;Sniff... Sniff..;snf;Oink!;snf;lay;oink;'), +('speech.pet_rhino', 'Grrr;'), +('speech.pet_spider', 'Grrr;'), +('speech.pet_terrier', 'Woof!, woof!;Guau, guau;Guauuu'), +('speech.pet_turtle', 'Grrr;'), ('tired', 'ZzZ...;Zzz... *This feels so good*;ZzZ... yay sleeping..;*Dreaming...*;I really need to sleep.'), ('welcome.speech.pet', 'Long time no see, ;Hi, '); @@ -12402,16 +12343,7 @@ CREATE TABLE `rooms_data` ( `chat_flood_protection` int(3) NOT NULL DEFAULT '0', `walls_height` int(3) NOT NULL DEFAULT '-1', `image_thumb` varchar(255) DEFAULT '' -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `rooms_data` --- - -INSERT INTO `rooms_data` (`id`, `roomtype`, `caption`, `owner`, `description`, `category`, `state`, `trade_state`, `users_now`, `users_max`, `model_name`, `public_ccts`, `score`, `tags`, `icon_bg`, `icon_fg`, `icon_items`, `password`, `wallpaper`, `floor`, `landscape`, `allow_pets`, `allow_pets_eat`, `allow_walkthrough`, `hidewall`, `wallthick`, `floorthick`, `achievement`, `group_id`, `game_id`, `mute_settings`, `ban_settings`, `kick_settings`, `chat_type`, `chat_balloon`, `chat_speed`, `chat_max_distance`, `chat_flood_protection`, `walls_height`, `image_thumb`) VALUES -(3, 'private', 'aaaa', 2, 'aaaaaa', 1, 'open', '0', 0, 10, 'model_a', '', 2, '', 1, 0, '', '', '0.0', '0.0', '0.0', '1', '0', '0', '0', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 14, 0, -1, ''), -(5, 'private', 'aaaaaaaa', 4, 'aaaaaa', 1, 'open', '0', 0, 10, 'model_a', '', 0, '', 1, 0, '', '', '0.0', '0.0', '0.0', '1', '0', '0', '0', 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 14, 0, -1, ''), -(6, 'private', 'dddd', 2, '', 1, 'open', '0', 2, 10, 'model_a', '', 0, '', 1, 0, '', '', '0.0', '0.0', '0.0', '1', '0', '0', '0', 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 14, 0, -1, ''); +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -12898,7 +12830,7 @@ CREATE TABLE `server_status` ( -- INSERT INTO `server_status` (`id`, `status`, `users_online`, `rooms_loaded`, `server_ver`, `stamp`, `minutesuptime`, `userpeak`, `bannerdata`) VALUES -(1, '1', 2, 1, 'Yupi Emulator', 1450379081, 0, 2, '114670925920269957593299136150366957983142588366300079186349531:1589935137502239924254699078669119674538324391752663931735947'); +(1, '1', 1, 1, 'Yupi Emulator', 1452178103, 0, 2, '114670925920269957593299136150366957983142588366300079186349531:1589935137502239924254699078669119674538324391752663931735947'); -- -------------------------------------------------------- @@ -12917,42 +12849,7 @@ CREATE TABLE `talents_data` ( `achievement_level` int(11) unsigned NOT NULL DEFAULT '1', `prize` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT 'A1 KUMIANKKA', `prize_baseitem` int(11) unsigned NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `talents_data` --- - -INSERT INTO `talents_data` (`id`, `type`, `parent_category`, `level`, `order_num`, `achievement_group`, `achievement_level`, `prize`, `prize_baseitem`) VALUES -(1, 'citizenship', -1, 0, 1, '', 1, 'A1 KUMIANKKA', 155), -(2, 'citizenship', 1, 0, 2, 'ACH_SafetyQuizGraduate', 1, 'A1 KUMIANKKA', 155), -(3, 'citizenship', 5, 1, 3, 'ACH_RoomEntry', 1, 'A1 KUMIANKKA', 155), -(4, 'citizenship', 5, 1, 4, 'ACH_RespectGiven', 1, 'A1 KUMIANKKA', 155), -(5, 'citizenship', -1, 1, 2, '', 1, 'A1 KUMIANKKA', 155), -(6, 'citizenship', 5, 1, 5, 'ACH_AvatarLooks', 1, 'A1 KUMIANKKA', 155), -(7, 'citizenship', 5, 1, 6, 'ACH_AllTimeHotelPresence', 1, 'A1 KUMIANKKA', 155), -(8, 'citizenship', -1, 2, 8, '', 1, 'A1 KUMIANKKA', 155), -(9, 'citizenship', 8, 2, 9, 'ACH_RoomEntry', 2, 'A1 KUMIANKKA', 155), -(10, 'citizenship', 8, 2, 10, 'ACH_RespectGiven', 2, 'A1 KUMIANKKA', 155), -(11, 'citizenship', 8, 2, 11, 'ACH_RespectEarned', 2, 'A1 KUMIANKKA', 155), -(12, 'citizenship', 8, 2, 12, 'ACH_AllTimeHotelPresence', 2, 'A1 KUMIANKKA', 155), -(13, 'citizenship', 8, 2, 13, 'ACH_RegistrationDuration', 1, 'A1 KUMIANKKA', 155), -(14, 'citizenship', 8, 2, 14, 'ACH_Motto', 1, 'A1 KUMIANKKA', 155), -(15, 'citizenship', 8, 2, 15, 'ACH_PetRespectGiver', 3, 'A1 KUMIANKKA', 155), -(16, 'citizenship', -1, 3, 16, '', 0, 'A1 KUMIANKKA', 155), -(17, 'citizenship', 16, 3, 17, 'ACH_RoomEntry', 4, 'A1 KUMIANKKA', 155), -(18, 'citizenship', 16, 3, 18, 'ACH_RegistrationDuration', 2, 'A1 KUMIANKKA', 155), -(19, 'citizenship', 16, 3, 19, 'ACH_RespectEarned', 3, 'A1 KUMIANKKA', 155), -(20, 'citizenship', 16, 3, 20, 'ACH_BattleBallPlayer', 2, 'A1 KUMIANKKA', 155), -(21, 'citizenship', 16, 3, 21, 'ACH_BattleBallWinner', 1, 'A1 KUMIANKKA', 155), -(22, 'citizenship', 16, 3, 22, 'ACH_AllTimeHotelPresence', 4, 'A1 KUMIANKKA', 155), -(23, 'citizenship', -1, 4, 23, '', 1, 'A1 KUMIANKKA', 155), -(24, 'citizenship', 23, 4, 24, 'ACH_Citizenship', 1, 'A1 KUMIANKKA', 155), -(25, 'citizenship', 23, 4, 25, 'ACH_PetRespectGiver', 4, 'A1 KUMIANKKA', 155), -(26, 'citizenship', 23, 4, 26, 'ACH_BattleBallPlayer', 4, 'A1 KUMIANKKA', 155), -(27, 'citizenship', 23, 4, 27, 'ACH_RegistrationDuration', 3, 'A1 KUMIANKKA', 155), -(28, 'citizenship', 23, 4, 28, 'ACH_AllTimeHotelPresence', 6, 'A1 KUMIANKKA', 155), -(29, 'citizenship', 23, 4, 29, 'ACH_Login', 5, 'A1 KUMIANKKA', 155); +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -13003,15 +12900,7 @@ CREATE TABLE `users` ( `duty_level` int(11) NOT NULL DEFAULT '0', `navigator_logs` varchar(255) CHARACTER SET utf8mb4 DEFAULT '1,official-root,;2,popular,;3,my,;4,favorites,', `respect` int(11) DEFAULT NULL -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; - --- --- Extraindo dados da tabela `users` --- - -INSERT INTO `users` (`id`, `username`, `real_name`, `password`, `auth_ticket`, `rank`, `credits`, `activity_points`, `activity_points_lastupdate`, `diamonds`, `look`, `gender`, `motto`, `mail`, `account_created`, `last_online`, `online`, `ip_last`, `ip_reg`, `home_room`, `newbie_status`, `is_muted`, `mutant_penalty`, `mutant_penalty_expire`, `trade_lock`, `trade_lock_expire`, `block_newfriends`, `hide_online`, `hide_inroom`, `vip`, `talent_status`, `last_name_change`, `nux_passed`, `builders_expire`, `builders_items_max`, `builders_items_used`, `release_version`, `on_duty`, `duty_level`, `navigator_logs`, `respect`) VALUES -(2, 'Kioi', '', '', 'chocolate', 10, 49974, 180, 0, 95, 'sh-290-62.hr-115-42.hd-3093-18.ch-215-62.lg-285-91', 'M', 'a', 'undefined', 1450124463, 1450376899, '0', '172.16.9.102', '', 0, 0, '0', '0', 0, '0', 0, '0', '0', '0', '0', 'citizenship', 0, '0', 3700, 100, 0, 2, 'false', 0, '1,official-root,;2,popular,;3,my,;4,favorites,', NULL), -(4, 'Kusi', '', '', 'pessego', 2, 53000, 420, 0, 1, 'hr-115-42.hd-190-1.ch-215-62.lg-285-91.sh-290-62', 'M', '', 'pesso', 1450376919, 1450378935, '0', '172.16.9.102', '', 0, 0, '0', '0', 0, '0', 0, '0', '0', '0', '0', 'citizenship', 0, '0', 3700, 100, 0, 2, 'false', 0, '1,official-root,;2,popular,;3,my,;4,favorites,', NULL); +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -13027,34 +12916,6 @@ CREATE TABLE `users_achievements` ( `user_progress` int(11) unsigned NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `users_achievements` --- - -INSERT INTO `users_achievements` (`user_id`, `achievement_group`, `achievement_level`, `user_progress`) VALUES -(1, 'ACH_AllTimeHotelPresence', 1, 48), -(1, 'ACH_AvatarLooks', 1, 0), -(1, 'ACH_BasicClub', 1, 0), -(1, 'ACH_Login', 2, 2), -(1, 'ACH_PetLover', 2, 0), -(1, 'ACH_PetRespectGiver', 1, 3), -(1, 'ACH_RegistrationDuration', 5, 0), -(1, 'ACH_SafetyQuizGraduate', 1, 0), -(1, 'ACH_VipHC', 1, 0), -(2, 'ACH_AllTimeHotelPresence', 3, 79), -(2, 'ACH_AvatarLooks', 1, 0), -(2, 'ACH_BasicClub', 1, 0), -(2, 'ACH_Login', 2, 5), -(2, 'ACH_Motto', 1, 0), -(2, 'ACH_RegistrationDuration', 1, 3), -(2, 'ACH_RoomEntry', 1, 1), -(2, 'ACH_SafetyQuizGraduate', 1, 0), -(2, 'ACH_VipHC', 1, 0), -(4, 'ACH_AllTimeHotelPresence', 2, 49), -(4, 'ACH_Login', 1, 0), -(4, 'ACH_RegistrationDuration', 1, 0), -(4, 'ACH_RoomEntry', 1, 6); - -- -------------------------------------------------------- -- @@ -13067,35 +12928,7 @@ CREATE TABLE `users_badges` ( `user_id` int(10) unsigned NOT NULL, `badge_id` varchar(100) NOT NULL, `badge_slot` int(11) NOT NULL DEFAULT '0' -) ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=latin1; - --- --- Extraindo dados da tabela `users_badges` --- - -INSERT INTO `users_badges` (`id`, `user_id`, `badge_id`, `badge_slot`) VALUES -(11, 1, 'ACH_RegistrationDuration5', 0), -(12, 1, 'ACH_Login2', 0), -(3, 1, 'ACH_AllTimeHotelPresence1', 1), -(6, 1, 'ACH_VipHC1', 0), -(7, 1, 'ACH_BasicClub1', 0), -(8, 1, 'ACH_AvatarLooks1', 0), -(10, 1, 'ACH_SafetyQuizGraduate1', 0), -(14, 1, 'ACH_PetLover2', 0), -(15, 1, 'ACH_PetRespectGiver1', 0), -(16, 2, 'ACH_RegistrationDuration1', 0), -(24, 2, 'ACH_Login2', 1), -(29, 2, 'ACH_AllTimeHotelPresence3', 0), -(19, 2, 'ACH_Motto1', 0), -(20, 2, 'ACH_VipHC1', 0), -(21, 2, 'ACH_BasicClub1', 0), -(22, 2, 'ACH_AvatarLooks1', 0), -(23, 2, 'ACH_SafetyQuizGraduate1', 0), -(26, 4, 'ACH_RegistrationDuration1', 0), -(27, 4, 'ACH_Login1', 0), -(32, 4, 'ACH_AllTimeHotelPresence2', 0), -(30, 2, 'ACH_RoomEntry1', 0), -(31, 4, 'ACH_RoomEntry1', 0); +) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- @@ -13234,15 +13067,6 @@ CREATE TABLE `users_info` ( `cfhs_abusive` int(11) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `users_info` --- - -INSERT INTO `users_info` (`user_id`, `bans`, `cautions`, `reg_timestamp`, `login_timestamp`, `cfhs`, `cfhs_abusive`) VALUES -(1, 0, 0, 0, 1447683346, 0, 0), -(2, 0, 0, 0, 1450378373, 0, 0), -(4, 0, 0, 0, 1450378938, 0, 0); - -- -------------------------------------------------------- -- @@ -13278,15 +13102,6 @@ CREATE TABLE `users_preferences` ( `chat_color` int(11) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `users_preferences` --- - -INSERT INTO `users_preferences` (`userid`, `volume`, `prefer_old_chat`, `ignore_room_invite`, `disable_camera_follow`, `newnavi_x`, `newnavi_y`, `newnavi_width`, `newnavi_height`, `chat_color`) VALUES -(1, '100,100,100', '0', '0', '0', 348, 42, 425, 600, 0), -(2, '100,100,100', '0', '0', '0', 356, 37, 425, 600, 0), -(4, '100,100,100', '0', '0', '0', 0, 0, 580, 600, 0); - -- -------------------------------------------------------- -- @@ -13306,70 +13121,7 @@ CREATE TABLE `users_quests` ( `reward_type` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0', `timestamp_unlock` int(11) NOT NULL DEFAULT '0', `timestamp_lock` int(11) NOT NULL -) ENGINE=MyISAM AUTO_INCREMENT=182 DEFAULT CHARSET=utf8; - --- --- Extraindo dados da tabela `users_quests` --- - -INSERT INTO `users_quests` (`id`, `type`, `level_num`, `goal_type`, `goal_data`, `action`, `pixel_reward`, `data_bit`, `reward_type`, `timestamp_unlock`, `timestamp_lock`) VALUES -(2, 'identity', 1, 14, 1, 'CHANGEFIGURE', 10, '_2', '0', 0, 0), -(3, 'social', 2, 9, 1, 'CHATWITHSOMEONE', 10, '', '0', 0, 0), -(6, 'social', 5, 12, 1, 'DANCE', 10, '', '0', 0, 0), -(15, 'social', 1, 8, 1, 'ENTEROTHERSROOM', 10, '_2', '0', 0, 0), -(17, 'identity', 2, 15, 1, 'CHANGEMOTTO', 10, '', '0', 0, 0), -(101, 'room_builder', 1, 0, 3, 'MOVEITEM', 10, '_2', '0', 0, 0), -(104, 'explore', 1, 17, 1936, 'FINDLIFEGUARDTOWER', 10, '_2', '0', 0, 0), -(105, 'room_builder', 2, 1, 3, 'ROTATEITEM', 10, '', '0', 0, 0), -(106, 'room_builder', 3, 2, 1, 'PLACEITEM', 10, '', '0', 0, 0), -(107, 'room_builder', 4, 3, 1, 'PICKUPITEM', 10, '', '0', 0, 0), -(108, 'room_builder', 5, 4, 2, 'SWITCHSTATE', 10, '', '0', 0, 0), -(109, 'room_builder', 6, 5, 1, 'STACKITEM', 10, '', '0', 0, 0), -(110, 'room_builder', 7, 6, 1, 'PLACEFLOOR', 10, '', '0', 0, 0), -(111, 'room_builder', 8, 7, 1, 'PLACEWALLPAPER', 10, '_1', '0', 0, 0), -(113, 'identity', 3, 16, 1, 'WEARBADGE', 10, '', '0', 0, 0), -(115, 'social', 3, 10, 1, 'REQUESTFRIEND', 10, '', '0', 0, 0), -(116, 'social', 4, 11, 1, 'GIVERESPECT', 10, '', '0', 0, 0), -(118, 'social', 6, 13, 1, 'WAVE', 10, '', '0', 0, 0), -(119, 'explore', 2, 17, 1948, 'SWIM', 10, '', '0', 0, 0), -(120, 'explore', 3, 17, 1969, 'FINDSURFBOARD', 10, '', '0', 0, 0), -(121, 'explore', 4, 17, 1956, 'FINDBEETLE', 10, '', '0', 0, 0), -(122, 'explore', 5, 17, 1369, 'FINDNEONFLOOR', 10, '', '0', 0, 0), -(123, 'explore', 6, 17, 1375, 'FINDDISCOBALL', 10, '', '0', 0, 0), -(124, 'explore', 7, 17, 1019, 'FINDJUKEBOX', 10, '', '0', 0, 0), -(125, 'explore', 8, 17, 2050, 'FINDBBGATE', 10, '', '0', 0, 0), -(126, 'explore', 9, 17, 2040, 'FINDBBTILE', 10, '', '0', 0, 0), -(127, 'explore', 10, 17, 2049, 'FINDBBTELEPORT', 10, '', '0', 0, 0), -(128, 'explore', 11, 17, 2167, 'FINDFREEZEGATE', 10, '', '0', 0, 0), -(129, 'explore', 12, 17, 2172, 'FINDFREEZESCOREBOARD', 10, '', '0', 0, 0), -(130, 'explore', 13, 17, 2166, 'FINDFREEZEEXITTILE', 10, '', '0', 0, 0), -(131, 'explore', 14, 17, 1413, 'ICESKATE', 10, '', '0', 0, 0), -(132, 'explore', 15, 17, 2148, 'FINDTAGPOLE', 10, '', '0', 0, 0), -(133, 'explore', 16, 17, 2199, 'ROLLERSKATE', 10, '', '0', 0, 0), -(142, 'xmas2012_30', 0, 19, 4, 'add_25_friends', 0, '', '0', 0, 1354514400), -(143, 'xmas2012_1', 1, 20, 10, 'wave_10_users', 0, '', '0', 1354514400, 1354600800), -(144, 'xmas2012_2', 2, 21, 10, 'blow_kiss', 0, '', '0', 1354600800, 1354687200), -(145, 'xmas2012_3', 3, 22, 1, 'wear_hat', 0, '', '0', 1354687200, 1354773600), -(146, 'xmas2012_4', 4, 23, 1, 'dance_with_others', 0, '', '0', 1354773600, 1354860000), -(147, 'xmas2012_5', 5, 24, 5, 'gift_others', 0, '', '0', 1354860000, 1354946400), -(148, 'xmas2012_6', 6, 25, 1378, 'its_snowing', 0, '', '0', 1354946400, 1355032800), -(149, 'xmas2012_7', 7, 27, 5, 'pass_coffee', 0, '', '0', 1355032800, 1355032800), -(150, 'xmas2012_8', 8, 28, 5, 'wave_reindeer', 0, '', '0', 1355119200, 1355205600), -(151, 'xmas2012_9', 9, 23, 1, 'place_tree', 0, '', '0', 1355205600, 1355292000), -(152, 'xmas2012_10', 10, 23, 100, 'dance', 0, '', '0', 1355292000, 1356328800), -(156, 'xmas2012_11', 11, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(157, 'xmas2012_12', 12, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(158, 'xmas2012_13', 13, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(159, 'xmas2012_14', 14, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(160, 'xmas2012_15', 15, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(161, 'xmas2012_16', 16, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(162, 'xmas2012_17', 17, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(163, 'xmas2012_18', 18, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(164, 'xmas2012_19', 19, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(165, 'xmas2012_20', 20, 0, 0, 'placeholder', 10, '', '0', 0, 0), -(166, 'xmas2012_21', 0, 0, 0, '', 10, '', '0', 0, 0), -(180, 'xmas2012_22', 22, 17, 45207, 'find_fire', 0, '', '0', 1356328800, 1356328800), -(181, 'xmas2012_23', 23, 29, 300, 'party', 0, '', '0', 0, 0); +) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -13452,14 +13204,6 @@ CREATE TABLE `users_stats` ( `daily_competition_votes` int(11) NOT NULL DEFAULT '3' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `users_stats` --- - -INSERT INTO `users_stats` (`id`, `online_seconds`, `room_visits`, `respect`, `gifts_given`, `gifts_received`, `daily_respect_points`, `daily_pet_respect_points`, `achievement_score`, `quest_id`, `quest_progress`, `favourite_group`, `tickets_answered`, `daily_competition_votes`) VALUES -(2, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 2, 3), -(4, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 3); - -- -------------------------------------------------------- -- @@ -13475,14 +13219,6 @@ CREATE TABLE `users_subscriptions` ( `timestamp_lastgift` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `users_subscriptions` --- - -INSERT INTO `users_subscriptions` (`user_id`, `subscription_id`, `timestamp_activated`, `timestamp_expire`, `timestamp_lastgift`) VALUES -(1, 2, 1447599025, 1450270226, 1447599025), -(2, 2, 1450215257, 1452886457, 1450215257); - -- -------------------------------------------------------- -- @@ -13509,20 +13245,6 @@ CREATE TABLE `users_talents` ( `talent_state` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `users_talents` --- - -INSERT INTO `users_talents` (`userid`, `talent_id`, `talent_state`) VALUES -(1, 7, 1), -(1, 6, 1), -(1, 2, 1), -(2, 7, 1), -(2, 6, 1), -(2, 2, 1), -(4, 7, 1), -(4, 3, 1); - -- -------------------------------------------------------- -- @@ -13552,13 +13274,6 @@ CREATE TABLE `users_wardrobe` ( `gender` enum('F','M') NOT NULL DEFAULT 'M' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; --- --- Extraindo dados da tabela `users_wardrobe` --- - -INSERT INTO `users_wardrobe` (`user_id`, `slot_id`, `look`, `gender`) VALUES -(2, 1, 'sh-290-62.hr-115-42.hd-190-1.ch-215-62.lg-285-91', 'M'); - -- -------------------------------------------------------- -- @@ -13632,6 +13347,13 @@ ALTER TABLE `catalog_pages` ADD PRIMARY KEY (`id`), ADD KEY `id` (`id`); +-- +-- Indexes for table `catalog_pets` +-- +ALTER TABLE `catalog_pets` + ADD PRIMARY KEY (`pet_type`), + ADD KEY `pet_race_id` (`pet_race_id`); + -- -- Indexes for table `catalog_targeted_offers` -- @@ -13851,23 +13573,22 @@ ALTER TABLE `navigator_promocats` ALTER TABLE `navigator_publics` ADD PRIMARY KEY (`id`); --- --- Indexes for table `pets_breeds` --- -ALTER TABLE `pets_breeds` - ADD PRIMARY KEY (`id`); - -- -- Indexes for table `pets_commands` -- ALTER TABLE `pets_commands` - ADD PRIMARY KEY (`id`); + ADD PRIMARY KEY (`id`), + ADD KEY `pet_speech` (`pet_speech`); -- -- Indexes for table `pets_data` -- ALTER TABLE `pets_data` - ADD PRIMARY KEY (`id`); + ADD PRIMARY KEY (`id`), + ADD KEY `pet_type` (`pet_type`), + ADD KEY `user_id` (`user_id`), + ADD KEY `room_id` (`room_id`), + ADD KEY `race_id` (`race_id`); -- -- Indexes for table `pets_plants` @@ -13875,6 +13596,13 @@ ALTER TABLE `pets_data` ALTER TABLE `pets_plants` ADD UNIQUE KEY `pet_id` (`pet_id`) USING BTREE; +-- +-- Indexes for table `pets_races` +-- +ALTER TABLE `pets_races` + ADD PRIMARY KEY (`race_id`), + ADD KEY `race_type` (`race_type`); + -- -- Indexes for table `pets_speech` -- @@ -14198,7 +13926,7 @@ ALTER TABLE `bots_commands` -- AUTO_INCREMENT for table `bots_data` -- ALTER TABLE `bots_data` - MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; + MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `catalog_ecotron_items` -- @@ -14243,22 +13971,22 @@ ALTER TABLE `cms_stories_photos_preview` -- AUTO_INCREMENT for table `groups_data` -- ALTER TABLE `groups_data` - MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; + MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `groups_forums_data` -- ALTER TABLE `groups_forums_data` - MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; + MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `groups_forums_posts` -- ALTER TABLE `groups_forums_posts` - MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7; + MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `groups_members` -- ALTER TABLE `groups_members` - MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; + MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `hotelview_promos` -- @@ -14288,7 +14016,7 @@ ALTER TABLE `items_hopper` -- AUTO_INCREMENT for table `items_rooms` -- ALTER TABLE `items_rooms` - MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=27; + MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `items_songs_data` -- @@ -14318,7 +14046,7 @@ ALTER TABLE `moderation_templates` -- AUTO_INCREMENT for table `moderation_tickets` -- ALTER TABLE `moderation_tickets` - MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; + MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `navigator_flatcats` -- @@ -14335,15 +14063,20 @@ ALTER TABLE `navigator_promocats` ALTER TABLE `navigator_publics` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- --- AUTO_INCREMENT for table `pets_breeds` --- -ALTER TABLE `pets_breeds` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=195; --- -- AUTO_INCREMENT for table `pets_commands` -- ALTER TABLE `pets_commands` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `pets_data` +-- +ALTER TABLE `pets_data` + MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `pets_races` +-- +ALTER TABLE `pets_races` + MODIFY `race_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Table Unique Identifier',AUTO_INCREMENT=195; -- -- AUTO_INCREMENT for table `polls_data` -- @@ -14373,7 +14106,7 @@ ALTER TABLE `rooms_competitions_entries` -- AUTO_INCREMENT for table `rooms_data` -- ALTER TABLE `rooms_data` - MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7; + MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `server_blackwords` -- @@ -14403,17 +14136,17 @@ ALTER TABLE `server_status` -- AUTO_INCREMENT for table `talents_data` -- ALTER TABLE `talents_data` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=30; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` - MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; + MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users_badges` -- ALTER TABLE `users_badges` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=33; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users_bans` -- @@ -14443,7 +14176,7 @@ ALTER TABLE `users_gifts` -- AUTO_INCREMENT for table `users_quests` -- ALTER TABLE `users_quests` - MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=182; + MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users_rankings` -- @@ -14483,15 +14216,20 @@ ALTER TABLE `bots_commands` -- Limitadores para a tabela `bots_data` -- ALTER TABLE `bots_data` - ADD CONSTRAINT `bots_data_bot_type` FOREIGN KEY (`bot_type`) REFERENCES `catalog_bots` (`bot_type`), ADD CONSTRAINT `bots_data_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); +-- +-- Limitadores para a tabela `catalog_pets` +-- +ALTER TABLE `catalog_pets` + ADD CONSTRAINT `pet_race_id` FOREIGN KEY (`pet_race_id`) REFERENCES `pets_races` (`race_type`); + -- -- Limitadores para a tabela `groups_data` -- ALTER TABLE `groups_data` - ADD CONSTRAINT `groups_data_room_id` FOREIGN KEY (`room_id`) REFERENCES `rooms_data` (`id`) ON DELETE SET NULL ON UPDATE SET NULL, - ADD CONSTRAINT `groups_data_owner_id` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`); + ADD CONSTRAINT `groups_data_owner_id` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`), + ADD CONSTRAINT `groups_data_room_id` FOREIGN KEY (`room_id`) REFERENCES `rooms_data` (`id`) ON DELETE SET NULL ON UPDATE SET NULL; -- -- Limitadores para a tabela `groups_forums_data` @@ -14499,6 +14237,19 @@ ALTER TABLE `groups_data` ALTER TABLE `groups_forums_data` ADD CONSTRAINT `groups_forums_data_group_id` FOREIGN KEY (`group_id`) REFERENCES `groups_data` (`id`) ON DELETE NO ACTION; +-- +-- Limitadores para a tabela `pets_commands` +-- +ALTER TABLE `pets_commands` + ADD CONSTRAINT `pet_speech_id` FOREIGN KEY (`pet_speech`) REFERENCES `pets_speech` (`pet_id`); + +-- +-- Limitadores para a tabela `pets_data` +-- +ALTER TABLE `pets_data` + ADD CONSTRAINT `pet_type` FOREIGN KEY (`pet_type`) REFERENCES `catalog_pets` (`pet_type`), + ADD CONSTRAINT `pet_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); + -- -- Limitadores para a tabela `rooms_data` -- diff --git a/SQL/SQLFix.sql b/SQL/SQLFix.sql deleted file mode 100644 index b50d0299..00000000 --- a/SQL/SQLFix.sql +++ /dev/null @@ -1,21 +0,0 @@ --- --- Estrutura da tabela `users_stats` --- - -DROP TABLE IF EXISTS `users_stats`; -CREATE TABLE `users_stats` ( - `id` int(11) unsigned NOT NULL, - `online_seconds` int(7) NOT NULL DEFAULT '0', - `room_visits` int(7) NOT NULL DEFAULT '0', - `respect` int(6) NOT NULL DEFAULT '0', - `gifts_given` int(6) NOT NULL DEFAULT '0', - `gifts_received` int(6) NOT NULL DEFAULT '0', - `daily_respect_points` int(1) NOT NULL DEFAULT '3', - `daily_pet_respect_points` int(1) NOT NULL DEFAULT '3', - `achievement_score` int(7) unsigned NOT NULL DEFAULT '0', - `quest_id` int(10) unsigned NOT NULL DEFAULT '0', - `quest_progress` int(10) NOT NULL DEFAULT '0', - `favourite_group` int(11) NOT NULL DEFAULT '0', - `tickets_answered` int(11) NOT NULL DEFAULT '0', - `daily_competition_votes` int(11) NOT NULL DEFAULT '3' -) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347.incoming b/Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347/PRODUCTION-201510201205-42435347.incoming similarity index 100% rename from Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347.incoming rename to Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347/PRODUCTION-201510201205-42435347.incoming diff --git a/Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347.inf b/Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347/PRODUCTION-201510201205-42435347.inf similarity index 100% rename from Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347.inf rename to Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347/PRODUCTION-201510201205-42435347.inf diff --git a/Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347.library b/Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347/PRODUCTION-201510201205-42435347.library similarity index 100% rename from Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347.library rename to Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347/PRODUCTION-201510201205-42435347.library diff --git a/Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347.outgoing b/Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347/PRODUCTION-201510201205-42435347.outgoing similarity index 100% rename from Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347.outgoing rename to Yupi/Build/Variables/Packets/PRODUCTION-201510201205-42435347/PRODUCTION-201510201205-42435347.outgoing diff --git a/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.incoming b/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.incoming new file mode 100644 index 00000000..dd24d4b4 --- /dev/null +++ b/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.incoming @@ -0,0 +1,339 @@ +[INIT] +ReleaseVersion=4000 +InitCryptoMessageEvent=316 +GenerateSecretKeyMessageEvent=3847 +UniqueIDMessageEvent=1471 +SSOTicketMessageEvent=1778 + +[Landing] +LandingLoadWidgetMessageEvent=3544 +LandingRefreshPromosMessageEvent=3895 +LandingRefreshRewardMessageEvent=538 +SendBadgeCampaignMessageEvent=2318 +LandingCommunityGoalMessageEvent=2059 +HotelViewCountdownMessageEvent=3982 +HotelViewDailyquestMessageEvent=844 +HotelViewRequestBadgeMessageEvent=2388 +GetHotelViewHallOfFameMessageEvent=420 + +[HabboBasicInfo] +InfoRetrieveMessageEvent=186 +GetCurrencyBalanceMessageEvent=3697 +GetSubscriptionDataMessageEvent=12 +OnlineConfirmationMessageEvent=2577 +RequestLatencyTestMessageEvent=1789 +UserGetVolumeSettingsMessageEvent=3906 +SaveClientSettingsMessageEvent=3820 +GetTalentsTrackMessageEvent=1284 +LoadUserProfileMessageEvent=3591 +RelationshipsGetMessageEvent=866 +SetRelationshipMessageEvent=2112 +GetUserBadgesMessageEvent=2226 +GetUserTagsMessageEvent=-1//error 404 +OnDisconnectMessageEvent=2391 +GoToHotelViewMessageEvent=3576 +UserUpdateLookMessageEvent=2560 +UserUpdateMottoMessageEvent=3515 +CheckUsernameMessageEvent=1067 +ChangeUsernameMessageEvent=1067 +WardrobeMessageEvent=765 +WardrobeUpdateMessageEvent=55 + +[Navigator] +NavigatorGetEventsMessageEvent=2219 +NavigatorGetFavouriteRoomsMessageEvent=1346 +NavigatorGetFeaturedRoomsMessageEvent=1336 +NavigatorGetFriendsRoomsMessageEvent=642 +NavigatorGetHighRatedRoomsMessageEvent=2031 +NavigatorGetMyRoomsMessageEvent=2955 +NavigatorGetPopularRoomsMessageEvent=3022 +NavigatorGetPopularTagsMessageEvent=1685 +NavigatorGetRecentRoomsMessageEvent=1475 +NavigatorSearchRoomByNameMessageEvent=898 +NavigatorGetRecommendedRoomsMessageEvent=-1//error 404 +NavigatorGetFlatCategoriesMessageEvent=1086 +NavigatorGetPopularGroupsMessageEvent=1232 +NavigatorGetRoomsWithFriendsMessageEvent=3281 +NewNavigatorMessageEvent=882 +SearchNewNavigatorEvent=2722 +NewNavigatorAddSavedSearchEvent=3346 +NewNavigatorDeleteSavedSearchEvent=3279 +NewNavigatorResizeEvent=272 +NewNavigatorCollapseCategoryEvent=1368 +NewNavigatorUncollapseCategoryEvent=2733 +CanCreateRoomMessageEvent=361 +CreateRoomMessageEvent=3077 +AddFavouriteRoomMessageEvent=3092 +RemoveFavouriteRoomMessageEvent=855 +SetHomeRoomMessageEvent=2501 +GoToRoomByNameMessageEvent=1874 +ToggleStaffPickMessageEvent=510 + +[Catalog] +GetCatalogIndexMessageEvent=2267 +GetCatalogPageMessageEvent=39 +GetCatalogClubPageMessageEvent=715 +GetCatalogOfferMessageEvent=2180 +CatalogueOfferConfigMessageEvent=1928 +PurchaseFromCatalogMessageEvent=2830 +PurchaseFromCatalogAsGiftMessageEvent=21 +GetSellablePetBreedsMessageEvent=2505 +ReloadRecyclerMessageEvent=1715 +GetGiftWrappingConfigurationMessageEvent=3616 +GetRecyclerRewardsMessageEvent=1294 +CatalogPromotionGetRoomsMessageEvent=276 +GetCatalogClubGiftsMessageEvent=3302 +ChooseClubGiftMessageEvent=2199 +PromoteRoomMessageEvent=3078 +RetrieveSongIDMessageEvent=3585 +CheckPetnameMessageEvent=159 +EcotronRecycleMessageEvent=2920 +RedeemVoucherMessageEvent=489 +BuildersClubUpdateFurniCount=2511 +PlaceBuildersFurniture=3242 +PurchaseTargetedOfferMessageEvent=302 + +[HabboInventory] +LoadPetInventoryMessageEvent=263 +LoadBotInventoryMessageEvent=363 +LoadBadgeInventoryMessageEvent=166 +LoadItemsInventoryMessageEvent=2740 +SetActivatedBadgesMessageEvent=2752 +EnableInventoryEffectMessageEvent=628 +EffectEnableMessageEvent=129 + +[Rooms] +EnterPrivateRoomMessageEvent=407 +RoomGetHeightmapMessageEvent=2768 +RoomGetInfoMessageEvent=1164 +RoomUserActionMessageEvent=3639 +RoomOnLoadMessageEvent=2125 +RoomDeleteMessageEvent=722 +RoomEventUpdateMessageEvent=3707 +RoomGetSettingsInfoMessageEvent=1014 +RoomSaveSettingsMessageEvent=2074 +RoomSettingsMuteAllMessageEvent=2462 +RoomSettingsMuteUserMessageEvent=2997 +RoomLoadByDoorbellMessageEvent=1601 +DoorbellAnswerMessageEvent=2356 +RoomGetFilterMessageEvent=1348 +RoomAlterFilterMessageEvent=256 +GetRoomBannedUsersMessageEvent=581 +GetRoomRightsListMessageEvent=2734 +RoomRemoveAllRightsMessageEvent=1404 +RoomRemoveUserRightsMessageEvent=40 +GetFloorPlanFurnitureMessageEvent=2623 +GetFloorPlanDoorMessageEvent=24 +SaveFloorPlanEditorMessageEvent=1287 +SaveRoomThumbnailMessageEvent=1366 +SetInvitationsPreferenceMessageEvent=1379 +SubmitRoomToCompetitionMessageEvent=1110 +VoteForRoomMessageEvent=2073 + +[UserRoom] +ChatMessageEvent=670 +ShoutMessageEvent=2101 +UserWhisperMessageEvent=878 +UserWalkMessageEvent=1737 +UserDanceMessageEvent=645 +UserSignMessageEvent=2966 +RoomBanUserMessageEvent=3940 +RoomUnbanUserMessageEvent=3060 +RoomKickUserMessageEvent=3929 +RateRoomMessageEvent=336 +DropHanditemMessageEvent=1751 +GiveHanditemMessageEvent=3315 +GiveRespectMessageEvent=1955 +GiveRightsMessageEvent=3574 +StartTypingMessageEvent=3362 +StopTypingMessageEvent=1114 +IgnoreUserMessageEvent=2394 +UnignoreUserMessageEvent=3023 +LookAtUserMessageEvent=3744 +TradeAcceptMessageEvent=3374 +TradeAddItemOfferMessageEvent=1086 +TradeCancelMessageEvent=2967 +TradeConfirmMessageEvent=2399 +TradeDiscardMessageEvent=2264 +TradeRemoveItemMessageEvent=1033 +TradeStartMessageEvent=3313 +TradeUnacceptMessageEvent=1153 +SetChatPreferenceMessageEvent=2006 + +[RoomItems] +ToggleSittingMessageEvent=1565 +RoomAddFloorItemMessageEvent=579 +PlaceBuildersWallItemMessageEvent=3721 +FloorItemMoveMessageEvent=1781 +WallItemMoveMessageEvent=609 +TriggerDiceCloseMessageEvent=191 +TriggerDiceRollMessageEvent=1182 +TriggerItemMessageEvent=3846 +TriggerMoodlightMessageEvent=1826 +TriggerWallItemMessageEvent=3396 +EnterOneWayDoorMessageEvent=2816 +UpdateMoodlightMessageEvent=856 +OpenPostItMessageEvent=2796 +RoomAddPostItMessageEvent=425 +SavePostItMessageEvent=342 +UseHabboWheelMessageEvent=2651 +ActivateMoodlightMessageEvent=3472 +RoomApplySpaceMessageEvent=728 +SaveFootballGateOutfitMessageEvent=887 +YouTubeChoosePlaylistVideoMessageEvent=1314 +YouTubeGetPlayerMessageEvent=3517 +YouTubeGetPlaylistGetMessageEvent=890 +TileStackMagicSetHeightMessageEvent=1248 +SaveRoomBackgroundTonerMessageEvent=1061 +SaveRoomBrandingMessageEvent=3156 +MannequinSaveDataMessageEvent=2406 +MannequinUpdateDataMessageEvent=3936 +LoadJukeboxDiscsMessageEvent=1042 +JukeboxAddPlaylistItemMessageEvent=1878 +JukeboxRemoveSongMessageEvent=1111 +GetJukeboxPlaylistsMessageEvent=815 +GetMusicDataMessageEvent=3418 +OpenGiftMessageEvent=1515 +ReedemExchangeItemMessageEvent=1676 +RemovePostItMessageEvent=2777 +ConfirmLoveLockMessageEvent=2082 +UsePurchasableClothingMessageEvent=818 + +[RoomWired] +WiredSaveConditionMessageEvent=488 +WiredSaveEffectMessageEvent=3431 +WiredSaveMatchingMessageEvent=2703 +WiredSaveTriggerMessageEvent=1897 + +[Bots] +BotActionsMessageEvent=39 +BotSpeechListMessageEvent=2544 +PlaceBotMessageEvent=2321 +PlacePetMessageEvent=223 +MovePetMessageEvent=1060 +PickUpBotMessageEvent=644 +PickUpItemMessageEvent=636 +PickUpPetMessageEvent=2342 +HorseAddSaddleMessageEvent=870 +HorseAllowAllRideMessageEvent=600 +HorseMountOnMessageEvent=1440 +HorseRemoveSaddleMessageEvent=1892 +GetPetTrainerPanelMessageEvent=2088 +PetGetInformationMessageEvent=2853 +RespectPetMessageEvent=1618 +PetBreedResultMessageEvent=912 +PetBreedCancelMessageEvent=231 +CompostMonsterplantMessageEvent=451 + +[ModTools] +ModerationToolUserToolMessageEvent=2984 +ModerationToolRoomChatlogMessageEvent=2312 +ModerationToolRoomToolMessageEvent=182 +ModerationBanUserMessageEvent=2595 +ModerationKickUserMessageEvent=3589 +ModerationMuteUserMessageEvent=1940 +ModerationLockTradeMessageEvent=1160 +ModerationToolCloseIssueMessageEvent=50 +ModerationToolGetRoomVisitsMessageEvent=730 +ModerationToolPerformRoomActionMessageEvent=3458 +ModerationToolPickIssueMessageEvent=3973 +ModerationToolReleaseIssueMessageEvent=3800 +ModerationToolSendRoomAlertMessageEvent=781 +ModerationToolSendUserAlertMessageEvent=505 +ModerationToolSendUserCautionMessageEvent=2375 +ModerationToolUserChatlogMessageEvent=695 +ModerationToolIssueChatlogMessageEvent=3484 +ModerationToolIssueChatlogRefreshMessageEvent=2118 +AmbassadorAlertMessageEvent=1068 +GetUCPanelMessageEvent=1002 +GetUCPanelHotelMessageEvent=3786 +DeleteHelpTicketMessageEvent=1598 + +[Help] +SubmitHelpTicketMessageEvent=2411 +OpenBullyReportingMessageEvent=2973 +SendBullyReportMessageEvent=1932 +OpenHelpToolMessageEvent=1839 +OnGuideSessionDetachedMessageEvent=2975 +GetHelperToolConfigurationMessageEvent=3716 +OnGuideMessageEvent=491 +GuideToolMessageNew=3392 +GuideInviteToRoom=918 +VisitRoomGuides=3325 +GuideEndSession=1100 +CancellInviteGuide=3530 + +[Quests] +OpenQuestsMessageEvent=2305 +LoadNextQuestMessageEvent=90 +QuestCancelMessageEvent=3879 +QuestSeasonalStartMessageEvent=2633 +QuestStartMessageEvent=1282 +OpenAchievementsBoxMessageEvent=2931 +CompleteSafetyQuizMessageEvent=2652 + +[Friends] +ConsoleInstantChatMessageEvent=1981 +ConsoleInviteFriendsMessageEvent=2694 +ConsoleSearchFriendsMessageEvent=3375 +FollowFriendMessageEvent=2280 +FriendListUpdateMessageEvent=2664 +FriendRequestListLoad=2485 +AcceptFriendMessageEvent=45 +DeclineFriendMessageEvent=835 +DeleteFriendMessageEvent=698 +RequestFriendMessageEvent=3775 +GetMyFriendsMessageEvent=2349 +FindMoreFriendsMessageEvent=1264 +ConsoleInit=1812 + +[Groups] +GetGroupForumsMessageEvent=3912 +GetGroupForumDataMessageEvent=872 +GetGroupForumThreadRootMessageEvent=1606 +UpdateThreadMessageEvent=1522 +UpdateForumSettingsMessageEvent=931 +AlterForumThreadStateMessageEvent=3299 +PublishForumThreadMessageEvent=477 +ReadForumThreadMessageEvent=1559 +RequestLeaveGroupMessageEvent=649 +ConfirmLeaveGroupMessageEvent=714 +AcceptGroupRequestMessageEvent=2259 +CreateGuildMessageEvent=2546 +GetGroupFurnitureMessageEvent=3046 +GetGroupInfoMessageEvent=3211 +GetGroupMembersMessageEvent=205 +GetGroupPurchaseBoxMessageEvent=468 +GetGroupPurchasingInfoMessageEvent=1670 +GroupDeclineMembershipRequestMessageEvent=403 +GroupMakeAdministratorMessageEvent=465 +GroupManageMessageEvent=2547 +GroupUpdateBadgeMessageEvent=2959 +GroupUpdateColoursMessageEvent=1443 +GroupUpdateNameMessageEvent=1062 +GroupUpdateSettingsMessageEvent=3180 +GroupUserJoinMessageEvent=2615 +SetFavoriteGroupMessageEvent=2625 +RemoveFavouriteGroupMessageEvent=1412 +RemoveGroupAdminMessageEvent=2725 +DeleteGroupMessageEvent=747 + +[Games] +GameCenterLoadGameMessageEvent=175 +GameCenterJoinQueueMessageEvent=951 +ClickGamesMessageEvent=2386 + +[Polls] +AcceptPollMessageEvent=2580 +RefusePollMessageEvent=2538 +AnswerPollQuestionMessageEvent=3757 + +[Other] +PongMessageEvent=3713 +RetrieveCitizenshipStatus=1605 +NuxAcceptGiftsMessageEvent=515 +NuxReceiveGiftsMessageEvent=-1//error 404 +HabboCameraMessageEvent=1903 +HabboCameraPublishPhoto=3603 +GetCameraRequest=2274 +GetCameraPriceMessageEvent=1341 diff --git a/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.inf b/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.inf new file mode 100644 index 00000000..511fba87 --- /dev/null +++ b/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.inf @@ -0,0 +1,4 @@ +Crypto.Enabled=false +Crypto.RSA.N=86851dd364d5c5cece3c883171cc6ddc5760779b992482bd1e20dd296888df91b33b936a7b93f06d29e8870f703a216257dec7c81de0058fea4cc5116f75e6efc4e9113513e45357dc3fd43d4efab5963ef178b78bd61e81a14c603b24c8bcce0a12230b320045498edc29282ff0603bc7b7dae8fc1b05b52b2f301a9dc783b7 +Crypto.RSA.D=968e2f2e8bdcf687ac0b1a4f07727f5b0ba3719e30bb97c48795e91f1220c3baa4b937eb8c217faac9e7bed35eeb623d957cb40c040ec0fe2a109ba9638142ca45769a5cf68ccc3a42ec7d3aa112ad012d3d2843d9cc0c3c504ffbbbddbba3716043f65e15149935a52c1d1d71d5c589d5563784c97a91bc55e50d26ec2da2dd +Crypto.RSA.E=3 diff --git a/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.library b/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.library new file mode 100644 index 00000000..d09e5d97 --- /dev/null +++ b/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.library @@ -0,0 +1,297 @@ +InitCryptoMessageEvent=InitCrypto +GenerateSecretKeyMessageEvent=SecretKey +UniqueIDMessageEvent=MachineId +SSOTicketMessageEvent=LoginWithTicket +InfoRetrieveMessageEvent=InfoRetrieve +RoomUserActionMessageEvent=RoomUserAction +RemoveFavouriteRoomMessageEvent=RemoveFavouriteRoom +UserWhisperMessageEvent=Whisper +GetCatalogIndexMessageEvent=CatalogueIndex +GetCatalogPageMessageEvent=CataloguePage +GetCatalogClubPageMessageEvent=CatalogueClubPage +GetCatalogOfferMessageEvent=CatalogueSingleOffer +CatalogueOfferConfigMessageEvent=CatalogueOffersConfig +CheckPetnameMessageEvent=CheckPetName +PurchaseFromCatalogMessageEvent=PurchaseItem +PurchaseFromCatalogAsGiftMessageEvent=PurchaseGift +GetSellablePetBreedsMessageEvent=GetPetBreeds +ReloadRecyclerMessageEvent=ReloadEcotron +GetGiftWrappingConfigurationMessageEvent=GiftWrappingConfig +GetRecyclerRewardsMessageEvent=RecyclerRewards +ConfirmLeaveGroupMessageEvent=ConfirmLeaveGroup +RequestLeaveGroupMessageEvent=RequestLeaveGroup +NuxReceiveGiftsMessageEvent=ReceiveNuxGifts +NuxAcceptGiftsMessageEvent=AcceptNuxGifts +ReadForumThreadMessageEvent=ReadForumThread +PublishForumThreadMessageEvent=PublishForumThread +UpdateThreadMessageEvent=UpdateForumThread +AlterForumThreadStateMessageEvent=AlterForumThreadState +GetGroupForumThreadRootMessageEvent=GetForumThreadRoot +GetGroupForumDataMessageEvent=GetGroupForumData +GetGroupForumsMessageEvent=GetGroupForums +ChatMessageEvent=Chat +ShoutMessageEvent=Shout +GetFloorPlanFurnitureMessageEvent=RequestFloorPlanUsedCoords +GetFloorPlanDoorMessageEvent=RequestFloorPlanDoor +SendBullyReportMessageEvent=SendBullyReport +OpenBullyReportingMessageEvent=OpenBullyReporting +NavigatorGetPopularGroupsMessageEvent=NavigatorGetPopularGroups +GetCatalogClubGiftsMessageEvent=LoadClubGifts +SaveFloorPlanEditorMessageEvent=SaveHeightmap +RefusePollMessageEvent=RefusePoll +AnswerPollQuestionMessageEvent=AnswerPollQuestion +AcceptPollMessageEvent=AcceptPoll +RetrieveSongIDMessageEvent=RetrieveSongId +TileStackMagicSetHeightMessageEvent=TileStackMagicSetHeight +EnableInventoryEffectMessageEvent=EnableInventoryEffect +PromoteRoomMessageEvent=PromoteRoom +CatalogPromotionGetRoomsMessageEvent=GetPromotionableRooms +RoomGetFilterMessageEvent=GetRoomFilter +RoomAlterFilterMessageEvent=AlterRoomFilter +YouTubeGetPlayerMessageEvent=GetTvPlayer +YouTubeChoosePlaylistVideoMessageEvent=ChooseTvPlayerVideo +YouTubeGetPlaylistGetMessageEvent=GetTvPlaylist +GetTalentsTrackMessageEvent=GetTalentsTrack +SendBadgeCampaignMessageEvent=PrepareCampaing +PongMessageEvent=Pong +GoToHotelViewMessageEvent=ReceptionView +LandingRefreshPromosMessageEvent=RefreshPromoEvent +LandingCommunityGoalMessageEvent=LandingCommunityGoal +LandingLoadWidgetMessageEvent=WidgetContainer +OnDisconnectMessageEvent=DisconnectEvent +LandingRefreshRewardMessageEvent=ReceptionView +OnlineConfirmationMessageEvent=OnlineConfirmationEvent +RetrieveCitizenshipStatus=RetriveCitizenShipStatus +RequestLatencyTestMessageEvent=LatencyTest +OpenHelpToolMessageEvent=InitHelpTool +SubmitHelpTicketMessageEvent=SubmitHelpTicket +RedeemVoucherMessageEvent=RedeemVoucher +ModerationToolSendRoomAlertMessageEvent=ModSendRoomAlert +ModerationToolPickIssueMessageEvent=ModPickTicket +ModerationToolReleaseIssueMessageEvent=ModReleaseTicket +ModerationToolCloseIssueMessageEvent=ModCloseTicket +ModerationToolUserToolMessageEvent=ModGetUserInfo +ModerationToolUserChatlogMessageEvent=ModGetUserChatlog +ModerationToolIssueChatlogMessageEvent=ModGetTicketChatlog +ModerationToolRoomChatlogMessageEvent=ModGetRoomChatlog +ModerationToolGetRoomVisitsMessageEvent=ModGetRoomVisits +ModerationToolRoomToolMessageEvent=ModGetRoomTool +ModerationToolPerformRoomActionMessageEvent=ModPerformRoomAction +ModerationToolSendUserAlertMessageEvent=ModSendUserMessage +ModerationToolSendUserCautionMessageEvent=ModSendUserCaution +ModerationKickUserMessageEvent=ModKickUser +ModerationMuteUserMessageEvent=ModMuteUser +ModerationLockTradeMessageEvent=ModLockTrade +ModerationBanUserMessageEvent=ModBanUser +FriendListUpdateMessageEvent=FriendsListUpdate +DeleteFriendMessageEvent=RemoveBuddy +ConsoleSearchFriendsMessageEvent=SearchHabbo +ConsoleInstantChatMessageEvent=SendInstantMessenger +AcceptFriendMessageEvent=AcceptRequest +DeclineFriendMessageEvent=DeclineRequest +RequestFriendMessageEvent=RequestBuddy +FollowFriendMessageEvent=FollowBuddy +ConsoleInviteFriendsMessageEvent=SendInstantInvite +EnterPrivateRoomMessageEvent=OpenFlat +AddFavouriteRoomMessageEvent=AddFavorite +NavigatorGetFlatCategoriesMessageEvent=GetFlatCats +NavigatorGetFeaturedRoomsMessageEvent=GetPubs +NavigatorGetPopularRoomsMessageEvent=GetPopularRooms +NavigatorGetRecommendedRoomsMessageEvent=GetRecommendedRooms +NavigatorGetHighRatedRoomsMessageEvent=GetHighRatedRooms +NavigatorGetFriendsRoomsMessageEvent=GetFriendsRooms +NavigatorGetMyRoomsMessageEvent=GetOwnRooms +NavigatorGetFavouriteRoomsMessageEvent=GetFavoriteRooms +NavigatorGetRecentRoomsMessageEvent=GetRecentRooms +NavigatorGetPopularTagsMessageEvent=GetPopularTags +NavigatorSearchRoomByNameMessageEvent=PerformSearch +OpenQuestsMessageEvent=OpenQuests +QuestStartMessageEvent=StartQuest +QuestCancelMessageEvent=StopQuest +LoadNextQuestMessageEvent=GetCurrentQuest +RoomGetHeightmapMessageEvent=GetRoomData2 +UserWalkMessageEvent=Move +CanCreateRoomMessageEvent=CanCreateRoom +CreateRoomMessageEvent=CreateRoom +RoomGetInfoMessageEvent=GetRoomInformation +RoomGetSettingsInfoMessageEvent=GetRoomEditData +RoomSaveSettingsMessageEvent=SaveRoomData +GiveRightsMessageEvent=GiveRights +RoomRemoveUserRightsMessageEvent=TakeRights +RoomRemoveAllRightsMessageEvent=TakeAllRights +RoomKickUserMessageEvent=KickUser +RoomBanUserMessageEvent=BanUser +TradeStartMessageEvent=InitTrade +SetHomeRoomMessageEvent=SetHomeRoom +RoomDeleteMessageEvent=DeleteRoom +LookAtUserMessageEvent=LookAt +StartTypingMessageEvent=StartTyping +StopTypingMessageEvent=StopTyping +IgnoreUserMessageEvent=IgnoreUser +UnignoreUserMessageEvent=UnignoreUser +UserSignMessageEvent=Sign +GetUserTagsMessageEvent=GetUserTags +GetUserBadgesMessageEvent=GetUserBadges +RateRoomMessageEvent=RateRoom +UserDanceMessageEvent=Dance +DropHanditemMessageEvent=RemoveHanditem +GiveHanditemMessageEvent=GiveHanditem +DoorbellAnswerMessageEvent=AnswerDoorbell +RoomLoadByDoorbellMessageEvent=ReqLoadRoomForUser +RoomApplySpaceMessageEvent=ApplyRoomEffect +RoomAddFloorItemMessageEvent=PlaceItem +PickUpItemMessageEvent=TakeItem +FloorItemMoveMessageEvent=MoveItem +WallItemMoveMessageEvent=MoveWallItem +TriggerItemMessageEvent=TriggerItem +UseHabboWheelMessageEvent=TriggerItem +TriggerWallItemMessageEvent=TriggerItem +OpenPostItMessageEvent=OpenPostit +SavePostItMessageEvent=SavePostit +SaveClientSettingsMessageEvent=SaveVolume +RemovePostItMessageEvent=DeletePostit +OpenGiftMessageEvent=OpenPresent +ActivateMoodlightMessageEvent=GetMoodlight +UpdateMoodlightMessageEvent=UpdateMoodlight +TriggerMoodlightMessageEvent=SwitchMoodlightStatus +TradeAddItemOfferMessageEvent=OfferTradeItem +TradeRemoveItemMessageEvent=TakeBackTradeItem +TradeCancelMessageEvent=StopTrade +TradeDiscardMessageEvent=StopTrade +TradeAcceptMessageEvent=AcceptTrade +TradeUnacceptMessageEvent=UnacceptTrade +TradeConfirmMessageEvent=CompleteTrade +GiveRespectMessageEvent=GiveRespect +EffectEnableMessageEvent=EnableEffect +EnterOneWayDoorMessageEvent=TriggerItem +TriggerDiceCloseMessageEvent=TriggerItemDiceSpecial +TriggerDiceRollMessageEvent=TriggerItem +EcotronRecycleMessageEvent=RecycleItems +BotSpeechListMessageEvent=HandleBotSpeechList +ReedemExchangeItemMessageEvent=RedeemExchangeFurni +PlacePetMessageEvent=PlacePet +PetGetInformationMessageEvent=GetPetInfo +PickUpPetMessageEvent=PickUpPet +RespectPetMessageEvent=RespectPet +MovePetMessageEvent=MovePet +CompostMonsterplantMessageEvent=CompostMonsterplant +RoomAddPostItMessageEvent=PlacePostIt +HorseAddSaddleMessageEvent=AddSaddle +HorseRemoveSaddleMessageEvent=RemoveSaddle +HorseMountOnMessageEvent=Ride +UserGetVolumeSettingsMessageEvent=GetVoume +WiredSaveEffectMessageEvent=SaveWired +WiredSaveTriggerMessageEvent=SaveWired +WiredSaveMatchingMessageEvent=SaveWired +WiredSaveConditionMessageEvent=SaveWiredCondition +GetMusicDataMessageEvent=GetMusicData +JukeboxAddPlaylistItemMessageEvent=AddPlaylistItem +JukeboxRemoveSongMessageEvent=RemovePlaylistItem +LoadJukeboxDiscsMessageEvent=GetDisks +GetJukeboxPlaylistsMessageEvent=GetPlaylists +LoadUserProfileMessageEvent=LoadProfile +GetCurrencyBalanceMessageEvent=GetBalance +GetSubscriptionDataMessageEvent=GetSubscriptionData +LoadBadgeInventoryMessageEvent=GetBadges +SetActivatedBadgesMessageEvent=UpdateBadges +OpenAchievementsBoxMessageEvent=GetAchievements +UserUpdateLookMessageEvent=ChangeLook +UserUpdateMottoMessageEvent=ChangeMotto +WardrobeMessageEvent=GetWardrobe +WardrobeUpdateMessageEvent=SaveWardrobe +LoadItemsInventoryMessageEvent=GetInventory +LoadPetInventoryMessageEvent=GetPetsInventory +HorseAllowAllRideMessageEvent=AllowAllRide +SaveRoomBrandingMessageEvent=SaveBranding +LoadBotInventoryMessageEvent=GetBotInv +PlaceBotMessageEvent=PlaceBot +SaveRoomBackgroundTonerMessageEvent=SaveRoomBg +ToggleSittingMessageEvent=Sit +PickUpBotMessageEvent=PickUpBot +NavigatorGetEventsMessageEvent=GetEventRooms +QuestSeasonalStartMessageEvent=StartSeasonalQuest +MannequinSaveDataMessageEvent=SaveMannequin +MannequinUpdateDataMessageEvent=SaveMannequin2 +GetGroupPurchaseBoxMessageEvent=SerializeGroupPurchasePage +GetGroupPurchasingInfoMessageEvent=SerializeGroupPurchaseParts +CreateGuildMessageEvent=PurchaseGroup +GetGroupInfoMessageEvent=SerializeGroupInfo +GetGroupMembersMessageEvent=SerializeGroupMembers +GroupMakeAdministratorMessageEvent=MakeGroupAdmin +RemoveGroupAdminMessageEvent=RemoveGroupAdmin +AcceptGroupRequestMessageEvent=AcceptMembership +GroupDeclineMembershipRequestMessageEvent=DeclineMembership +GroupUserJoinMessageEvent=JoinGroup +SetFavoriteGroupMessageEvent=MakeFav +RemoveFavouriteGroupMessageEvent=RemoveFav +GroupManageMessageEvent=ManageGroup +GroupUpdateNameMessageEvent=UpdateGroupName +GroupUpdateSettingsMessageEvent=UpdateGroupSettings +GroupUpdateColoursMessageEvent=UpdateGroupColours +GroupUpdateBadgeMessageEvent=UpdateGroupBadge +GetGroupFurnitureMessageEvent=SerializeGroupFurniPage +RoomSettingsMuteUserMessageEvent=MuteUser +ChangeUsernameMessageEvent=ChangeName +CheckUsernameMessageEvent=CheckName +GetPetTrainerPanelMessageEvent=GetTrainerPanel +RoomEventUpdateMessageEvent=UpdateEventInfo +GetRoomBannedUsersMessageEvent=GetRoomBannedUsers +RoomUnbanUserMessageEvent=UnbanUser +BotActionsMessageEvent=ManageBotActions +RelationshipsGetMessageEvent=GetRelationships +SetRelationshipMessageEvent=SetRelationship +RoomOnLoadMessageEvent=AutoRoom +RoomSettingsMuteAllMessageEvent=MuteAll +GetRoomRightsListMessageEvent=UsersWithRights +CompleteSafetyQuizMessageEvent=CompleteSafteyQuiz +SaveFootballGateOutfitMessageEvent=SaveFootballOutfit +ConfirmLoveLockMessageEvent=ConfirmLoveLock +PlaceBuildersFurniture=PlaceBuildersFurniture +BuildersClubUpdateFurniCount=BuildersClubUpdateFurniCount +NewNavigatorMessageEvent=NewNavigator +SearchNewNavigatorEvent=SearchNewNavigator +NewNavigatorDeleteSavedSearchEvent=NewNavigatorDeleteSavedSearch +NewNavigatorResizeEvent=NewNavigatorResize +NewNavigatorAddSavedSearchEvent=NewNavigatorAddSavedSearch +NewNavigatorCollapseCategoryEvent=NewNavigatorCollapseCategory +NewNavigatorUncollapseCategoryEvent=NewNavigatorUncollapseCategory +HabboCameraMessageEvent=HabboCamera +GetHelperToolConfigurationMessageEvent=GetHelperTool +OnGuideSessionDetachedMessageEvent=GetGuideDetached +OnGuideMessageEvent=GuideMessage +SetChatPreferenceMessageEvent=SetChatPreferrence +GuideToolMessageNew=MessageFromAGuy +GuideInviteToRoom=InviteGuide +VisitRoomGuides=VisitRoomGuide +GuideEndSession=GuideEndSession +CancellInviteGuide=CancelCallGuide +PetBreedResultMessageEvent=PetBreedResult +PetBreedCancelMessageEvent=PetBreedCancel +GameCenterLoadGameMessageEvent=GameCenterLoadGame +GameCenterJoinQueueMessageEvent=GameCenterJoinQueue +HotelViewCountdownMessageEvent=HotelViewCountdown +HotelViewDailyquestMessageEvent=HotelViewDailyquest +ClickGamesMessageEvent=OnClick +PlaceBuildersWallItemMessageEvent=PlaceBuildersWallItem +PurchaseTargetedOfferMessageEvent=PurchaseTargetedOffer +AmbassadorAlertMessageEvent=AmbassadorAlert +GoToRoomByNameMessageEvent=GoToRoomByName +GetUCPanelMessageEvent=GetUcPanel +GetUCPanelHotelMessageEvent=GetUcPanelHotel +UsePurchasableClothingMessageEvent=UsePurchasableClothing +DeleteHelpTicketMessageEvent=DeletePendingCfh +GetUserLookMessageEvent=GetUserLook +SetInvitationsPreferenceMessageEvent=SetInvitationsPreference +FindMoreFriendsMessageEvent=FindMoreFriends +HotelViewRequestBadgeMessageEvent=HotelViewRequestBadge +GetCameraPriceMessageEvent=GetCameraPrice +ToggleStaffPickMessageEvent=ToggleStaffPick +ConsoleInit=InitMessenger +GetHotelViewHallOfFameMessageEvent=GetHotelViewHallOfFame +SubmitRoomToCompetitionMessageEvent=SubmitRoomToCompetition +VoteForRoomMessageEvent=VoteForRoom +GetCameraRequest=GetCameraRequest +DeleteGroupMessageEvent=DeleteGroup +SaveRoomThumbnailMessageEvent=SaveRoomThumbnail +FriendRequestListLoad=FriendRequestListLoad +UpdateForumSettingsMessageEvent=UpdateForumSettings \ No newline at end of file diff --git a/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.outgoing b/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.outgoing new file mode 100644 index 00000000..4d9692ff --- /dev/null +++ b/Yupi/Build/Variables/Packets/PRODUCTION-201601012205-226667486/PRODUCTION-201601012205-226667486.outgoing @@ -0,0 +1,333 @@ +[INIT] +InitCryptoMessageComposer=675 +SecretKeyMessageComposer=3179 +AuthenticationOKMessageComposer=1442 +UniqueMachineIDMessageComposer=2935 +DisconnectReasonMessageComposer=4000 + +[Landing] +LandingWidgetMessageComposer=3234 +LandingCommunityChallengeMessageComposer=3324 +LandingPromosMessageComposer=3565 +LandingRewardMessageComposer=2639 +SendCampaignBadgeMessageComposer=1548 +HotelViewCountdownMessageComposer=3823 +HotelViewDailyquestMessageComposer=2689 +HotelViewHallOfFameMessageComposer=2048 +CompetitionEntrySubmitResultMessageComposer=3074 +CompetitionVotingInfoMessageComposer=3046 + +[HabboBasicInfo] +UserObjectMessageComposer=1823 +SendPerkAllowancesMessageComposer=2807 +CreditsBalanceMessageComposer=3604 +ActivityPointsMessageComposer=1911 +AchievementPointsMessageComposer=3710 +SubscriptionStatusMessageComposer=2811 +UserClubRightsMessageComposer=1862 +HomeRoomMessageComposer=3175 +EnableTradingMessageComposer=3282 +MinimailCountMessageComposer=1745 +UserProfileMessageComposer=3872 +LoadVolumeMessageComposer=2921 +LoadWardrobeMessageComposer=2760 +ReceiveBadgeMessageComposer=1849 +FigureSetIdsMessageComposer=3469 +LoveLockDialogueMessageComposer=173 +LoveLockDialogueSetLockedMessageComposer=1534 +LoveLockDialogueCloseMessageComposer=5 +NewbieStatusMessageComposer=1581 +IdentityAccountsMessageComposer=947 + +[Navigator] +FlatCategoriesMessageComposer=377 +OfficialRoomsMessageComposer=3664 +NavigatorListingsMessageComposer=234 +FavouriteRoomsUpdateMessageComposer=854 +CanCreateRoomMessageComposer=1237 +PopularRoomTagsMessageComposer=234 +FavouriteRoomsMessageComposer=604 +NavigatorNewFlatCategoriesMessageComposer=-1//error 404 +NavigatorLiftedRoomsComposer=761 +NavigatorMetaDataComposer=371 +NavigatorSavedSearchesComposer=508 +SearchResultSetComposer=815 +NavigatorCategorys=1263 +NewNavigatorSizeMessageComposer=1430 +TargetedOfferMessageComposer=3667 + +[Catalog] +CatalogueIndexMessageComposer=2018 +CataloguePageMessageComposer=3477 +CatalogueClubPageMessageComposer=1500 +CatalogOfferMessageComposer=3848 +CatalogueOfferConfigMessageComposer=3322 +PurchaseOKMessageComposer=2843 +CatalogPurchaseNotAllowedMessageComposer=3016 +CatalogLimitedItemSoldOutMessageComposer=3560 +SellablePetBreedsMessageComposer=1871 +ReloadEcotronMessageComposer=2330 +GiftWrappingConfigurationMessageComposer=3348 +RecyclerRewardsMessageComposer=2457 +CatalogPromotionGetRoomsMessageComposer=2166 +LoadCatalogClubGiftsMessageComposer=1500 +PublishShopMessageComposer=2534 +RecyclingStateMessageComposer=3419 +GiftErrorMessageComposer=934 +RetrieveSongIDMessageComposer=3417 +JukeboxNowPlayingMessageComposer=887 +JukeboxPlaylistMessageComposer=3192 +SongsLibraryMessageComposer=3582 +SongsMessageComposer=523 +VoucherErrorMessageComposer=3670 +VoucherValidMessageComposer=3432 +CatalogPromotionGetCategoriesMessageComposer=1109 +BuildersClubUpdateFurniCountMessageComposer=3424 +BuildersClubMembershipMessageComposer=2357 + +[HabboInventory] +LoadInventoryMessageComposer=2183 +UpdateInventoryMessageComposer=3469 +EffectsInventoryMessageComposer=3310 +NewInventoryObjectMessageComposer=2725 +RemoveInventoryObjectMessageComposer=1903 +LoadBadgesWidgetMessageComposer=154 +BotInventoryMessageComposer=2620 +PetInventoryMessageComposer=3528 +AddEffectToInventoryMessageComposer=1169 +ApplyEffectMessageComposer=2662 +EnableEffectMessageComposer=1710 +StopAvatarEffectMessageComposer=68 + +[Rooms] +InitialRoomInfoMessageComposer=2029 +PrepareRoomMessageComposer=1329 +HeightMapMessageComposer=207 +FloorMapMessageComposer=1112 +HasOwnerRightsMessageComposer=495 +SetRoomUserMessageComposer=2422 +UpdateUserStatusMessageComposer=3153 +RoomSpacesMessageComposer=1328 +RoomChatOptionsMessageComposer=2006 +RoomErrorMessageComposer=169 +RoomDataMessageComposer=2224 +RoomEnterErrorMessageComposer=1864 +RoomEventMessageComposer=2274 +RoomFloorItemsMessageComposer=3521 +RoomFloorWallLevelsMessageComposer=3786 +RoomGroupMessageComposer=2487 +RoomOwnershipMessageComposer=3378 +RoomRatingMessageComposer=3464 +RoomRightsLevelMessageComposer=1425 +LoadRoomRightsListMessageComposer=2410 +RoomBannedListMessageComposer=3580 +RoomSettingsDataMessageComposer=633 +RoomLoadFilterMessageComposer=2169 +RoomSettingsSavedMessageComposer=3737 +SendRoomCampaignFurnitureMessageComposer=817 +RoomForwardMessageComposer=1963 +GroupRoomMessageComposer=1095 +OnCreateRoomInfoMessageComposer=1621 +RoomUpdateMessageComposer=3833 +RoomWallItemsMessageComposer=2335 +DoorbellMessageComposer=162 +DoorbellNoOneMessageComposer=1582 +DoorbellOpenedMessageComposer=1179 +RoomMuteStatusMessageComposer=257 +GetFloorPlanUsedCoordsMessageComposer=2337 +SetFloorPlanDoorMessageComposer=2180 +RoomsQueue=2253 + +[UserRoom] +SpectatorModeMessageComposer=3719 +RoomUserActionMessageComposer=179 +RoomUserIdleMessageComposer=3852 +OutOfRoomMessageComposer=1898 +ApplyHanditemMessageComposer=2623 +ChatMessageComposer=3821 +ShoutMessageComposer=909 +WhisperMessageComposer=2280 +TypingStatusMessageComposer=2854 +DanceStatusMessageComposer=845 +UpdateUserDataMessageComposer=32 +UpdateUserNameMessageComposer=3801 +UserBadgesMessageComposer=1123 +UserLeftRoomMessageComposer=2841 +UserTagsMessageComposer=774 +RelationshipMessageComposer=1589 +FloodFilterMessageComposer=1197 +NameChangedUpdatesMessageComposer=3667 +NotAcceptingRequestsMessageComposer=915 +GiveRoomRightsMessageComposer=1056 +RemoveRightsMessageComposer=1205 +RoomUnbanUserMessageComposer=3472 +GiveRespectsMessageComposer=474 +UpdateAvatarAspectMessageComposer=3632 +UserUpdateNameInRoomMessageComposer=2587 +UserIsPlayingFreezeMessageComposer=2057 +UpdateFreezeLivesMessageComposer=595 +UpdateIgnoreStatusMessageComposer=3882 +TradeAcceptMessageComposer=1367 +TradeCloseMessageComposer=2068 +TradeCompletedMessageComposer=2369 +TradeConfirmationMessageComposer=1959 +TradeStartMessageComposer=2290 +TradeUpdateMessageComposer=2277 + +[RoomItems] +AddFloorItemMessageComposer=505 +AddWallItemMessageComposer=1841 +PickUpFloorItemMessageComposer=85 +PickUpWallItemMessageComposer=762 +DimmerDataMessageComposer=1964 +ItemAnimationMessageComposer=1143 +UpdateFloorItemExtraDataMessageComposer=3250 +UpdateRoomItemMessageComposer=273 +UpdateRoomWallItemMessageComposer=2933 +UpdateFurniStackMapMessageComposer=3251 +UpdateTileStackMagicHeight=1317 +LoadPostItMessageComposer=2338 +OpenGiftMessageComposer=1375 +YouTubeLoadPlaylistsMessageComposer=763 +YouTubeLoadVideoMessageComposer=2374 +RemovePetFromInventoryComposer=3207 + +[RoomWired] +WiredRewardAlertMessageComposer=411 +SaveWiredMessageComposer=3715 +WiredConditionMessageComposer=1456 +WiredEffectMessageComposer=1469 +WiredTriggerMessageComposer=1618 + +[Bots] +BotSpeechListMessageComposer=895 +PetInfoMessageComposer=3913 +PetTrainerPanelMessageComposer=1067 +AddPetExperienceMessageComposer=3779 +CheckPetNameMessageComposer=3019 +SerializePetMessageComposer=560 +RespectPetMessageComposer=-1//error 404 +PetRespectNotificationMessageComposer=3637 +NotifyNewPetLevelMessageComposer=3800 +SendMonsterplantIdMessageComposer=2641 +PetBreedErrorMessageComposer=2674 +PetBreedMessageComposer=616 +PetBreedResultErrorMessageComposer=1747 +PetBreedResultMessageComposer=3465 +PlacePetErrorMessageComposer=444 +GeneralErrorHabboMessageComposer=1533 + +[ModTools] +LoadModerationToolMessageComposer=2545 +ModerationActionResultMessageComposer=1151 +ModerationToolIssueChatlogMessageComposer=766 +ModerationRoomToolMessageComposer=13 +ModerationTicketResponseMessageComposer=1349 +ModerationToolIssueMessageComposer=1275 +ModerationToolRoomVisitsMessageComposer=1101 +ModerationToolUpdateIssueMessageComposer=2541 +ModerationToolUserChatlogMessageComposer=3308 +ModerationToolUserToolMessageComposer=289 +ModerationToolRoomChatlogMessageComposer=1362 +TicketUserAlert=1602 +BroadcastNotifMessageComposer=1279 +AlertNotificationMessageComposer=3446 +MOTDNotificationMessageComposer=1829 +SuperNotificationMessageComposer=2419 +EpicPopupMessageComposer=3502 +CustomUserNotificationMessageComposer=1282 +UsersClassificationMessageComposer=1229 + +[Help] +OpenBullyReportMessageComposer=2094 +BullyReportSentMessageComposer=1804 +OpenHelpToolMessageComposer=3831 +HelperToolConfigurationMessageComposer=224 +OnGuideSessionStartedMessageComposer=1628 +OnGuideSessionPartnerIsTypingMessageComposer=2346 +OnGuideSessionMsgMessageComposer=1355 +OnGuideSessionInvitedToGuideRoomMessageComposer=1642 +OnGuideSessionAttachedMessageComposer=2054 +OnGuideSessionDetachedMessageComposer=733 +OnGuideSessionError=2089 + +[Quests] +SendAchievementsRequirementsMessageComposer=2066 +AchievementListMessageComposer=509 +AchievementProgressMessageComposer=305 +UnlockAchievementMessageComposer=1887 +QuestAbortedMessageComposer=3581 +QuestCompletedMessageComposer=3692 +QuestListMessageComposer=664 +QuestStartedMessageComposer=1477 +ActivityPointsNotificationMessageComposer=606 +CitizenshipStatusMessageComposer=2382 +TalentLevelUpMessageComposer=3538 +TalentsTrackMessageComposer=3614 + +[Friends] +ConsoleChatErrorMessageComposer=2964 +ConsoleChatMessageComposer=3942 +ConsoleInvitationMessageComposer=3942 +ConsoleSearchFriendMessageComposer=214 +ConsoleSendFriendRequestMessageComposer=2981 +LoadFriendsMessageComposer=3394 +LoadFriendsCategories=391 +FollowFriendErrorMessageComposer=1170 +FriendRequestsMessageComposer=2757 +FriendUpdateMessageComposer=1611 +FindMoreFriendsSuccessMessageComposer=3763 + +[Groups] +ChangeFavouriteGroupMessageComposer=3685 +FavouriteGroupMessageComposer=382 +GroupDataEditMessageComposer=2653 +GroupDataMessageComposer=3160 +GroupFurniturePageMessageComposer=418 +GroupMembersMessageComposer=2297 +GroupPurchasePageMessageComposer=1232 +GroupPurchasePartsMessageComposer=2519 +GroupAreYouSureMessageComposer=2327 +GroupConfirmLeaveMessageComposer=423 +GroupRequestReloadMessageComposer=3197 +GroupForumListingsMessageComposer=3596 +GroupForumDataMessageComposer=254 +GroupForumThreadRootMessageComposer=1538 +GroupForumThreadUpdateMessageComposer=3226 +GroupForumNewThreadMessageComposer=3683 +GroupForumNewResponseMessageComposer=1936 +GroupForumReadThreadMessageComposer=879 +GroupDeletedMessageComposer=756 + +[Games] +GameCenterGamesListMessageComposer=2481 +GameCenterGameAchievementsMessageComposer=1264 +GameCenterLeaderboardMessageComposer=3124 +GameCenterLeaderboard2MessageComposer=1127 +GameCenterGamesLeftMessageComposer=139 +GameCenterPreviousWinnerMessageComposer=1447 +GameCenterProductsMessageComposer=1577 +GameCenterAllAchievementsMessageComposer=890 +GameCenterEnterInGameMessageComposer=549 +GameCenterJoinGameQueueMessageComposer=749 +GameCenterLoadGameUrlMessageComposer=436 + +[Polls] +PollQuestionsMessageComposer=1307 +SuggestPollMessageComposer=522 +MatchingPollMessageComposer=1719 +MatchingPollAnsweredMessageComposer=16 +MatchingPollResultMessageComposer=3684 + +[Other] +EnableNotificationsMessageComposer=2468 +NuxSuggestFreeGiftsMessageComposer=542 +NuxListGiftsMessageComposer=1773 +LatencyTestResponseMessageComposer=3014 +PingMessageComposer=624 +SetCameraPriceMessageComposer=680 +GenericErrorMessageComposer=1072 +InternalLinkMessageComposer=3745 +CameraStorageUrlMessageComposer=550 +CameraPurchaseOk=3908 +ThumbnailSuccessMessageComposer=849 diff --git a/Yupi/Build/Variables/Settings/main.ini b/Yupi/Build/Variables/Settings/main.ini index 60acd6e3..de788d99 100644 --- a/Yupi/Build/Variables/Settings/main.ini +++ b/Yupi/Build/Variables/Settings/main.ini @@ -1,7 +1,7 @@ -## Yupi Server Settings +## Yupi Server Main Settings ## MySQL Configuration -db.hostname=172.16.9.102 +db.hostname=172.16.9.59 db.port=3306 db.username=azure db.password=123 @@ -17,26 +17,35 @@ game.tcp.port=30000 game.tcp.conlimit=11000 game.tcp.enablenagles=true +## Game Thread Configuration +game.multithread.enabled=true + ## Tcp Flood AntiDDoS Comment: For proxy antiddos=false game.tcp.antiddos=false game.tcp.conperip=30 +## Bots Settings +game.roomswithbotscolor=0 +game.botdefaultcolor=31 +game.botbadge=BOT + +## Client Release Version +client.build=PRODUCTION-201510201205-42435347 + ## Client configuration client.ping.enabled=1 client.ping.interval=20000 client.maxrequests=300 -## Developer Settings -Debug=false +## Client Thread Configuration +client.multithread.enabled=true + +## Debug Packet Data +debug.packet=true ## Language System -system.lang=english +server.lang=english ## Console Clear Timer console.clear.enabled=false console.clear.time=20000 - -## Bots Settings -game.roomswithbotscolor=0 -game.botdefaultcolor=31 -game.botbadge=BOT diff --git a/Yupi/Build/Variables/Settings/other.ini b/Yupi/Build/Variables/Settings/other.ini index 08415bfd..99d52fac 100644 --- a/Yupi/Build/Variables/Settings/other.ini +++ b/Yupi/Build/Variables/Settings/other.ini @@ -1,36 +1,35 @@ -# Azure ExtraSettings # +## Yupi Server Other Extra Settings -# CRYPTO. Only for powerful servers. +## RC4 Client Side (ARC4) Beta rc4.client.side.enabled=false -# Credits/Pixels Loop +## Currency Loop Settings currency.loop.enabled=true currency.loop.time.in.minutes=15 + +## Amount of Credits to Give credits.to.give=3000 + +## Amount of Pixels to Give pixels.to.give=100 -# Diamonds Loop +# Diamonds Loop Settings diamonds.loop.enabled=true +diamonds.vip.only=false + +## Amount of Diamonds to Give diamonds.to.give=1 -diamonds.vip.only=true -# Change Name Settings # +## User able to Change Name Settings change.name.staff=false change.name.vip=false change.name.everyone=false -# Beta stuff and NUX gifts # -enable.beta.camera=true -newuser.gifts.enabled=false -newuser.gift.yttv2.id= - -# Stories API # +## Habbo Camera Settings +stories.api.enabled=true stories.api.url=http://azure-stories-content.azurewebsites.net/servercamera.php stories.api.host=http://azure-stories-content.azurewebsites.net/ stories.api.thumbnail.url=http://azure-stories-content.azurewebsites.net/servert.php -# Interactive stuff # -everyone.use.floor=true -admin.can.useHTML=true -furnidata.url=http://www.maniahotel.com.br/source/gamedata/furnidata_xml/furnidata_xml.xml -youtube.thumbnail.suburl=youtubethumbnail.php?Video \ No newline at end of file +## Furniture (ex: furnidata_xml.xml) XML File URL +furnidata.url=http://172.16.9.55/extractor/swf/gamedata/furnidata_xml/1 diff --git a/Yupi/Core/Settings/ServerExtraSettings.cs b/Yupi/Core/Settings/ServerExtraSettings.cs index 55777c66..5f92bb6e 100644 --- a/Yupi/Core/Settings/ServerExtraSettings.cs +++ b/Yupi/Core/Settings/ServerExtraSettings.cs @@ -178,10 +178,6 @@ internal static bool RunExtraSettings() CurrencyLoopEnabled = settingsParameters[1] == "true"; break; - case "youtube.thumbnail.suburl": - YoutubeThumbnailSuburl = settingsParameters[1]; - break; - case "gamecenter.stories.url": GameCenterStoriesUrl = settingsParameters[1]; break; @@ -230,36 +226,20 @@ internal static bool RunExtraSettings() ChangeNameEveryone = settingsParameters[1] == "true"; break; - case "enable.beta.camera": + case "stories.api.enabled": EnableBetaCamera = settingsParameters[1] == "true"; break; - case "newuser.gifts.enabled": - NewUsersGiftsEnabled = settingsParameters[1] == "true"; - break; - case "newuser.gift.yttv2.id": uint u; if (uint.TryParse(settingsParameters[1], out u)) NewUserGiftYttv2Id = u; break; - case "everyone.use.floor": - EveryoneUseFloor = settingsParameters[1] == "true"; - break; - - case "figuredata.url": - FigureDataUrl = settingsParameters[1]; - break; - case "furnidata.url": FurnitureDataUrl = settingsParameters[1]; break; - case "admin.can.useHTML": - AdminCanUseHtml = settingsParameters[1] == "true"; - break; - case "commands.new.page": NewPageCommands = settingsParameters[1] == "true"; break; diff --git a/Yupi/Data/ServerCPULowPriorityWorker.cs b/Yupi/Data/ServerCPULowPriorityWorker.cs index bf111497..6a0057cf 100644 --- a/Yupi/Data/ServerCPULowPriorityWorker.cs +++ b/Yupi/Data/ServerCPULowPriorityWorker.cs @@ -68,21 +68,28 @@ internal static void Process() try { + int realOnlineClientCount = Yupi.GetGame().GetClientManager().GetOnlineClients(); int clientCount = Yupi.GetGame().GetClientManager().ClientCount(); + + if (realOnlineClientCount != clientCount) + Writer.WriteLine("Number of Clients isn't Equal of Online Users. Running Analysis", "Yupi.Game", ConsoleColor.DarkYellow); + + //if (realOnlineClientCount != clientCount) + // Yupi.GetGame().GetClientManager().RemoveNotOnlineUsers(); + int loadedRoomsCount = Yupi.GetGame().GetRoomManager().LoadedRoomsCount; + DateTime dateTime = new DateTime((DateTime.Now - Yupi.ServerStarted).Ticks); - Console.Title = string.Concat("Yupi | UpTime: ", - int.Parse(dateTime.ToString("dd")) - 1 + dateTime.ToString(":HH:mm:ss"), " | Users: ", - clientCount, " | Rooms: ", loadedRoomsCount); + Console.Title = string.Concat("Yupi | Time: ", int.Parse(dateTime.ToString("dd")) - 1, "d:", dateTime.ToString("HH"), "h:", dateTime.ToString("mm"), "m | Conn: ", clientCount," | Users: ", realOnlineClientCount, " | Rooms: ", loadedRoomsCount); using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { - if (clientCount > _userPeak) - _userPeak = clientCount; + if (clientCount > _userPeak || realOnlineClientCount > _userPeak) + _userPeak = realOnlineClientCount; queryReactor.RunFastQuery(string.Concat("UPDATE server_status SET stamp = '", - Yupi.GetUnixTimeStamp(), "', users_online = ", clientCount, ", rooms_loaded = ", + Yupi.GetUnixTimeStamp(), "', users_online = ", realOnlineClientCount, ", rooms_loaded = ", loadedRoomsCount, ", server_ver = 'Yupi Emulator', userpeak = ", _userPeak)); } diff --git a/Yupi/Game/Catalogs/CatalogManager.cs b/Yupi/Game/Catalogs/CatalogManager.cs index c77d278b..cbae0eaf 100644 --- a/Yupi/Game/Catalogs/CatalogManager.cs +++ b/Yupi/Game/Catalogs/CatalogManager.cs @@ -103,29 +103,31 @@ internal class CatalogManager /// The color. /// The rarity. /// Pet. - internal static Pet CreatePet(uint userId, string name, int type, string race, string color, int rarity = 0) + internal static Pet CreatePet(uint userId, string name, string type, string race, string color, int rarity = 0) { - Pet pet = new Pet(404u, userId, 0u, name, (uint) type, race, color, 0, 100, 150, 0, Yupi.GetUnixTimeStamp(), 0, 0, 0.0, false, 0, 0, -1, rarity, DateTime.Now.AddHours(36.0), DateTime.Now.AddHours(48.0), null) + Console.WriteLine("Race: " + race); + + uint trace = Convert.ToUInt32(race); + + Pet pet = new Pet(404u, userId, 0u, name, type, trace, 0, 100, 150, 0, Yupi.GetUnixTimeStamp(), 0, 0, 0.0, false, 0, 0, -1, rarity, DateTime.Now.AddHours(36.0), DateTime.Now.AddHours(48.0), null, color) { DbState = DatabaseUpdateState.NeedsUpdate }; using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { - queryReactor.SetQuery($"INSERT INTO bots_data (user_id, name, ai_type) VALUES ('{pet.OwnerId}', @{$"{pet.PetId}name"}, 'pet')"); - - queryReactor.AddParameter($"{pet.PetId}name", pet.Name); + queryReactor.SetQuery("INSERT INTO pets_data (user_id, name, ai_type, pet_type, race_id, experience, energy, createstamp, rarity, lasthealth_stamp, untilgrown_stamp, color) " + + $"VALUES ('{pet.OwnerId}', @petName, 'pet', @petType, @petRace, 0, 100, UNIX_TIMESTAMP(), '{rarity}', UNIX_TIMESTAMP(now() + INTERVAL 36 HOUR), UNIX_TIMESTAMP(now() + INTERVAL 48 HOUR), @petColor)"); - pet.PetId = (uint)queryReactor.InsertQuery(); + queryReactor.AddParameter("petName", pet.Name); + queryReactor.AddParameter("petType", pet.Type); + queryReactor.AddParameter("petRace", pet.Race); + queryReactor.AddParameter("petColor", pet.Color); - queryReactor.SetQuery(string.Concat("INSERT INTO pets_data (id,type,race,color,experience,energy,createstamp,rarity,lasthealth_stamp,untilgrown_stamp) VALUES (", pet.PetId, ", ", pet.Type, ",@", pet.PetId, "race,@", pet.PetId, "color,0,100,UNIX_TIMESTAMP(), ", rarity, ", UNIX_TIMESTAMP(now() + INTERVAL 36 HOUR), UNIX_TIMESTAMP(now() + INTERVAL 48 HOUR))")); - - queryReactor.AddParameter($"{pet.PetId}race", pet.Race); - queryReactor.AddParameter($"{pet.PetId}color", pet.Color); queryReactor.RunQuery(); } - if (pet.Type == 16u) + if (pet.Type == "pet_monster") { pet.MoplaBreed = MoplaBreed.CreateMonsterplantBreed(pet); pet.Name = pet.MoplaBreed.Name; @@ -144,13 +146,12 @@ internal static Pet CreatePet(uint userId, string name, int type, string race, s /// Generates the pet from row. /// /// The row. - /// The m row. /// Pet. - internal static Pet GeneratePetFromRow(DataRow row, DataRow mRow) + internal static Pet GeneratePetFromRow(DataRow row) { MoplaBreed moplaBreed = null; - if (Convert.ToUInt32(mRow["type"]) == 16u) + if ((string)row["pet_type"] == "pet_monster") { using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { @@ -163,13 +164,13 @@ internal static Pet GeneratePetFromRow(DataRow row, DataRow mRow) } return new Pet(Convert.ToUInt32(row["id"]), Convert.ToUInt32(row["user_id"]), - Convert.ToUInt32(row["room_id"]), (string)row["name"], Convert.ToUInt32(mRow["type"]), - (string)mRow["race"], (string)mRow["color"], (int)mRow["experience"], (int)mRow["energy"], - (int)mRow["nutrition"], (int)mRow["respect"], Convert.ToDouble(mRow["createstamp"]), (int)row["x"], - (int)row["y"], Convert.ToDouble(row["z"]), (int)mRow["have_saddle"] == 1, (int)mRow["anyone_ride"], - (int)mRow["hairdye"], (int)mRow["pethair"], (int)mRow["rarity"], - Yupi.UnixToDateTime((int)mRow["lasthealth_stamp"]), - Yupi.UnixToDateTime((int)mRow["untilgrown_stamp"]), moplaBreed); + Convert.ToUInt32(row["room_id"]), (string)row["name"], (string)row["pet_type"], + (uint)row["race_id"], (uint)row["experience"], (uint)row["energy"], + (uint)row["nutrition"], (uint)row["respect"], Convert.ToDouble(row["createstamp"].ToString()), (int)row["x"], + (int)row["y"], Convert.ToDouble(row["z"]), Convert.ToInt32(row["have_saddle"].ToString()) == 1, Convert.ToInt32(row["anyone_ride"].ToString()), + (int)row["hairdye"], (int)row["pethair"], (int)row["rarity"], + Yupi.UnixToDateTime((int)row["lasthealth_stamp"]), + Yupi.UnixToDateTime((int)row["untilgrown_stamp"]), moplaBreed, (string)row["color"]); } /// @@ -416,10 +417,10 @@ internal void HandlePurchase(GameClient session, uint pageId, uint itemId, strin } #endregion - #region Check if is a Pet. If is we have problem. + #region Check if is a Pet. If is we have problem. WHY? - if (item.Items.Keys.Any(current => InteractionTypes.AreFamiliar(GlobalInteractions.Pet, current.InteractionType))) - return; + //if (item.Items.Keys.Any(current => InteractionTypes.AreFamiliar(GlobalInteractions.Pet, current.InteractionType))) + // return; #endregion @@ -677,17 +678,6 @@ internal void HandlePurchase(GameClient session, uint pageId, uint itemId, strin case Interaction.PetPigeon: case Interaction.PetEvilPigeon: case Interaction.PetDemonMonkey: - case Interaction.Pet24: - case Interaction.Pet25: - case Interaction.Pet26: - case Interaction.Pet27: - case Interaction.Pet28: - case Interaction.Pet29: - case Interaction.Pet30: - case Interaction.Pet31: - case Interaction.Pet32: - case Interaction.Pet33: - case Interaction.Pet34: string[] data = extraData.Split('\n'); string petName = data[0]; string race = data[1]; @@ -951,21 +941,9 @@ internal List DeliverItems(GameClient session, Item item, uint amount, case Interaction.PetPigeon: case Interaction.PetEvilPigeon: case Interaction.PetDemonMonkey: - case Interaction.Pet24: - case Interaction.Pet25: - case Interaction.Pet26: - case Interaction.Pet27: - case Interaction.Pet28: - case Interaction.Pet29: - case Interaction.Pet30: - case Interaction.Pet31: - case Interaction.Pet32: - case Interaction.Pet33: - case Interaction.Pet34: string[] petData = extraData.Split('\n'); - int petId = int.Parse(item.Name.Replace("a0 pet", string.Empty)); - Pet generatedPet = CreatePet(session.GetHabbo().Id, petData[0], petId, petData[1], - petData[2]); + + Pet generatedPet = CreatePet(session.GetHabbo().Id, petData[0], item.Name, petData[1], petData[2]); session.GetHabbo().GetInventoryComponent().AddPet(generatedPet); diff --git a/Yupi/Game/Catalogs/Composers/CatalogPageComposer.cs b/Yupi/Game/Catalogs/Composers/CatalogPageComposer.cs index 22e41fef..9d74e91c 100644 --- a/Yupi/Game/Catalogs/Composers/CatalogPageComposer.cs +++ b/Yupi/Game/Catalogs/Composers/CatalogPageComposer.cs @@ -5,6 +5,7 @@ using Yupi.Game.GameClients.Interfaces; using Yupi.Game.Items.Interactions.Enums; using Yupi.Game.Items.Interfaces; +using Yupi.Game.Pets; using Yupi.Messages; using Yupi.Messages.Parsers; @@ -592,7 +593,13 @@ internal static ServerMessage PurchaseOk(uint itemId, string itemName, uint cred internal static void ComposeItem(CatalogItem item, ServerMessage message) { message.AppendInteger(item.Id); - message.AppendString(item.Name, true); + + string displayName = item.Name; + + if (PetTypeManager.ItemIsPet(item.Name)) + displayName = PetTypeManager.GetHabboPetType(item.Name); + + message.AppendString(displayName, true); message.AppendBool(false); message.AppendInteger(item.CreditsCost); diff --git a/Yupi/Game/Game.cs b/Yupi/Game/Game.cs index 9e09f935..b492d6a4 100644 --- a/Yupi/Game/Game.cs +++ b/Yupi/Game/Game.cs @@ -441,7 +441,7 @@ internal void ContinueLoading() { int catalogPageLoaded; - PetRace.Init(queryReactor); + PetTypeManager.Init(queryReactor); _catalog.Initialize(queryReactor, out catalogPageLoaded); diff --git a/Yupi/Game/GameClients/GameClientManager.cs b/Yupi/Game/GameClients/GameClientManager.cs index 37eb276b..e363fca4 100644 --- a/Yupi/Game/GameClients/GameClientManager.cs +++ b/Yupi/Game/GameClients/GameClientManager.cs @@ -103,6 +103,24 @@ internal GameClientManager() /// GameClient. internal GameClient GetClient(uint clientId) => Clients.ContainsKey(clientId) ? Clients[clientId] : null; + internal bool CheckClientOnlineStatus(uint clientId) + { + GameClient client = GetClient(clientId); + + if (client != null) + return client.GetHabbo().Disconnected; + + return false; + } + + internal void RemoveNotOnlineUsers() + { + foreach (GameClient client in Clients.Values.Where(client => !CheckClientOnlineStatus(client.ConnectionId))) + client.Disconnect("Isn't Online..."); + } + + internal int GetOnlineClients() => Clients.Values.Count(client => !CheckClientOnlineStatus(client.ConnectionId)); + /// /// Gets the name by identifier. /// diff --git a/Yupi/Game/GameClients/Interfaces/GameClient.cs b/Yupi/Game/GameClients/Interfaces/GameClient.cs index cd613170..eeca6e90 100644 --- a/Yupi/Game/GameClients/Interfaces/GameClient.cs +++ b/Yupi/Game/GameClients/Interfaces/GameClient.cs @@ -322,9 +322,6 @@ internal bool TryLogin(string authTicket) queuedServerMessage.AppendResponse(Yupi.GetGame().GetAchievementManager().AchievementDataCached); - if (!GetHabbo().NuxPassed && ServerExtraSettings.NewUsersGiftsEnabled) - queuedServerMessage.AppendResponse( new ServerMessage(LibraryParser.OutgoingRequest("NuxSuggestFreeGiftsMessageComposer"))); - queuedServerMessage.AppendResponse(GetHabbo().GetAvatarEffectsInventoryComponent().GetPacket()); queuedServerMessage.SendResponse(); diff --git a/Yupi/Game/Items/Interactions/Enums/Interaction.cs b/Yupi/Game/Items/Interactions/Enums/Interaction.cs index 0bc89f27..8ea7e7c1 100644 --- a/Yupi/Game/Items/Interactions/Enums/Interaction.cs +++ b/Yupi/Game/Items/Interactions/Enums/Interaction.cs @@ -240,32 +240,6 @@ public enum Interaction /// PetDemonMonkey, // pet 23 - /// - /// The pet24 - /// - Pet24, - - /// - /// The pet25 - /// - Pet25, - - /// - /// The pet26 - /// - Pet26, - - // New Pets - Pet27, - - Pet28, - Pet29, - Pet30, - Pet31, - Pet32, - Pet33, - Pet34, - /// /// The ice skates /// diff --git a/Yupi/Game/Items/Interactions/InteractionTypes.cs b/Yupi/Game/Items/Interactions/InteractionTypes.cs index 463417bf..a3d3d08c 100644 --- a/Yupi/Game/Items/Interactions/InteractionTypes.cs +++ b/Yupi/Game/Items/Interactions/InteractionTypes.cs @@ -99,17 +99,6 @@ internal static bool AreFamiliar(GlobalInteractions type, Interaction subType) case Interaction.PetPigeon: case Interaction.PetEvilPigeon: case Interaction.PetDemonMonkey: - case Interaction.Pet24: - case Interaction.Pet25: - case Interaction.Pet26: - case Interaction.Pet27: - case Interaction.Pet28: - case Interaction.Pet29: - case Interaction.Pet30: - case Interaction.Pet31: - case Interaction.Pet32: - case Interaction.Pet33: - case Interaction.Pet34: return true; } break; @@ -286,111 +275,78 @@ internal static Interaction GetTypeFromString(string pType) case "fbgate": return Interaction.FootballGate; - case "pet0": + case "pet_dog": return Interaction.PetDog; - case "pet1": + case "pet_cat": return Interaction.PetCat; - case "pet2": + case "pet_croco": return Interaction.PetCrocodile; - case "pet3": + case "pet_terrier": return Interaction.PetTerrier; - case "pet4": + case "pet_bear": return Interaction.PetBear; - case "pet5": + case "pet_pig": return Interaction.PetPig; - case "pet6": + case "pet_lion": return Interaction.PetLion; - case "pet7": + case "pet_rhino": return Interaction.PetRhino; - case "pet8": + case "pet_spider": return Interaction.PetSpider; - case "pet9": + case "pet_turtle": return Interaction.PetTurtle; - case "pet10": + case "pet_chicken": return Interaction.PetChick; - case "pet11": + case "pet_frog": return Interaction.PetFrog; - case "pet12": + case "pet_dragon": return Interaction.PetDragon; - case "pet13": + case "pet_horse": return Interaction.PetHorse; - case "pet14": + case "pet_monkey": return Interaction.PetMonkey; - case "pet15": + case "pet_gnomo": return Interaction.PetGnomo; - case "pet16": + case "pet_monster": return Interaction.PetMonsterPlant; - case "pet17": + case "pet_bunnyeaster": return Interaction.PetWhiteRabbit; - case "pet18": + case "pet_bunnyevil": return Interaction.PetEvilRabbit; - case "pet19": + case "pet_bunnylove": return Interaction.PetLoveRabbit; - case "pet20": + case "pet_bunnydepressed": return Interaction.PetCafeRabbit; - case "pet21": + case "pet_pigeongood": return Interaction.PetPigeon; - case "pet22": + case "pet_pigeonevil": return Interaction.PetEvilPigeon; - case "pet23": + case "pet_demonmonkey": return Interaction.PetDemonMonkey; - case "pet24": - return Interaction.Pet24; - - case "pet25": - return Interaction.Pet25; - - case "pet26": - return Interaction.Pet26; - - case "pet27": - return Interaction.Pet27; - - case "pet28": - return Interaction.Pet28; - - case "pet29": - return Interaction.Pet29; - - case "pet30": - return Interaction.Pet30; - - case "pet31": - return Interaction.Pet31; - - case "pet32": - return Interaction.Pet32; - - case "pet33": - return Interaction.Pet33; - - case "pet34": - return Interaction.Pet34; - case "iceskates": return Interaction.IceSkates; diff --git a/Yupi/Game/Items/Interfaces/RoomItem.cs b/Yupi/Game/Items/Interfaces/RoomItem.cs index 18422de9..6adcde52 100644 --- a/Yupi/Game/Items/Interfaces/RoomItem.cs +++ b/Yupi/Game/Items/Interfaces/RoomItem.cs @@ -1416,37 +1416,52 @@ internal void UpdateState() /// if set to true [in room]. internal void UpdateState(bool inDb, bool inRoom) { - if (GetRoom() == null) return; - string s = ExtraData; + if (GetRoom() == null) + return; + + string localExtraData = ExtraData; + if (GetBaseItem().InteractionType == Interaction.MysteryBox) { using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { queryReactor.SetQuery($"SELECT extra_data FROM items_rooms WHERE id={Id} LIMIT 1"); + ExtraData = queryReactor.GetString(); } + if (ExtraData.Contains(Convert.ToChar(5).ToString())) { - int num = int.Parse(ExtraData.Split(Convert.ToChar(5))[0]), - num2 = int.Parse(ExtraData.Split(Convert.ToChar(5))[1]); - s = (3 * num - num2).ToString(); + int num = int.Parse(ExtraData.Split(Convert.ToChar(5))[0]); + int num2 = int.Parse(ExtraData.Split(Convert.ToChar(5))[1]); + + localExtraData = (3 * num - num2).ToString(); } } - if (inDb) GetRoom().GetRoomItemHandler().AddOrUpdateItem(Id); - if (!inRoom) return; + + if (inDb) + GetRoom().GetRoomItemHandler().AddOrUpdateItem(Id); + + if (!inRoom) + return; + ServerMessage serverMessage = new ServerMessage(0); + if (IsFloorItem) { serverMessage.Init(LibraryParser.OutgoingRequest("UpdateFloorItemExtraDataMessageComposer")); serverMessage.AppendString(Id.ToString()); + switch (GetBaseItem().InteractionType) { case Interaction.Mannequin: serverMessage.AppendInteger(1); serverMessage.AppendInteger(3); + if (ExtraData.Contains(Convert.ToChar(5).ToString())) { string[] array = ExtraData.Split(Convert.ToChar(5)); + serverMessage.AppendString("GENDER"); serverMessage.AppendString(array[0]); serverMessage.AppendString("FIGURE"); @@ -1457,16 +1472,17 @@ internal void UpdateState(bool inDb, bool inRoom) else { serverMessage.AppendString("GENDER"); - serverMessage.AppendString(""); + serverMessage.AppendString(string.Empty); serverMessage.AppendString("FIGURE"); - serverMessage.AppendString(""); + serverMessage.AppendString(string.Empty); serverMessage.AppendString("OUTFIT_NAME"); - serverMessage.AppendString(""); + serverMessage.AppendString(string.Empty); } break; case Interaction.Pinata: serverMessage.AppendInteger(7); + if (ExtraData.Length <= 0) { serverMessage.AppendString("6"); @@ -1482,7 +1498,9 @@ internal void UpdateState(bool inDb, bool inRoom) break; case Interaction.WiredHighscore: - if (HighscoreData == null) HighscoreData = new HighscoreData(this); + if (HighscoreData == null) + HighscoreData = new HighscoreData(this); + HighscoreData.GenerateExtraData(this, serverMessage); break; @@ -1494,12 +1512,12 @@ internal void UpdateState(bool inDb, bool inRoom) serverMessage.AppendInteger(1); serverMessage.AppendInteger(1); serverMessage.AppendString("THUMBNAIL_URL"); - serverMessage.AppendString(ServerExtraSettings.YoutubeThumbnailSuburl + s); + serverMessage.AppendString(localExtraData); break; default: serverMessage.AppendInteger(0); - serverMessage.AppendString(s); + serverMessage.AppendString(localExtraData); break; } } @@ -1508,6 +1526,7 @@ internal void UpdateState(bool inDb, bool inRoom) serverMessage.Init(LibraryParser.OutgoingRequest("UpdateRoomWallItemMessageComposer")); Serialize(serverMessage); } + GetRoom().SendMessage(serverMessage); } @@ -1560,18 +1579,20 @@ internal void Serialize(ServerMessage message) break; case Interaction.YoutubeTv: + message.AppendInteger(0); - if (ExtraData == "") + + if (ExtraData == string.Empty) { message.AppendInteger(0); - message.AppendString(""); + message.AppendString(string.Empty); } else { message.AppendInteger(1); message.AppendInteger(1); message.AppendString("THUMBNAIL_URL"); - message.AppendString(ServerExtraSettings.YoutubeThumbnailSuburl + ExtraData); + message.AppendString(ExtraData); } break; diff --git a/Yupi/Game/Items/ItemManager.cs b/Yupi/Game/Items/ItemManager.cs index b8bbe768..7ccda03a 100644 --- a/Yupi/Game/Items/ItemManager.cs +++ b/Yupi/Game/Items/ItemManager.cs @@ -127,7 +127,7 @@ internal void LoadItems(IQueryAdapter dbClient) sprite = FurnitureDataManager.WallItems[name].Id; publicName = FurnitureDataManager.WallItems[name].Name; } - else if (name.StartsWith("a0 pet", StringComparison.InvariantCulture)) + else if ((name.StartsWith("pet_") || publicName.StartsWith("pet_")) && InteractionTypes.AreFamiliar(GlobalInteractions.Pet, typeFromString)) { x = 1; y = 1; diff --git a/Yupi/Game/Pets/Composers/PetCommandPanelComposer.cs b/Yupi/Game/Pets/Composers/PetCommandPanelComposer.cs new file mode 100644 index 00000000..f1e33656 --- /dev/null +++ b/Yupi/Game/Pets/Composers/PetCommandPanelComposer.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using Yupi.Game.GameClients.Interfaces; +using Yupi.Game.Pets.Structs; +using Yupi.Messages; +using Yupi.Messages.Parsers; + +namespace Yupi.Game.Pets.Composers +{ + class PetCommandPanelComposer + { + internal static void GenerateMessage(Pet pet, Dictionary totalPetCommands, Dictionary petCommands, GameClient owner) + { + ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("PetTrainerPanelMessageComposer")); + + serverMessage.AppendInteger(pet.PetId); + + serverMessage.AppendInteger(totalPetCommands.Count); + + foreach (uint sh in totalPetCommands.Keys) + serverMessage.AppendInteger(sh); + + serverMessage.AppendInteger(petCommands.Count); + + foreach (uint sh in petCommands.Keys) + serverMessage.AppendInteger(sh); + + owner.SendMessage(serverMessage); + } + } +} diff --git a/Yupi/Game/Pets/Composers/PetExperienceComposer.cs b/Yupi/Game/Pets/Composers/PetExperienceComposer.cs new file mode 100644 index 00000000..35aaaef7 --- /dev/null +++ b/Yupi/Game/Pets/Composers/PetExperienceComposer.cs @@ -0,0 +1,18 @@ +using Yupi.Messages; +using Yupi.Messages.Parsers; + +namespace Yupi.Game.Pets.Composers +{ + class PetExperienceComposer + { + internal static void GenerateMessage(Pet pet, uint amount) + { + ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("AddPetExperienceMessageComposer")); + + serverMessage.AppendInteger(pet.PetId); + serverMessage.AppendInteger(pet.VirtualId); + serverMessage.AppendInteger(amount); + pet.Room.SendMessage(serverMessage); + } + } +} diff --git a/Yupi/Game/Pets/Composers/PetInformationComposer.cs b/Yupi/Game/Pets/Composers/PetInformationComposer.cs new file mode 100644 index 00000000..8e5b9034 --- /dev/null +++ b/Yupi/Game/Pets/Composers/PetInformationComposer.cs @@ -0,0 +1,100 @@ +using System; +using Yupi.Game.Pets.Enums; +using Yupi.Messages; +using Yupi.Messages.Parsers; + +namespace Yupi.Game.Pets.Composers +{ + class PetInformationComposer + { + internal static ServerMessage GenerateMessage(Pet pet) + { + ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("PetInfoMessageComposer")); + + serverMessage.AppendInteger(pet.PetId); + serverMessage.AppendString(pet.Name); + + if (pet.Type == "pet_monster") + { + serverMessage.AppendInteger(pet.MoplaBreed.GrowingStatus); + serverMessage.AppendInteger(7); + } + else + { + serverMessage.AppendInteger(pet.Level); + serverMessage.AppendInteger(Pet.MaxLevel); + } + + serverMessage.AppendInteger(pet.Experience); + serverMessage.AppendInteger(pet.ExperienceGoal); + serverMessage.AppendInteger(pet.Energy); + serverMessage.AppendInteger(Pet.MaxEnergy); + serverMessage.AppendInteger(pet.Nutrition); + serverMessage.AppendInteger(Pet.MaxNutrition); + serverMessage.AppendInteger(pet.Respect); + serverMessage.AppendInteger(pet.OwnerId); + serverMessage.AppendInteger(pet.Age); + serverMessage.AppendString(pet.OwnerName); + serverMessage.AppendInteger(pet.Type == "pet_monster" ? 0 : 1); + serverMessage.AppendBool(pet.HaveSaddle); + serverMessage.AppendBool(false); + serverMessage.AppendInteger(0); + serverMessage.AppendInteger(pet.AnyoneCanRide); + + if (pet.Type == "pet_monster") + serverMessage.AppendBool(pet.MoplaBreed.LiveState == MoplaState.Grown); + else + serverMessage.AppendBool(false); + + serverMessage.AppendBool(false); + + if (pet.Type == "pet_monster") + serverMessage.AppendBool(pet.MoplaBreed.LiveState == MoplaState.Dead); + else + serverMessage.AppendBool(false); + + serverMessage.AppendInteger(pet.Rarity); + + if (pet.Type == "pet_monster") + { + serverMessage.AppendInteger(129600); + int lastHealthSeconds = (int)(pet.LastHealth - DateTime.Now).TotalSeconds; + int untilGrownSeconds = (int)(pet.UntilGrown - DateTime.Now).TotalSeconds; + + if (lastHealthSeconds < 0) + lastHealthSeconds = 0; + + if (untilGrownSeconds < 0) + untilGrownSeconds = 0; + + switch (pet.MoplaBreed.LiveState) + { + case MoplaState.Dead: + serverMessage.AppendInteger(0); + serverMessage.AppendInteger(0); + break; + + case MoplaState.Grown: + serverMessage.AppendInteger(lastHealthSeconds); + serverMessage.AppendInteger(0); + break; + + default: + serverMessage.AppendInteger(lastHealthSeconds); + serverMessage.AppendInteger(untilGrownSeconds); + break; + } + } + else + { + serverMessage.AppendInteger(-1); + serverMessage.AppendInteger(-1); + serverMessage.AppendInteger(-1); + } + + serverMessage.AppendBool(true); + + return serverMessage; + } + } +} diff --git a/Yupi/Game/Pets/Composers/RespectPetComposer.cs b/Yupi/Game/Pets/Composers/RespectPetComposer.cs new file mode 100644 index 00000000..ec194a5e --- /dev/null +++ b/Yupi/Game/Pets/Composers/RespectPetComposer.cs @@ -0,0 +1,17 @@ +using Yupi.Game.Rooms; +using Yupi.Messages; +using Yupi.Messages.Parsers; + +namespace Yupi.Game.Pets.Composers +{ + class RespectPetComposer + { + internal static void GenerateMessage(Pet pet) + { + ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("RespectPetComposer")); + serverMessage.AppendInteger(pet.VirtualId); + serverMessage.AppendBool(true); + pet.Room.SendMessage(serverMessage); + } + } +} diff --git a/Yupi/Game/Pets/Composers/RespectPetNotificationComposer.cs b/Yupi/Game/Pets/Composers/RespectPetNotificationComposer.cs new file mode 100644 index 00000000..3a90a49b --- /dev/null +++ b/Yupi/Game/Pets/Composers/RespectPetNotificationComposer.cs @@ -0,0 +1,17 @@ +using Yupi.Messages; +using Yupi.Messages.Parsers; + +namespace Yupi.Game.Pets.Composers +{ + class RespectPetNotificationComposer + { + internal static void GenerateMessage(Pet pet) + { + ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("PetRespectNotificationMessageComposer")); + serverMessage.AppendInteger(1); + serverMessage.AppendInteger(pet.VirtualId); + pet.SerializeInventory(serverMessage); + pet.Room.SendMessage(serverMessage); + } + } +} diff --git a/Yupi/Game/Pets/Composers/SerializePetInventoryComposer.cs b/Yupi/Game/Pets/Composers/SerializePetInventoryComposer.cs new file mode 100644 index 00000000..a889c8af --- /dev/null +++ b/Yupi/Game/Pets/Composers/SerializePetInventoryComposer.cs @@ -0,0 +1,37 @@ +using Yupi.Messages; + +namespace Yupi.Game.Pets.Composers +{ + class SerializePetInventoryComposer + { + internal static void GenerateMessage(Pet pet, ServerMessage message, bool levelAfterName = false) + { + message.AppendInteger(pet.PetId); + message.AppendString(pet.Name); + + if (levelAfterName) + message.AppendInteger(pet.Level); + + message.AppendInteger(pet.RaceId); + message.AppendInteger(pet.Race); + message.AppendString(pet.Type == "pet_monster" ? "ffffff" : pet.Color); + message.AppendInteger(pet.Type == "pet_monster" ? 0u : pet.RaceId); + + if (pet.Type == "pet_monster" && pet.MoplaBreed != null) + { + string[] array = pet.MoplaBreed.PlantData.Substring(12).Split(' '); + string[] array2 = array; + + foreach (string s in array2) + message.AppendInteger(int.Parse(s)); + + message.AppendInteger(pet.MoplaBreed.GrowingStatus); + + return; + } + + message.AppendInteger(0); + message.AppendInteger(0); + } + } +} diff --git a/Yupi/Game/Pets/MoplaBreed.cs b/Yupi/Game/Pets/MoplaBreed.cs index 5502566a..bcfff10c 100644 --- a/Yupi/Game/Pets/MoplaBreed.cs +++ b/Yupi/Game/Pets/MoplaBreed.cs @@ -124,7 +124,7 @@ internal MoplaBreed(Pet pet, uint petId, int rarity, string moplaName, string br /// MoplaBreed. internal static MoplaBreed CreateMonsterplantBreed(Pet pet) { - if (pet.Type != 16) + if (pet.Type != "monster_pet") return null; Tuple tuple = GeneratePlantData(pet.Rarity); diff --git a/Yupi/Game/Pets/Pet.cs b/Yupi/Game/Pets/Pet.cs index e98f7deb..f6dc61a8 100644 --- a/Yupi/Game/Pets/Pet.cs +++ b/Yupi/Game/Pets/Pet.cs @@ -26,6 +26,7 @@ Corporation Oy. Yupi! has nothing linked with Sulake. using System.Collections.Generic; using System.Drawing; using Yupi.Game.GameClients.Interfaces; +using Yupi.Game.Pets.Composers; using Yupi.Game.Pets.Enums; using Yupi.Game.Pets.Structs; using Yupi.Game.Rooms; @@ -67,12 +68,12 @@ internal class Pet /// /// The energy /// - internal int Energy; + internal uint Energy; /// /// The experience /// - internal int Experience; + internal uint Experience; /// /// The experience levels @@ -126,7 +127,7 @@ internal class Pet /// /// The nutrition /// - internal int Nutrition; + internal uint Nutrition; /// /// The owner identifier @@ -151,7 +152,9 @@ internal class Pet /// /// The race /// - internal string Race; + internal uint Race; + + internal uint RaceId; /// /// The rarity @@ -161,7 +164,7 @@ internal class Pet /// /// The respect /// - internal int Respect; + internal uint Respect; /// /// The room identifier @@ -171,7 +174,7 @@ internal class Pet /// /// The type /// - internal uint Type; + internal string Type; /// /// The until grown @@ -212,7 +215,6 @@ internal class Pet /// The name. /// The type. /// The race. - /// The color. /// The experience. /// The energy. /// The nutrition. @@ -229,10 +231,11 @@ internal class Pet /// The last health. /// The until grown. /// The mopla breed. - internal Pet(uint petId, uint ownerId, uint roomId, string name, uint type, string race, string color, - int experience, int energy, int nutrition, int respect, double creationStamp, int x, int y, double z, + /// + internal Pet(uint petId, uint ownerId, uint roomId, string name, string type, uint race, + uint experience, uint energy, uint nutrition, uint respect, double creationStamp, int x, int y, double z, bool havesaddle, int anyoneCanRide, int dye, int petHer, int rarity, DateTime lastHealth, - DateTime untilGrown, MoplaBreed moplaBreed) + DateTime untilGrown, MoplaBreed moplaBreed, string color) { PetId = petId; OwnerId = ownerId; @@ -240,7 +243,6 @@ internal Pet(uint petId, uint ownerId, uint roomId, string name, uint type, stri Name = name; Type = type; Race = race; - Color = color; Experience = experience; Energy = energy; Nutrition = nutrition; @@ -260,25 +262,27 @@ internal Pet(uint petId, uint ownerId, uint roomId, string name, uint type, stri UntilGrown = untilGrown; MoplaBreed = moplaBreed; WaitingForBreading = 0; + RaceId = PetTypeManager.GetPetRaceIdByType(Type); + Color = color; } /// /// Gets the maximum level. /// /// The maximum level. - internal static int MaxLevel => 20; + internal static uint MaxLevel => 20; /// /// Gets the maximum energy. /// /// The maximum energy. - internal static int MaxEnergy => 100; + internal static uint MaxEnergy => 100; /// /// Gets the maximum nutrition. /// /// The maximum nutrition. - internal static int MaxNutrition => 150; + internal static uint MaxNutrition => 150; /// /// Gets the room. @@ -326,7 +330,7 @@ internal int Level /// Gets the look. /// /// The look. - internal string Look => string.Concat(Type, " ", Race, " ", Color); + internal string Look => string.Concat(RaceId, " ", Race, " ", Color); /// /// Gets the name of the owner. @@ -339,42 +343,34 @@ internal int Level /// internal void OnRespect() { - { - Respect++; - GameClient ownerSession = Yupi.GetGame().GetClientManager().GetClientByUserId(OwnerId); + Respect++; - if (ownerSession != null) - Yupi.GetGame().GetAchievementManager().ProgressUserAchievement(ownerSession, "ACH_PetRespectReceiver", 1); + GameClient ownerSession = Yupi.GetGame().GetClientManager().GetClientByUserId(OwnerId); - ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("RespectPetMessageComposer")); - serverMessage.AppendInteger(VirtualId); - serverMessage.AppendBool(true); - Room.SendMessage(serverMessage); + if (ownerSession != null) + Yupi.GetGame().GetAchievementManager().ProgressUserAchievement(ownerSession, "ACH_PetRespectReceiver", 1); - serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("PetRespectNotificationMessageComposer")); - serverMessage.AppendInteger(1); - serverMessage.AppendInteger(VirtualId); - SerializeInventory(serverMessage); - Room.SendMessage(serverMessage); + RespectPetComposer.GenerateMessage(this); - if (DbState != DatabaseUpdateState.NeedsInsert) - DbState = DatabaseUpdateState.NeedsUpdate; + RespectPetNotificationComposer.GenerateMessage(this); - if (Type != 16 && Experience <= 51900) - AddExperience(10); + if (DbState != DatabaseUpdateState.NeedsInsert) + DbState = DatabaseUpdateState.NeedsUpdate; - if (Type == 16) - Energy = 100; + if (Type != "pet_monster" && Experience <= 51900) + AddExperience(10); - LastHealth = DateTime.Now.AddSeconds(129600.0); - } + if (Type == "pet_monster") + Energy = 100; + + LastHealth = DateTime.Now.AddSeconds(129600.0); } /// /// Adds the experience. /// /// The amount. - internal void AddExperience(int amount) + internal void AddExperience(uint amount) { int oldExperienceGoal = ExperienceGoal; @@ -389,12 +385,7 @@ internal void AddExperience(int amount) if (Room == null) return; - ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("AddPetExperienceMessageComposer")); - - serverMessage.AppendInteger(PetId); - serverMessage.AppendInteger(VirtualId); - serverMessage.AppendInteger(amount); - Room.SendMessage(serverMessage); + PetExperienceComposer.GenerateMessage(this, amount); if (Experience < oldExperienceGoal) return; @@ -412,25 +403,9 @@ internal void AddExperience(int amount) SerializeInventory(levelNotify, true); - ownerSession.SendMessage(levelNotify); - - ServerMessage tp = new ServerMessage(); - - tp.Init(LibraryParser.OutgoingRequest("PetTrainerPanelMessageComposer")); - - tp.AppendInteger(PetId); - - tp.AppendInteger(totalPetCommands.Count); - - foreach (uint sh in totalPetCommands.Keys) - tp.AppendInteger(sh); - - tp.AppendInteger(petCommands.Count); - - foreach (uint sh in petCommands.Keys) - tp.AppendInteger(sh); - - ownerSession.SendMessage(tp); + ownerSession.SendMessage(levelNotify); + + PetCommandPanelComposer.GenerateMessage(this, totalPetCommands, petCommands, ownerSession); } /// @@ -439,7 +414,7 @@ internal void AddExperience(int amount) /// if set to true [add]. internal void PetEnergy(bool add) { - int num; + uint num; if (add) { @@ -465,13 +440,13 @@ internal void PetEnergy(bool add) if (num <= 4) num = 15; - int randomNumber = Yupi.GetRandomNumber(4, num); + uint randomNumber = (uint)Yupi.GetRandomNumber(4, (int)num); if (!add) { Energy -= randomNumber; - if (Energy < 0) + if (Energy == 0) Energy = 1; } else @@ -486,127 +461,12 @@ internal void PetEnergy(bool add) /// /// The message. /// if set to true [level after name]. - internal void SerializeInventory(ServerMessage message, bool levelAfterName = false) - { - message.AppendInteger(PetId); - message.AppendString(Name); - - if (levelAfterName) - message.AppendInteger(Level); - - message.AppendInteger(Type); - message.AppendInteger(int.Parse(Race)); - message.AppendString(Type == 16u ? "ffffff" : Color); - message.AppendInteger(Type == 16u ? 0u : Type); - - if (Type == 16u && MoplaBreed != null) - { - string[] array = MoplaBreed.PlantData.Substring(12).Split(' '); - string[] array2 = array; - - foreach (string s in array2) - message.AppendInteger(int.Parse(s)); - - message.AppendInteger(MoplaBreed.GrowingStatus); - - return; - } - - message.AppendInteger(0); - message.AppendInteger(0); - } + internal void SerializeInventory(ServerMessage message, bool levelAfterName = false) => SerializePetInventoryComposer.GenerateMessage(this, message, levelAfterName); /// /// Serializes the information. /// /// ServerMessage. - internal ServerMessage SerializeInfo() - { - ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("PetInfoMessageComposer")); - - serverMessage.AppendInteger(PetId); - serverMessage.AppendString(Name); - - if (Type == 16) - { - serverMessage.AppendInteger(MoplaBreed.GrowingStatus); - serverMessage.AppendInteger(7); - } - else - { - serverMessage.AppendInteger(Level); - serverMessage.AppendInteger(MaxLevel); - } - - serverMessage.AppendInteger(Experience); - serverMessage.AppendInteger(ExperienceGoal); - serverMessage.AppendInteger(Energy); - serverMessage.AppendInteger(MaxEnergy); - serverMessage.AppendInteger(Nutrition); - serverMessage.AppendInteger(MaxNutrition); - serverMessage.AppendInteger(Respect); - serverMessage.AppendInteger(OwnerId); - serverMessage.AppendInteger(Age); - serverMessage.AppendString(OwnerName); - serverMessage.AppendInteger(Type == 16 ? 0 : 1); - serverMessage.AppendBool(HaveSaddle); - serverMessage.AppendBool(false); //mountingId - serverMessage.AppendInteger(0); - serverMessage.AppendInteger(AnyoneCanRide); - - if (Type == 16) - serverMessage.AppendBool(MoplaBreed.LiveState == MoplaState.Grown); - else - serverMessage.AppendBool(false); - - serverMessage.AppendBool(false); - if (Type == 16) - serverMessage.AppendBool(MoplaBreed.LiveState == MoplaState.Dead); - else - serverMessage.AppendBool(false); - - serverMessage.AppendInteger(Rarity); - - if (Type == 16u) - { - serverMessage.AppendInteger(129600); - int lastHealthSeconds = (int) (LastHealth - DateTime.Now).TotalSeconds; - int untilGrownSeconds = (int) (UntilGrown - DateTime.Now).TotalSeconds; - - if (lastHealthSeconds < 0) - lastHealthSeconds = 0; - - if (untilGrownSeconds < 0) - untilGrownSeconds = 0; - - switch (MoplaBreed.LiveState) - { - case MoplaState.Dead: - serverMessage.AppendInteger(0); - serverMessage.AppendInteger(0); - break; - - case MoplaState.Grown: - serverMessage.AppendInteger(lastHealthSeconds); - serverMessage.AppendInteger(0); - break; - - default: - serverMessage.AppendInteger(lastHealthSeconds); - serverMessage.AppendInteger(untilGrownSeconds); - break; - } - } - else - { - serverMessage.AppendInteger(-1); - serverMessage.AppendInteger(-1); - serverMessage.AppendInteger(-1); - } - - serverMessage.AppendBool(true); // Allow breed? - - return serverMessage; - } + internal ServerMessage SerializeInfo() => PetInformationComposer.GenerateMessage(this); } } \ No newline at end of file diff --git a/Yupi/Game/Pets/PetBreeding.cs b/Yupi/Game/Pets/PetBreeding.cs index fd9777a9..1e90a9d0 100644 --- a/Yupi/Game/Pets/PetBreeding.cs +++ b/Yupi/Game/Pets/PetBreeding.cs @@ -100,7 +100,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) switch (pet1.Type) { - case 3: + case "pet_terrier": message.AppendInteger(TerrierEpicRace.Length); foreach (int value in TerrierEpicRace) @@ -108,7 +108,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) break; - case 4: + case "pet_bear": message.AppendInteger(BearEpicRace.Length); foreach (int value in BearEpicRace) @@ -121,7 +121,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) switch (pet1.Type) { - case 3: + case "pet_terrier": message.AppendInteger(TerrierRareRace.Length); foreach (int value in TerrierRareRace) @@ -129,7 +129,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) break; - case 4: + case "pet_bear": message.AppendInteger(BearRareRace.Length); foreach (int value in BearRareRace) @@ -142,7 +142,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) switch (pet1.Type) { - case 3: + case "pet_terrier": message.AppendInteger(TerrierNoRareRace.Length); foreach (int value in TerrierNoRareRace) @@ -150,7 +150,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) break; - case 4: + case "pet_bear": message.AppendInteger(BearNoRareRace.Length); foreach (int value in BearNoRareRace) @@ -163,7 +163,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) switch (pet1.Type) { - case 3: + case "pet_terrier": message.AppendInteger(TerrierNormalRace.Length); foreach (int value in TerrierNormalRace) @@ -171,7 +171,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) break; - case 4: + case "pet_bear": message.AppendInteger(BearNormalRace.Length); foreach (int value in BearNormalRace) @@ -180,7 +180,7 @@ internal static ServerMessage GetMessage(uint furniId, Pet pet1, Pet pet2) break; } - message.AppendInteger(pet1.Type == 3 ? 25 : 24); + message.AppendInteger(pet1.Type == "pet_terrier" ? PetTypeManager.GetPetRaceIdByType("pet_terrierbaby") : PetTypeManager.GetPetRaceIdByType("pet_bearbaby")); return message; } diff --git a/Yupi/Game/Pets/PetCommandHandler.cs b/Yupi/Game/Pets/PetCommandHandler.cs index 715784f2..9c4781bf 100644 --- a/Yupi/Game/Pets/PetCommandHandler.cs +++ b/Yupi/Game/Pets/PetCommandHandler.cs @@ -58,9 +58,9 @@ internal static void Init(IQueryAdapter dbClient) internal static Dictionary GetAllPetCommands() => _petCommands.ToDictionary(p => p.Key, p => p.Value); - internal static Dictionary GetPetCommandByPetType(uint petType) => _petCommands.Where(p => p.Value.PetTypes.Contains(petType.ToString())).ToDictionary(p => p.Key, p => p.Value); + internal static Dictionary GetPetCommandByPetType(string petType) => _petCommands.Where(p => p.Value.PetTypes.Contains(petType.ToString())).ToDictionary(p => p.Key, p => p.Value); - internal static int GetPetCommandCountByPetType(uint petType) => _petCommands.Count(p => p.Value.PetTypes.Contains(petType.ToString())); + internal static int GetPetCommandCountByPetType(string petType) => _petCommands.Count(p => p.Value.PetTypes.Contains(petType.ToString())); internal static PetCommand GetPetCommandById(uint commandId) => _petCommands.FirstOrDefault(p => p.Key == commandId).Value; diff --git a/Yupi/Game/Pets/PetRace.cs b/Yupi/Game/Pets/PetRace.cs deleted file mode 100644 index ee78247b..00000000 --- a/Yupi/Game/Pets/PetRace.cs +++ /dev/null @@ -1,105 +0,0 @@ -/** - Because i love chocolat... - 88 88 - "" 88 - 88 -8b d8 88 88 8b,dPPYba, 88 88 -`8b d8' 88 88 88P' "8a 88 88 - `8b d8' 88 88 88 d8 88 "" - `8b,d8' "8a, ,a88 88b, ,a8" 88 aa - Y88' `"YbbdP'Y8 88`YbbdP"' 88 88 - d8' 88 - d8' 88 - - Private Habbo Hotel Emulating System - @author Claudio A. Santoro W. - @author Kessiler R. - @version dev-beta - @license MIT - @copyright Sulake Corporation Oy - @observation All Rights of Habbo, Habbo Hotel, and all Habbo contents and it's names, is copyright from Sulake - Corporation Oy. Yupi! has nothing linked with Sulake. - This Emulator is Only for DEVELOPMENT uses. If you're selling this you're violating Sulakes Copyright. -*/ - -using System.Collections.Generic; -using System.Data; -using System.Globalization; -using System.Linq; -using Yupi.Data.Base.Sessions.Interfaces; - -namespace Yupi.Game.Pets -{ - /// - /// Class PetRace. - /// - public class PetRace - { - /// - /// The races - /// - public static List Races; - - /// - /// The color1 - /// - public int Color1; - - /// - /// The color2 - /// - public int Color2; - - /// - /// The has1 color - /// - public bool Has1Color; - - /// - /// The has2 color - /// - public bool Has2Color; - - /// - /// The race identifier - /// - public int RaceId; - - /// - /// Initializes the specified database client. - /// - /// The database client. - public static void Init(IQueryAdapter dbClient) - { - dbClient.SetQuery("SELECT * FROM pets_breeds"); - - DataTable table = dbClient.GetTable(); - Races = new List(); - - foreach (PetRace item in from DataRow row in table.Rows select new PetRace { RaceId = (int) row["breed_id"], Color1 = (int) row["color1"], Color2 = (int) row["color2"], Has1Color = (string) row["color1_enabled"] == "1", Has2Color = (string) row["color2_enabled"] == "1" }) - Races.Add(item); - } - - /// - /// Gets the races for race identifier. - /// - /// The s race identifier. - /// List<PetRace>. - public static List GetRacesForRaceId(int sRaceId) => Races.Where(current => current.RaceId == sRaceId).ToList(); - - /// - /// Races the got races. - /// - /// The s race identifier. - /// true if XXXX, false otherwise. - public static bool RaceGotRaces(int sRaceId) => GetRacesForRaceId(sRaceId).Any(); - - /// - /// Gets the pet identifier. - /// - /// The type. - /// The packet. - /// System.Int32. - public static int GetPetId(string type, out string packet) => int.Parse(packet = type.Replace("a0 pet", string.Empty).ToString(CultureInfo.InvariantCulture)); - } -} \ No newline at end of file diff --git a/Yupi/Game/Pets/PetTypeManager.cs b/Yupi/Game/Pets/PetTypeManager.cs new file mode 100644 index 00000000..e3055e33 --- /dev/null +++ b/Yupi/Game/Pets/PetTypeManager.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Yupi.Data.Base.Sessions.Interfaces; +using Yupi.Game.Items.Interfaces; +using Yupi.Game.Pets.Structs; + +namespace Yupi.Game.Pets +{ + class PetTypeManager + { + /// + /// The _pet races + /// + private static List _petRaces; + + /// + /// The _pet types + /// + private static Dictionary _petTypes; + + public static void Init(IQueryAdapter dbClient) + { + GetRaces(dbClient); + GetTypes(dbClient); + } + + internal static void GetTypes(IQueryAdapter dbClient) + { + dbClient.SetQuery("SELECT * FROM catalog_pets"); + + DataTable table = dbClient.GetTable(); + + _petTypes = new Dictionary(); + + foreach (DataRow dataRow in table.Rows) + _petTypes.Add((string)dataRow["pet_type"], new PetType(dataRow)); + } + + /// + /// Initializes the specified database client. + /// + /// The database client. + internal static void GetRaces(IQueryAdapter dbClient) + { + dbClient.SetQuery("SELECT * FROM pets_races"); + + DataTable table = dbClient.GetTable(); + + _petRaces = new List(); + + foreach (DataRow dataRow in table.Rows) + _petRaces.Add(new PetRace(dataRow)); + } + + /// + /// Gets the races for race identifier. + /// + /// The s race identifier. + /// List<PetRace>. + public static List GetRacesForRaceId(uint sRaceId) => _petRaces.Where(current => current.RaceId == sRaceId).ToList(); + + /// + /// Races the got races. + /// + /// The s race identifier. + /// true if XXXX, false otherwise. + public static bool RaceGotRaces(uint sRaceId) => GetRacesForRaceId(sRaceId).Any(); + + public static uint GetPetRaceIdByType(string petType) => _petTypes.FirstOrDefault(p => p.Key == petType).Value.PetRaceId; + + public static uint GetPetRaceByItemName(string itemName) => GetPetRaceIdByType(itemName); + + public static string GetPetTypeByHabboPetType(string habboPetType) => _petTypes.FirstOrDefault(p => p.Value.PetRaceId == Convert.ToUInt32(habboPetType.Replace("a0 pet", string.Empty))).Value.PetRaceName; + + public static string GetHabboPetType(string petType) => $"a0 pet{GetPetRaceByItemName(petType)}"; + + public static List GetRacesByPetType(string petType) => _petTypes.FirstOrDefault(p => p.Key == petType).Value.PetRaceSchemas; + + public static bool ItemIsPet(string itemName) => _petTypes.ContainsKey(itemName); + } +} diff --git a/Yupi/Game/Pets/Structs/PetCommand.cs b/Yupi/Game/Pets/Structs/PetCommand.cs index 0c51e236..8121315f 100644 --- a/Yupi/Game/Pets/Structs/PetCommand.cs +++ b/Yupi/Game/Pets/Structs/PetCommand.cs @@ -58,6 +58,8 @@ internal struct PetCommand internal string[] PetTypes; + internal string PetSpeech; + /// /// Initializes a new instance of the struct. /// @@ -72,6 +74,7 @@ public PetCommand(DataRow row) GainedExperience = uint.Parse(row["experience"].ToString()); LostEnergy = uint.Parse(row["energy"].ToString()); PetTypes = row["pet_type"].ToString().Split(','); + PetSpeech = row["pet_speech"].ToString(); } } } \ No newline at end of file diff --git a/Yupi/Game/Pets/Structs/PetRace.cs b/Yupi/Game/Pets/Structs/PetRace.cs new file mode 100644 index 00000000..c3b624fb --- /dev/null +++ b/Yupi/Game/Pets/Structs/PetRace.cs @@ -0,0 +1,68 @@ +/** + Because i love chocolat... + 88 88 + "" 88 + 88 +8b d8 88 88 8b,dPPYba, 88 88 +`8b d8' 88 88 88P' "8a 88 88 + `8b d8' 88 88 88 d8 88 "" + `8b,d8' "8a, ,a88 88b, ,a8" 88 aa + Y88' `"YbbdP'Y8 88`YbbdP"' 88 88 + d8' 88 + d8' 88 + + Private Habbo Hotel Emulating System + @author Claudio A. Santoro W. + @author Kessiler R. + @version dev-beta + @license MIT + @copyright Sulake Corporation Oy + @observation All Rights of Habbo, Habbo Hotel, and all Habbo contents and it's names, is copyright from Sulake + Corporation Oy. Yupi! has nothing linked with Sulake. + This Emulator is Only for DEVELOPMENT uses. If you're selling this you're violating Sulakes Copyright. +*/ + +using System.Data; + +namespace Yupi.Game.Pets.Structs +{ + /// + /// Class PetRace. + /// + internal class PetRace + { + /// + /// The color1 + /// + public uint ColorOne; + + /// + /// The color2 + /// + public uint ColorTwo; + + /// + /// The has1 color + /// + public bool HasColorOne; + + /// + /// The has2 color + /// + public bool HasColorTwo; + + /// + /// The race identifier + /// + public uint RaceId; + + public PetRace(DataRow row) + { + RaceId = (uint) row["race_type"]; + ColorOne = (uint) row["color_one"]; + ColorTwo = (uint) row["color_two"]; + HasColorOne = (string) row["color_one_enabled"] == "1"; + HasColorTwo = (string) row["color_two_enabled"] == "1"; + } + } +} \ No newline at end of file diff --git a/Yupi/Game/Pets/Structs/PetType.cs b/Yupi/Game/Pets/Structs/PetType.cs new file mode 100644 index 00000000..10967502 --- /dev/null +++ b/Yupi/Game/Pets/Structs/PetType.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using System.Data; + +namespace Yupi.Game.Pets.Structs +{ + internal class PetType + { + public string PetRaceName; + + public uint PetRaceId; + + public List PetRaceSchemas; + + public PetType(DataRow row) + { + PetRaceName = (string)row["pet_type"]; + PetRaceId = (uint)row["pet_race_id"]; + PetRaceSchemas = PetTypeManager.GetRacesForRaceId((uint)row["pet_race_id"]); + } + } +} diff --git a/Yupi/Game/RoomBots/BotManager.cs b/Yupi/Game/RoomBots/BotManager.cs index e3e57ebf..7f482e4e 100644 --- a/Yupi/Game/RoomBots/BotManager.cs +++ b/Yupi/Game/RoomBots/BotManager.cs @@ -81,9 +81,9 @@ internal static RoomBot GenerateBotFromRow(DataRow row) if (!row.IsNull("speech") && !string.IsNullOrEmpty(row["speech"].ToString())) speeches = row["speech"].ToString().Split(';').ToList(); - RoomBot bot = new RoomBot(id, Convert.ToUInt32(row["user_id"]), AiType.Generic, row["bot_type"].ToString()); + RoomBot bot = new RoomBot(id, (uint)row["user_id"], AiType.Generic, row["bot_type"].ToString()); - bot.Update(Convert.ToUInt32(row["room_id"]), (string) row["walk_mode"], (string) row["name"], (string) row["motto"], (string) row["look"], int.Parse(row["x"].ToString()), int.Parse(row["y"].ToString()), int.Parse(row["z"].ToString()), 4, 0, 0, 0, 0, speeches, null, (string) row["gender"], (int) row["dance"], (int) row["speaking_interval"], Convert.ToInt32(row["automatic_chat"]) == 1, Convert.ToInt32(row["mix_phrases"]) == 1); + bot.Update((uint)row["room_id"], row["walk_mode"].ToString(), (string) row["name"], (string) row["motto"], (string) row["look"], int.Parse(row["x"].ToString()), int.Parse(row["y"].ToString()), int.Parse(row["z"].ToString()), 4, 0, 0, 0, 0, speeches, null, row["gender"].ToString(), (uint) row["dance"], (uint) row["speaking_interval"], (int)row["automatic_chat"] == 1, (int)row["mix_phrases"] == 1); return bot; } diff --git a/Yupi/Game/RoomBots/Models/GenericBot.cs b/Yupi/Game/RoomBots/Models/GenericBot.cs index 085d36f7..b210cdc1 100644 --- a/Yupi/Game/RoomBots/Models/GenericBot.cs +++ b/Yupi/Game/RoomBots/Models/GenericBot.cs @@ -63,7 +63,7 @@ internal class GenericBot : BaseBot /// /// The _speech interval /// - private int _speechInterval; + private uint _speechInterval; /// /// Initializes a new instance of the class. @@ -71,7 +71,7 @@ internal class GenericBot : BaseBot /// The room bot. /// The virtual identifier. /// The speech interval. - internal GenericBot(RoomBot roomBot, int virtualId, int speechInterval) + internal GenericBot(RoomBot roomBot, int virtualId, uint speechInterval) { _virtualId = virtualId; _speechInterval = speechInterval < 2 ? 2000 : speechInterval*1000; diff --git a/Yupi/Game/RoomBots/Models/PetBot.cs b/Yupi/Game/RoomBots/Models/PetBot.cs index 0403351f..f284189f 100644 --- a/Yupi/Game/RoomBots/Models/PetBot.cs +++ b/Yupi/Game/RoomBots/Models/PetBot.cs @@ -77,7 +77,7 @@ internal override void OnSelfEnterRoom() { Point randomWalkableSquare = GetRoom().GetGameMap().GetRandomWalkableSquare(); - if (GetRoomUser() != null && GetRoomUser().PetData.Type != 16u) + if (GetRoomUser() != null && GetRoomUser().PetData.Type != "pet_monster") GetRoomUser().MoveTo(randomWalkableSquare.X, randomWalkableSquare.Y); } @@ -91,14 +91,17 @@ internal override void OnUserEnterRoom(RoomUser user) return; RoomUser roomUser = GetRoomUser(); + if (roomUser == null || user.GetClient().GetHabbo().UserName != roomUser.PetData.OwnerName) return; Random random = new Random(); + string[] value = PetLocale.GetValue("welcome.speech.pet"); string message = value[random.Next(0, value.Length - 1)]; message += user.GetUserName(); + roomUser.Chat(null, message, false, 0); } @@ -119,18 +122,18 @@ internal override void OnUserSay(RoomUser user, string msg) PetCommand command = PetCommandHandler.GetPetCommandByInput(msg.Substring(1).ToLower()); - if (!command.PetTypes.Contains(roomUser.PetData.Type.ToString())) + if (!command.PetTypes.Contains(roomUser.PetData.Type)) return; if (roomUser.PetData.Level < command.MinLevel) return; - if (roomUser.PetData.Energy < 20 || roomUser.PetData.Nutrition < 25) + if (roomUser.PetData.Energy < command.LostEnergy && roomUser.PetData.Nutrition < 25 || roomUser.PetData.Energy < command.LostEnergy) command.CommandAction = "lazy"; RemovePetStatus(); - roomUser.PetData.AddExperience((int)command.GainedExperience); + roomUser.PetData.AddExperience(command.GainedExperience); roomUser.Statusses.Add(command.PetStatus, string.Empty); roomUser.Statusses.Add("gst", command.PetGesture); @@ -142,7 +145,14 @@ internal override void OnUserSay(RoomUser user, string msg) roomUser.FollowingOwner = null; - SubtractAttributes(); + SubtractAttributes(command.LostEnergy); + + Random random = new Random(); + + string[] value = PetLocale.GetValue(command.PetSpeech); + string message = value[random.Next(0, value.Length - 1)]; + + roomUser.Chat(null, message, false, 0); /* other gestures that isnt listed */ @@ -202,11 +212,11 @@ internal override void OnUserSay(RoomUser user, string msg) switch (roomUser.PetData.Type) { - case 3: + case "pet_terrier": coord = GetRoom().GetRoomItemHandler().GetRandomBreedingTerrier(roomUser.PetData); break; - case 4: + case "pet_bear": coord = GetRoom().GetRoomItemHandler().GetRandomBreedingBear(roomUser.PetData); break; } @@ -259,10 +269,6 @@ internal override void OnUserSay(RoomUser user, string msg) break; case "default": - string[] valueDefault = PetLocale.GetValue("pet.done"); - string messageDefault = valueDefault[new Random().Next(0, valueDefault.Length - 1)]; - - roomUser.Chat(null, messageDefault, false, 0); break; } } @@ -285,7 +291,7 @@ internal override void OnTimerTick() RemovePetStatus(); - string[] value = PetLocale.GetValue($"speech.pet{roomUser.PetData.Type}"); + string[] value = PetLocale.GetValue($"speech.pet{roomUser.PetData.Type.Replace("pet", string.Empty)}"); string text = value[random.Next(0, value.Length - 1)]; @@ -315,37 +321,44 @@ internal override void OnTimerTick() RemovePetStatus(); if (GetRoomUser().FollowingOwner != null) - { GetRoomUser().MoveTo(GetRoomUser().FollowingOwner.SquareBehind); - } else { - if (GetRoomUser().PetData.Type == 16) return; //Monsterplants can't move - Point nextCoord = GetRoom().GetGameMap().GetRandomValidWalkableSquare(); - GetRoomUser().MoveTo(nextCoord.X, nextCoord.Y); + if (GetRoomUser().PetData.Type == "pet_monster") + return; + + Point randomPoint = GetRoom().GetGameMap().GetRandomWalkableSquare(); + + if (randomPoint.X == 0 || randomPoint.Y == 0) + goto IL_1B5; + + GetRoomUser().MoveTo(randomPoint.X, randomPoint.Y); } } if (new Random().Next(2, 15) % 2 == 0) { - if (GetRoomUser().PetData.Type == 16) + if (GetRoomUser().PetData.Type == "pet_monster") { MoplaBreed breed = GetRoomUser().PetData.MoplaBreed; + GetRoomUser().PetData.Energy--; GetRoomUser().AddStatus("gst", breed.LiveState == MoplaState.Dead ? "sad" : "sml"); - GetRoomUser() - .PetData.MoplaBreed.OnTimerTick(GetRoomUser().PetData.LastHealth, - GetRoomUser().PetData.UntilGrown); + GetRoomUser().PetData.MoplaBreed.OnTimerTick(GetRoomUser().PetData.LastHealth, GetRoomUser().PetData.UntilGrown); } else { - if (GetRoomUser().PetData.Energy < 30) GetRoomUser().AddStatus("lay", ""); + if (GetRoomUser().PetData.Energy < 30) + GetRoomUser().AddStatus("lay", ""); else { GetRoomUser().AddStatus("gst", "joy"); - if (new Random().Next(1, 7) == 3) GetRoomUser().AddStatus("snf", ""); + + if (new Random().Next(1, 7) == 3) + GetRoomUser().AddStatus("snf", ""); } } + GetRoomUser().UpdateNeeded = true; } @@ -390,6 +403,9 @@ private void RemovePetStatus() return; roomUser.Statusses.Clear(); + roomUser.IsWalking = false; + roomUser.ClearMovement(); + roomUser.SetStep = false; roomUser.UpdateNeeded = true; } @@ -397,7 +413,7 @@ private void RemovePetStatus() /// /// Subtracts the attributes. /// - private void SubtractAttributes() + private void SubtractAttributes(uint energy = 10, uint nutrition = 5) { RoomUser roomUser = GetRoomUser(); @@ -407,12 +423,12 @@ private void SubtractAttributes() if (roomUser.PetData.Energy < 11) roomUser.PetData.Energy = 0; else - roomUser.PetData.Energy -= 10; + roomUser.PetData.Energy -= energy; if (roomUser.PetData.Nutrition < 6) roomUser.PetData.Nutrition = 0; else - roomUser.PetData.Nutrition -= 5; + roomUser.PetData.Nutrition -= nutrition; } } } \ No newline at end of file diff --git a/Yupi/Game/RoomBots/RoomBot.cs b/Yupi/Game/RoomBots/RoomBot.cs index 4a97d2a2..1c69de27 100644 --- a/Yupi/Game/RoomBots/RoomBot.cs +++ b/Yupi/Game/RoomBots/RoomBot.cs @@ -54,7 +54,7 @@ internal class RoomBot /// /// The dance identifier /// - internal int DanceId; + internal uint DanceId; /// /// The gender @@ -134,7 +134,7 @@ internal class RoomBot /// /// The speech interval /// - internal int SpeechInterval; + internal uint SpeechInterval; /// /// The virtual identifier @@ -209,7 +209,7 @@ internal RoomBot(uint botId, uint ownerId, AiType aiType, string botType) /// The gender. /// The dance. /// - internal RoomBot(uint botId, uint ownerId, uint roomId, AiType aiType, string walkingMode, string name, string motto, string look, int x, int y, double z, int rot, List speeches, List responses, string gender, int dance, string botType) + internal RoomBot(uint botId, uint ownerId, uint roomId, AiType aiType, string walkingMode, string name, string motto, string look, int x, int y, double z, int rot, List speeches, List responses, string gender, uint dance, string botType) { OwnerId = ownerId; BotId = botId; @@ -263,7 +263,7 @@ internal RoomBot(uint botId, uint ownerId, uint roomId, AiType aiType, string wa /// The speech interval. /// if set to true [automatic chat]. /// if set to true [mix phrases]. - internal void Update(uint roomId, string walkingMode, string name, string motto, string look, int x, int y, double z, int rot, int minX, int minY, int maxX, int maxY, List speeches, List responses, string gender, int dance, int speechInterval, bool automaticChat, bool mixPhrases) + internal void Update(uint roomId, string walkingMode, string name, string motto, string look, int x, int y, double z, int rot, int minX, int minY, int maxX, int maxY, List speeches, List responses, string gender, uint dance, uint speechInterval, bool automaticChat, bool mixPhrases) { RoomId = roomId; WalkingMode = walkingMode; diff --git a/Yupi/Game/Rooms/Room.cs b/Yupi/Game/Rooms/Room.cs index 372c1c66..5706f301 100644 --- a/Yupi/Game/Rooms/Room.cs +++ b/Yupi/Game/Rooms/Room.cs @@ -396,11 +396,13 @@ internal void InitUserBots() using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { queryReactor.SetQuery($"SELECT * FROM bots_data WHERE room_id = {RoomId} AND ai_type = 'generic'"); + DataTable table = queryReactor.GetTable(); + if (table == null) return; - foreach (RoomBot roomBot in from DataRow dataRow in table.Rows select BotManager.GenerateBotFromRow(dataRow) - ) + + foreach (RoomBot roomBot in from DataRow dataRow in table.Rows select BotManager.GenerateBotFromRow(dataRow)) _roomUserManager.DeployBot(roomBot, null); } } @@ -439,7 +441,7 @@ internal void InitPets() { using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { - queryReactor.SetQuery($"SELECT * FROM bots_data WHERE room_id = '{RoomId}' AND ai_type='pet'"); + queryReactor.SetQuery($"SELECT * FROM pets_data WHERE room_id = '{RoomId}' AND ai_type='pet'"); DataTable table = queryReactor.GetTable(); if (table == null) @@ -447,17 +449,13 @@ internal void InitPets() foreach (DataRow dataRow in table.Rows) { - queryReactor.SetQuery($"SELECT * FROM pets_data WHERE id = '{dataRow["id"]}' LIMIT 1"); - DataRow row = queryReactor.GetRow(); + Pet pet = CatalogManager.GeneratePetFromRow(dataRow); - if (row == null) - continue; + RoomBot bot = new RoomBot(pet.PetId, Convert.ToUInt32(RoomData.OwnerId), AiType.Pet, string.Empty); - Pet pet = CatalogManager.GeneratePetFromRow(dataRow, row); + bot.Update(RoomId, "freeroam", pet.Name, string.Empty, pet.Look, pet.X, pet.Y, (int) pet.Z, 4, 0, 0, 0, 0, + null, null, string.Empty, 0, 0, false, false); - RoomBot bot = new RoomBot(pet.PetId, Convert.ToUInt32(RoomData.OwnerId), AiType.Pet, ""); - bot.Update(RoomId, "freeroam", pet.Name, "", pet.Look, pet.X, pet.Y, (int) pet.Z, 4, 0, 0, 0, 0, - null, null, "", 0, 0, false, false); _roomUserManager.DeployBot(bot, pet); } } @@ -556,7 +554,7 @@ internal void OnUserSay(RoomUser user, string message, bool shout) { current.BotAi.OnChatTick(); } - else if (current.IsPet && message.StartsWith(current.PetData.Name) && current.PetData.Type != 16) + else if (current.IsPet && message.StartsWith(current.PetData.Name) && current.PetData.Type != "pet_monster") { message = message.Substring(current.PetData.Name.Length); current.BotAi.OnUserSay(user, message); diff --git a/Yupi/Game/Rooms/RoomManager.cs b/Yupi/Game/Rooms/RoomManager.cs index e28e9ded..c3bf7f31 100644 --- a/Yupi/Game/Rooms/RoomManager.cs +++ b/Yupi/Game/Rooms/RoomManager.cs @@ -496,7 +496,7 @@ internal void RemoveAllRooms() /// The reason. internal void UnloadRoom(Room room, string reason) { - if (room == null || room.RoomData == null || room.Disposed) + if (room?.RoomData == null || room.Disposed) return; room.Disposed = true; @@ -563,7 +563,8 @@ internal void UnloadRoom(Room room, string reason) { if (current.PetData == null) continue; - queryReactor.SetQuery("UPDATE bots_data SET x=@x, y=@y, z=@z WHERE id=@id LIMIT 1"); + + queryReactor.SetQuery("UPDATE pets_data SET x=@x, y=@y, z=@z WHERE id=@id LIMIT 1"); queryReactor.AddParameter("x", current.X); queryReactor.AddParameter("y", current.Y); queryReactor.AddParameter("z", current.Z); @@ -579,8 +580,8 @@ internal void UnloadRoom(Room room, string reason) { if (current.BotData == null) continue; - queryReactor.SetQuery( - "UPDATE bots_data SET x=@x, y=@y, z=@z, name=@name, motto=@motto, look=@look, rotation=@rotation, dance=@dance WHERE id=@id LIMIT 1"); + + queryReactor.SetQuery("UPDATE bots_data SET x=@x, y=@y, z=@z, name=@name, motto=@motto, look=@look, rotation=@rotation, dance=@dance WHERE id=@id LIMIT 1"); queryReactor.AddParameter("name", current.BotData.Name); queryReactor.AddParameter("motto", current.BotData.Motto); queryReactor.AddParameter("look", current.BotData.Look); @@ -608,13 +609,11 @@ internal void UnloadRoom(Room room, string reason) Room junkRoom; LoadedRooms.TryRemove(room.RoomId, out junkRoom); - junkRoom = null; Writer.WriteLine(string.Format("Room #{0} was unloaded, reason: " + reason, room.RoomId), "Yupi.Rooms", ConsoleColor.DarkGray); room.Destroy(); - room = null; } /// diff --git a/Yupi/Game/Rooms/User/RoomUser.cs b/Yupi/Game/Rooms/User/RoomUser.cs index ca1081cd..18e98624 100644 --- a/Yupi/Game/Rooms/User/RoomUser.cs +++ b/Yupi/Game/Rooms/User/RoomUser.cs @@ -97,7 +97,7 @@ public class RoomUser : IEquatable /// /// The dance identifier /// - internal int DanceId; + internal uint DanceId; /// /// The fast walking @@ -917,21 +917,33 @@ internal void MoveTo(int x, int y, bool pOverride) if (TeleportEnabled) { UnIdle(); + GetRoom() .SendMessage(GetRoom() .GetRoomItemHandler() .UpdateUserOnRoller(this, new Point(x, y), 0u, GetRoom().GetGameMap().SqAbsoluteHeight(GoalX, GoalY))); - if (Statusses.ContainsKey("sit")) Z -= 0.35; + + if (Statusses.ContainsKey("sit")) + Z -= 0.35; + UpdateNeeded = true; + GetRoom().GetRoomUserManager().UpdateUserStatus(this, false); + return; } - if (GetRoom().GetGameMap().SquareHasUsers(x, y) && !pOverride) return; - if (Frozen) return; + + if (GetRoom().GetGameMap().SquareHasUsers(x, y) && !pOverride) + return; + + if (Frozen) + return; Point coord = new Point(x, y); + List allRoomItemForSquare = GetRoom().GetGameMap().GetCoordinatedHeighestItems(coord); + if ((RidingHorse && !IsBot && allRoomItemForSquare.Any()) || (IsPet && allRoomItemForSquare.Any())) if ( allRoomItemForSquare.Any( @@ -1150,7 +1162,7 @@ internal void Serialize(ServerMessage message, bool gotPublicRoom) message.AppendString(BotData.Name); message.AppendString(BotData.Motto); if (BotData.AiType == AiType.Pet) - if (PetData.Type == 16u) + if (PetData.Type == "pet_monster") message.AppendString(PetData.MoplaBreed.PlantData); else if (PetData.HaveSaddle == Convert.ToBoolean(2)) message.AppendString(string.Concat(BotData.Look.ToLower(), " 3 4 10 0 2 ", PetData.PetHair, " ", @@ -1171,15 +1183,15 @@ internal void Serialize(ServerMessage message, bool gotPublicRoom) message.AppendInteger(BotData.AiType == AiType.Generic ? 4 : 2); if (BotData.AiType == AiType.Pet) { - message.AppendInteger(PetData.Type); + message.AppendInteger(PetData.RaceId); message.AppendInteger(PetData.OwnerId); message.AppendString(PetData.OwnerName); - message.AppendInteger(PetData.Type == 16u ? 0 : 1); + message.AppendInteger(PetData.Type == "pet_monster" ? 0 : 1); message.AppendBool(PetData.HaveSaddle); message.AppendBool(RidingHorse); message.AppendInteger(0); - message.AppendInteger(PetData.Type == 16u ? 1 : 0); - message.AppendString(PetData.Type == 16u ? PetData.MoplaBreed.GrowStatus : ""); + message.AppendInteger(PetData.Type == "pet_monster" ? 1 : 0); + message.AppendString(PetData.Type == "pet_monster" ? PetData.MoplaBreed.GrowStatus : ""); return; } message.AppendString(BotData.Gender.ToLower()); @@ -1205,10 +1217,14 @@ internal void SerializeStatus(ServerMessage message) message.AppendString(ServerUserChatTextHandler.GetString(Z)); message.AppendInteger(RotHead); message.AppendInteger(RotBody); + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.Append("/"); - if (IsPet && PetData.Type == 16u) + + if (IsPet && PetData.Type == "pet_monster") stringBuilder.AppendFormat("/{0}{1}", PetData.MoplaBreed.GrowStatus, Statusses.Count >= 1 ? "/" : ""); + lock (Statusses) { foreach (KeyValuePair current in Statusses) diff --git a/Yupi/Game/Rooms/User/RoomUserManager.cs b/Yupi/Game/Rooms/User/RoomUserManager.cs index ce191efd..a17884d2 100644 --- a/Yupi/Game/Rooms/User/RoomUserManager.cs +++ b/Yupi/Game/Rooms/User/RoomUserManager.cs @@ -149,14 +149,18 @@ internal int GetRoomUserCount() internal RoomUser DeployBot(RoomBot bot, Pet petData) { int virtualId = _primaryPrivateUserId++; + RoomUser roomUser = new RoomUser(0u, _userRoom.RoomId, virtualId, _userRoom, false); + int num = _secondaryPrivateUserId++; + roomUser.InternalRoomId = num; UserList.TryAdd(num, roomUser); OnUserAdd(roomUser); DynamicRoomModel model = _userRoom.GetGameMap().Model; Point coord = new Point(bot.X, bot.Y); + if ((bot.X > 0) && (bot.Y >= 0) && (bot.X < model.MapSizeX) && (bot.Y < model.MapSizeY)) { _userRoom.GetGameMap().AddUserToMap(roomUser, coord); @@ -175,6 +179,7 @@ internal RoomUser DeployBot(RoomBot bot, Pet petData) roomUser.BotData = bot; roomUser.BotAi = bot.GenerateBotAi(roomUser.VirtualId, (int) bot.BotId); + if (roomUser.IsPet) { roomUser.BotAi.Init(bot.BotId, roomUser.VirtualId, _userRoom.RoomId, roomUser, _userRoom); @@ -182,18 +187,20 @@ internal RoomUser DeployBot(RoomBot bot, Pet petData) roomUser.PetData.VirtualId = roomUser.VirtualId; } else - { roomUser.BotAi.Init(bot.BotId, roomUser.VirtualId, _userRoom.RoomId, roomUser, _userRoom); - } UpdateUserStatus(roomUser, false); roomUser.UpdateNeeded = true; ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("SetRoomUserMessageComposer")); + serverMessage.AppendInteger(1); roomUser.Serialize(serverMessage, _userRoom.GetGameMap().GotPublicPool); + _userRoom.SendMessage(serverMessage); + roomUser.BotAi.OnSelfEnterRoom(); + if (roomUser.IsPet) { if (_pets.Contains(roomUser.PetData.PetId)) @@ -238,7 +245,7 @@ internal RoomUser DeployBot(RoomBot bot, Pet petData) /// The speech delay. /// if set to true [mix]. internal void UpdateBot(int virtualId, RoomUser roomUser, string name, string motto, string look, string gender, - List speech, List responses, bool speak, int speechDelay, bool mix) + List speech, List responses, bool speak, uint speechDelay, bool mix) { RoomUser bot = GetRoomUserByVirtualId(virtualId); if (bot == null || !bot.IsBot) return; @@ -256,9 +263,7 @@ internal void UpdateBot(int virtualId, RoomUser roomUser, string name, string mo rBot.RoomUser = roomUser; rBot.MixPhrases = mix; - if (rBot.RoomUser == null || rBot.RoomUser.BotAi == null) return; - - rBot.RoomUser.BotAi.Modified(); + rBot.RoomUser?.BotAi?.Modified(); } /// @@ -596,48 +601,50 @@ internal void SavePets(IQueryAdapter dbClient) /// The database client. internal void AppendPetsUpdateString(IQueryAdapter dbClient) { - DatabaseQueryChunk queryChunk = new DatabaseQueryChunk("INSERT INTO bots_data (id,user_id,room_id,name,x,y,z) VALUES "); - DatabaseQueryChunk queryChunk2 = new DatabaseQueryChunk("INSERT INTO pets_data (type,race,color,experience,energy,createstamp,nutrition,respect) VALUES "); - - DatabaseQueryChunk queryChunk3 = new DatabaseQueryChunk(); - List list = new List(); foreach (Pet current in GetPets().Where(current => !list.Contains(current.PetId))) { list.Add(current.PetId); + switch (current.DbState) { case DatabaseUpdateState.NeedsInsert: - queryChunk.AddParameter($"{current.PetId}name", current.Name); - queryChunk2.AddParameter($"{current.PetId}race", current.Race); - queryChunk2.AddParameter($"{current.PetId}color", current.Color); - queryChunk.AddQuery(string.Concat("(", current.PetId, ",", current.OwnerId, ",", current.RoomId, - ",@", current.PetId, "name,", current.X, ",", current.Y, ",", current.Z, ")")); - queryChunk2.AddQuery(string.Concat("(", current.Type, ",@", current.PetId, "race,@", - current.PetId, "color,0,100,'", current.CreationStamp, "',0,0)")); + using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) + { + queryReactor.SetQuery("INSERT INTO pets_data (id,user_id,room_id,name,x,y,z,pet_type,experience,energy,createstamp,nutrition,respect,color,race_id) VALUES" + + $"('{current.PetId}', '{current.OwnerId}', '{current.RoomId}', @petName,'{current.X}', '{current.Y}', '{current.Z}', " + + $"@petType, 0, 100, '{current.CreationStamp}', 0, 0, @petColor, @petRace)"); + + queryReactor.AddParameter("petName", current.Name); + queryReactor.AddParameter("petColor", current.Color); + queryReactor.AddParameter("petType", current.Type); + queryReactor.AddParameter("petRace", current.Race); + queryReactor.RunQuery(); + } break; case DatabaseUpdateState.NeedsUpdate: - queryChunk3.AddParameter($"{current.PetId}name", current.Name); - queryChunk3.AddParameter($"{current.PetId}race", current.Race); - queryChunk3.AddParameter($"{current.PetId}color", current.Color); - queryChunk3.AddQuery(string.Concat("UPDATE bots_data SET room_id = ", current.RoomId, ", name = @", - current.PetId, "name, x = ", current.X, ", Y = ", current.Y, ", Z = ", current.Z, - " WHERE id = ", current.PetId)); - queryChunk3.AddQuery(string.Concat("UPDATE pets_data SET race = @", current.PetId, - "race, color = @", current.PetId, "color, type = ", current.Type, ", experience = ", - current.Experience, ", energy = ", current.Energy, ", nutrition = ", current.Nutrition, - ", respect = ", current.Respect, ", createstamp = '", current.CreationStamp, "' WHERE id = ", - current.PetId)); + using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) + { + queryReactor.SetQuery("UPDATE pets_data SET " + + $"room_id = {current.RoomId}, name = @petName, x = {current.X}, y = {current.Y}, " + + $"z = {current.Z}, race_id = @petRace, pet_type = @petType, experience = {current.Experience}, " + + $"energy = {current.Energy}, nutrition = {current.Nutrition}, respect = {current.Respect}, " + + $"createstamp = '{current.CreationStamp}', color = @petColor WHERE id = {current.PetId}"); + + queryReactor.AddParameter("petName", current.Name); + queryReactor.AddParameter("petRace", current.Race); + queryReactor.AddParameter("petType", current.Type); + queryReactor.AddParameter("petColor", current.Color); + + queryReactor.RunQuery(); + } break; } + current.DbState = DatabaseUpdateState.Updated; } - queryChunk.Execute(dbClient); - queryChunk3.Execute(dbClient); - queryChunk.Dispose(); - queryChunk3.Dispose(); } /// @@ -647,8 +654,8 @@ internal void AppendPetsUpdateString(IQueryAdapter dbClient) internal List GetPets() { List> list = UserList.ToList(); - return - (from current in list select current.Value into value where value.IsPet select value.PetData).ToList(); + + return (from current in list select current.Value into value where value.IsPet select value.PetData).ToList(); } /// @@ -1037,7 +1044,7 @@ internal void UserRoomTimeCycles(RoomUser roomUsers) internal void RoomUserBreedInteraction(RoomUser roomUsers) { - if (roomUsers.IsPet && ((roomUsers.PetData.Type == 3) || (roomUsers.PetData.Type == 4)) && + if (roomUsers.IsPet && ((roomUsers.PetData.Type == "pet_terrier") || (roomUsers.PetData.Type == "pet_bear")) && (roomUsers.PetData.WaitingForBreading > 0) && (roomUsers.PetData.BreadingTile.X == roomUsers.X) && (roomUsers.PetData.BreadingTile.Y == roomUsers.Y)) { roomUsers.Freezed = true; @@ -1045,49 +1052,37 @@ internal void RoomUserBreedInteraction(RoomUser roomUsers) switch (roomUsers.PetData.Type) { - case 3: - if ( - _userRoom.GetRoomItemHandler().BreedingTerrier[roomUsers.PetData.WaitingForBreading] - .PetsList.Count == 2) + case "pet_terrier": + if (_userRoom.GetRoomItemHandler().BreedingTerrier[roomUsers.PetData.WaitingForBreading].PetsList.Count == 2) { - GameClient petBreedOwner = - Yupi.GetGame().GetClientManager().GetClientByUserId(roomUsers.PetData.OwnerId); + GameClient petBreedOwner = Yupi.GetGame().GetClientManager().GetClientByUserId(roomUsers.PetData.OwnerId); - if (petBreedOwner != null) - { - petBreedOwner.SendMessage(PetBreeding.GetMessage(roomUsers.PetData.WaitingForBreading, - _userRoom.GetRoomItemHandler().BreedingTerrier[roomUsers.PetData.WaitingForBreading] - .PetsList[0], - _userRoom.GetRoomItemHandler().BreedingTerrier[roomUsers.PetData.WaitingForBreading] - .PetsList[1])); - } + petBreedOwner?.SendMessage(PetBreeding.GetMessage(roomUsers.PetData.WaitingForBreading, + _userRoom.GetRoomItemHandler().BreedingTerrier[roomUsers.PetData.WaitingForBreading].PetsList[0], + _userRoom.GetRoomItemHandler().BreedingTerrier[roomUsers.PetData.WaitingForBreading] + .PetsList[1])); } break; - case 4: + case "pet_bear": if ( _userRoom.GetRoomItemHandler().BreedingBear[roomUsers.PetData.WaitingForBreading].PetsList .Count == 2) { - GameClient petBreedOwner = - Yupi.GetGame().GetClientManager().GetClientByUserId(roomUsers.PetData.OwnerId); + GameClient petBreedOwner = Yupi.GetGame().GetClientManager().GetClientByUserId(roomUsers.PetData.OwnerId); - if (petBreedOwner != null) - { - petBreedOwner.SendMessage(PetBreeding.GetMessage(roomUsers.PetData.WaitingForBreading, - _userRoom.GetRoomItemHandler().BreedingBear[roomUsers.PetData.WaitingForBreading] - .PetsList[0], - _userRoom.GetRoomItemHandler().BreedingBear[roomUsers.PetData.WaitingForBreading] - .PetsList[1])); - } + petBreedOwner?.SendMessage(PetBreeding.GetMessage(roomUsers.PetData.WaitingForBreading, + _userRoom.GetRoomItemHandler().BreedingBear[roomUsers.PetData.WaitingForBreading] + .PetsList[0], + _userRoom.GetRoomItemHandler().BreedingBear[roomUsers.PetData.WaitingForBreading] + .PetsList[1])); } break; } UpdateUserStatus(roomUsers, false); } - else if (roomUsers.IsPet && ((roomUsers.PetData.Type == 3) || (roomUsers.PetData.Type == 4)) && - (roomUsers.PetData.WaitingForBreading > 0) && (roomUsers.PetData.BreadingTile.X != roomUsers.X) && (roomUsers.PetData.BreadingTile.Y != roomUsers.Y)) + else if (roomUsers.IsPet && ((roomUsers.PetData.Type == "pet_terrier") || (roomUsers.PetData.Type == "pet_bear")) && (roomUsers.PetData.WaitingForBreading > 0) && (roomUsers.PetData.BreadingTile.X != roomUsers.X) && (roomUsers.PetData.BreadingTile.Y != roomUsers.Y)) { roomUsers.Freezed = false; roomUsers.PetData.WaitingForBreading = 0; @@ -1409,9 +1404,7 @@ internal void UserCycleOnRoom(RoomUser roomUsers) // Check if User is Going to the Door. lock (_removeUsers) { - if ((roomUsers.SetX == _userRoom.GetGameMap().Model.DoorX) && - (roomUsers.SetY == _userRoom.GetGameMap().Model.DoorY) && !_removeUsers.Contains(roomUsers) && - !roomUsers.IsBot && !roomUsers.IsPet) + if ((roomUsers.SetX == _userRoom.GetGameMap().Model.DoorX) && (roomUsers.SetY == _userRoom.GetGameMap().Model.DoorY) && !_removeUsers.Contains(roomUsers) && !roomUsers.IsBot && !roomUsers.IsPet) { _removeUsers.Add(roomUsers); return; @@ -1426,8 +1419,7 @@ internal void UserCycleOnRoom(RoomUser roomUsers) } // Pet Must Stop Too! - if ((roomUsers.GoalX == roomUsers.X) && (roomUsers.GoalY == roomUsers.Y) && roomUsers.RidingHorse && - !roomUsers.IsPet) + if ((roomUsers.GoalX == roomUsers.X) && (roomUsers.GoalY == roomUsers.Y) && roomUsers.RidingHorse && !roomUsers.IsPet) { RoomUser horseStopWalkRidingPet = GetRoomUserByVirtualId(Convert.ToInt32(roomUsers.HorseId)); @@ -1486,6 +1478,7 @@ internal void UserCycleOnRoom(RoomUser roomUsers) // Let's go to The Tile! And Walk :D UserGoToTile(roomUsers, invalidStep); + // If User isn't Riding, Must Update Statusses... if (!roomUsers.RidingHorse) roomUsers.UpdateNeeded = true; @@ -1494,6 +1487,7 @@ internal void UserCycleOnRoom(RoomUser roomUsers) // If is a Bot.. Let's Tick the Time Count of Bot.. if (roomUsers.IsBot) roomUsers.BotAi.OnTimerTick(); + UpdateUserEffect(roomUsers, roomUsers.X, roomUsers.Y); } @@ -1513,8 +1507,7 @@ internal void OnCycle(ref int idleCount) try { // Check Disco Procedure... - if ((_userRoom != null) && _userRoom.DiscoMode && (_userRoom.TonerData != null) && - (_userRoom.TonerData.Enabled == 1)) + if ((_userRoom != null) && _userRoom.DiscoMode && (_userRoom.TonerData != null) && (_userRoom.TonerData.Enabled == 1)) { RoomItem tonerItem = _userRoom.GetRoomItemHandler().GetItem(_userRoom.TonerData.ItemId); @@ -1524,8 +1517,8 @@ internal void OnCycle(ref int idleCount) _userRoom.TonerData.Data2 = Yupi.GetRandomNumber(0, 255); _userRoom.TonerData.Data3 = Yupi.GetRandomNumber(0, 255); - ServerMessage tonerComposingMessage = - new ServerMessage(LibraryParser.OutgoingRequest("UpdateRoomItemMessageComposer")); + ServerMessage tonerComposingMessage = new ServerMessage(LibraryParser.OutgoingRequest("UpdateRoomItemMessageComposer")); + tonerItem.Serialize(tonerComposingMessage); _userRoom.SendMessage(tonerComposingMessage); } @@ -1544,9 +1537,7 @@ internal void OnCycle(ref int idleCount) // If is a Valid user, We must increase the User Count.. if (!roomUsers.IsPet && !roomUsers.IsBot) - { userInRoomCount++; - } } // Region: Check Removable Users and Users in Room Count @@ -1563,10 +1554,9 @@ internal void OnCycle(ref int idleCount) else RemoveRoomUser(userToRemove); } + if (userInRoomCount == 0) - { idleCount++; - } if (_roomUserCount != userInRoomCount) UpdateUserCount(userInRoomCount); diff --git a/Yupi/Game/Users/Factories/UserDataFactory.cs b/Yupi/Game/Users/Factories/UserDataFactory.cs index 6ab8359b..640e1b48 100644 --- a/Yupi/Game/Users/Factories/UserDataFactory.cs +++ b/Yupi/Game/Users/Factories/UserDataFactory.cs @@ -148,7 +148,7 @@ internal static UserData GetUserData(string sessionTicket, out uint errorCode) myRoomsTable = queryReactor.GetTable(); // Get User Pets Data - queryReactor.SetQuery($"SELECT * FROM bots_data WHERE user_id = {userId} AND room_id = 0 AND ai_type='pet'"); + queryReactor.SetQuery($"SELECT * FROM pets_data WHERE user_id = {userId} AND room_id = 0 AND ai_type='pet'"); petsTable = queryReactor.GetTable(); // Get User Quests Data @@ -156,7 +156,7 @@ internal static UserData GetUserData(string sessionTicket, out uint errorCode) questsTable = queryReactor.GetTable(); // Get User Bots Data - queryReactor.SetQuery($"SELECT * FROM bots_data WHERE user_id = {userId} AND room_id=0 AND ai_type='generic'"); + queryReactor.SetQuery($"SELECT * FROM bots_data WHERE user_id = {userId} AND room_id = 0 AND ai_type='generic'"); botsTable = queryReactor.GetTable(); // Get User Groups Data @@ -263,22 +263,7 @@ where Yupi.GetGame().GetItemManager().ContainsItemByName(itemName) foreach (DataRow row in myRoomsTable.Rows) myRooms.Add(Yupi.GetGame().GetRoomManager().FetchRoomData((uint)row["id"], row)); - Dictionary pets = new Dictionary(); - - foreach (DataRow row in petsTable.Rows) - { - using (IQueryAdapter queryreactor3 = Yupi.GetDatabaseManager().GetQueryReactor()) - { - queryreactor3.SetQuery($"SELECT * FROM pets_data WHERE id = {row["id"]} LIMIT 1"); - - DataRow row3 = queryreactor3.GetRow(); - - if (row3 == null) - continue; - - pets.Add((uint)row["id"], CatalogManager.GeneratePetFromRow(row, row3)); - } - } + Dictionary pets = petsTable.Rows.Cast().ToDictionary(row => (uint) row["id"], CatalogManager.GeneratePetFromRow); Dictionary quests = new Dictionary(); diff --git a/Yupi/Game/Users/Habbo.cs b/Yupi/Game/Users/Habbo.cs index 5300f677..3f7ea9c1 100644 --- a/Yupi/Game/Users/Habbo.cs +++ b/Yupi/Game/Users/Habbo.cs @@ -900,6 +900,7 @@ internal void OnDisconnect(string reason) { if (Disconnected) return; + Disconnected = true; if (_inventoryComponent != null) diff --git a/Yupi/Game/Users/Inventory/Components/InventoryComponent.cs b/Yupi/Game/Users/Inventory/Components/InventoryComponent.cs index c7e0a4a0..feb056db 100644 --- a/Yupi/Game/Users/Inventory/Components/InventoryComponent.cs +++ b/Yupi/Game/Users/Inventory/Components/InventoryComponent.cs @@ -338,6 +338,7 @@ internal void LoadInventory() using (IQueryAdapter queryReactor2 = Yupi.GetDatabaseManager().GetQueryReactor()) { queryReactor2.SetQuery($"SELECT * FROM bots_data WHERE user_id = {UserId} AND room_id = 0"); + DataTable table2 = queryReactor2.GetTable(); if (table2 == null) @@ -345,23 +346,28 @@ internal void LoadInventory() foreach (DataRow botRow in table2.Rows) { - if ((string) botRow["ai_type"] == "pet") - { - queryReactor2.SetQuery($"SELECT * FROM pets_data WHERE id={botRow[0]} LIMIT 1"); - DataRow row = queryReactor2.GetRow(); + if ((string) botRow["ai_type"] == "generic") + AddBot(BotManager.GenerateBotFromRow(botRow)); + } - if (row == null) - continue; + queryReactor2.SetQuery($"SELECT * FROM pets_data WHERE user_id = {UserId} AND room_id = 0"); - Pet pet = CatalogManager.GeneratePetFromRow(botRow, row); + DataTable table3 = queryReactor2.GetTable(); + + if (table3 == null) + return; + + foreach (DataRow petRow in table3.Rows) + { + if ((string)petRow["ai_type"] == "pet") + { + Pet pet = CatalogManager.GeneratePetFromRow(petRow); if (_inventoryPets.Contains(pet.PetId)) _inventoryPets.Remove(pet.PetId); _inventoryPets.Add(pet.PetId, pet); } - else if ((string) botRow["ai_type"] == "generic") - AddBot(BotManager.GenerateBotFromRow(botRow)); } } } @@ -760,20 +766,26 @@ internal void RunDbUpdate() { if (current.DbState == DatabaseUpdateState.NeedsUpdate) { - queryChunk.AddParameter($"{current.PetId}name", current.Name); - queryChunk.AddParameter($"{current.PetId}race", current.Race); - queryChunk.AddParameter($"{current.PetId}color", current.Color); - - queryChunk.AddQuery(string.Concat("UPDATE bots_data SET room_id = ", current.RoomId, ", name = @", current.PetId, "name, x = ", current.X, ", Y = ", current.Y, ", Z = ", current.Z, " WHERE id = ", current.PetId)); + using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) + { + queryReactor.SetQuery("UPDATE pets_data SET " + + $"room_id = {current.RoomId}, name = @petName, x = {current.X}, y = {current.Y}, " + + $"z = {current.Z}, race_id = @petRace, pet_type = @petType', experience = {current.Experience}, " + + $"energy = {current.Energy}, nutrition = {current.Nutrition}, respect = {current.Respect}, " + + $"createstamp = '{current.CreationStamp}', lasthealth_stamp = '{Yupi.DateTimeToUnix(current.LastHealth)}', untilgrown_stamp = '{Yupi.DateTimeToUnix(current.UntilGrown)}', " + + $"color = @petColor WHERE id = {current.PetId}"); + + queryReactor.AddParameter("petName", current.Name); + queryReactor.AddParameter("petRace", current.Race); + queryReactor.AddParameter("petType", current.Type); + queryReactor.AddParameter("petColor", current.Color); - queryChunk.AddQuery(string.Concat("UPDATE pets_data SET race = @", current.PetId, "race, color = @", current.PetId, "color, type = ", current.Type, ", experience = ", current.Experience, ", energy = ", current.Energy, ", nutrition = ", current.Nutrition, ", respect = ", current.Respect, ", createstamp = '", current.CreationStamp, "', lasthealth_stamp = ", Yupi.DateTimeToUnix(current.LastHealth), ", untilgrown_stamp = ", Yupi.DateTimeToUnix(current.UntilGrown), " WHERE id = ", current.PetId)); + queryReactor.RunQuery(); + } } current.DbState = DatabaseUpdateState.Updated; } - - using (IQueryAdapter queryreactor2 = Yupi.GetDatabaseManager().GetQueryReactor()) - queryChunk.Execute(queryreactor2); } catch (Exception ex) { diff --git a/Yupi/Game/Users/YoutubeManager.cs b/Yupi/Game/Users/YoutubeManager.cs index 5eb12227..6052bdd9 100644 --- a/Yupi/Game/Users/YoutubeManager.cs +++ b/Yupi/Game/Users/YoutubeManager.cs @@ -119,28 +119,4 @@ public void AddUserVideo(GameClient client, string video) } } } - - /// - /// Class YoutubeVideo. - /// - internal class YoutubeVideo - { - internal string Description; - internal string Name; - internal string VideoId; - - internal YoutubeVideo(string videoId, string name, string description) - { - VideoId = videoId; - Name = name; - Description = description; - } - - internal void Serialize(ServerMessage message) - { - message.AppendString(VideoId); - message.AppendString(Name); - message.AppendString(Description); - } - } } \ No newline at end of file diff --git a/Yupi/Game/Users/YoutubeVideo.cs b/Yupi/Game/Users/YoutubeVideo.cs new file mode 100644 index 00000000..35fba1d6 --- /dev/null +++ b/Yupi/Game/Users/YoutubeVideo.cs @@ -0,0 +1,28 @@ +using Yupi.Messages; + +namespace Yupi.Game.Users +{ + /// + /// Class YoutubeVideo. + /// + internal class YoutubeVideo + { + internal string Description; + internal string Name; + internal string VideoId; + + internal YoutubeVideo(string videoId, string name, string description) + { + VideoId = videoId; + Name = name; + Description = description; + } + + internal void Serialize(ServerMessage message) + { + message.AppendString(VideoId); + message.AppendString(Name); + message.AppendString(Description); + } + } +} diff --git a/Yupi/Messages/Handlers/Items.cs b/Yupi/Messages/Handlers/Items.cs index 36f7b694..1ab14e65 100644 --- a/Yupi/Messages/Handlers/Items.cs +++ b/Yupi/Messages/Handlers/Items.cs @@ -146,7 +146,7 @@ internal void PetBreedResult() break; } - Pet pet = CatalogManager.CreatePet(Session.GetHabbo().Id, petName, item.GetBaseItem().InteractionType == Interaction.BreedingTerrier ? 25 : 24, petType.ToString(), "ffffff"); + Pet pet = CatalogManager.CreatePet(Session.GetHabbo().Id, petName, item.GetBaseItem().InteractionType == Interaction.BreedingTerrier ? "pet_terrierbaby" : "pet_bearbaby", petType.ToString(), "ffffff"); if (pet == null) return; @@ -1384,7 +1384,7 @@ internal void CompostMonsterplant() RoomUser pet = room.GetRoomUserManager().GetPet(moplaId); - if (pet == null || !pet.IsPet || pet.PetData.Type != 16 || pet.PetData.MoplaBreed == null) + if (pet == null || !pet.IsPet || pet.PetData.Type != "pet_monster" || pet.PetData.MoplaBreed == null) { Session.SendNotif(Yupi.GetLanguage().GetVar("monsterplant_error_2")); return; @@ -1430,9 +1430,8 @@ internal void CompostMonsterplant() Session.SendNotif(Yupi.GetLanguage().GetVar("monsterplant_error_5")); } - dbClient.RunFastQuery($"DELETE FROM bots_data WHERE id = {moplaId};"); - dbClient.RunFastQuery($"DELETE FROM pets_plants WHERE pet_id = {moplaId};"); dbClient.RunFastQuery($"DELETE FROM pets_data WHERE id = {moplaId};"); + dbClient.RunFastQuery($"DELETE FROM pets_plants WHERE pet_id = {moplaId};"); } } @@ -1450,7 +1449,7 @@ internal void MovePet() RoomUser pet = room.GetRoomUserManager().GetPet(petId); - if (pet == null || !pet.IsPet || pet.PetData.Type != 16) + if (pet == null || !pet.IsPet || pet.PetData.Type != "pet_monster") { Session.SendNotif(Yupi.GetLanguage().GetVar("monsterplant_error_7")); return; @@ -1548,7 +1547,7 @@ internal void RespectPet() pet.PetData.OnRespect(); - if (pet.PetData.Type == 16) + if (pet.PetData.Type == "pet_monster") Yupi.GetGame().GetAchievementManager().ProgressUserAchievement(Session, "ACH_MonsterPlantTreater", 1); else { @@ -1577,14 +1576,14 @@ internal void AllowAllRide() if (pet.PetData.AnyoneCanRide == 1) { using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) - queryReactor.RunFastQuery($"UPDATE pets_data SET anyone_ride=0 WHERE id={num} LIMIT 1"); + queryReactor.RunFastQuery($"UPDATE pets_data SET anyone_ride = '0' WHERE id={num} LIMIT 1"); pet.PetData.AnyoneCanRide = 0; } else { using (IQueryAdapter queryreactor2 = Yupi.GetDatabaseManager().GetQueryReactor()) - queryreactor2.RunFastQuery($"UPDATE pets_data SET anyone_ride=1 WHERE id={num} LIMIT 1"); + queryreactor2.RunFastQuery($"UPDATE pets_data SET anyone_ride = '1' WHERE id = {num} LIMIT 1"); pet.PetData.AnyoneCanRide = 1; } @@ -1659,11 +1658,14 @@ internal void AddSaddle() goto IL_40C; } } + if (item.GetBaseItem().Name.Contains("horse_dye")) { string s2 = item.GetBaseItem().Name.Split('_')[2]; - int num2 = int.Parse(s2); - int num3 = 2 + num2 * 4 - 4; + + uint num2 = uint.Parse(s2); + uint num3 = 2 + num2 * 4 - 4; + switch (num2) { case 13: @@ -1682,11 +1684,13 @@ internal void AddSaddle() num3 = 73; break; } - pet.PetData.Race = num3.ToString(); - using ( - IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) + + pet.PetData.Race = num3; + + using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { - queryReactor.RunFastQuery("UPDATE pets_data SET race = '" + pet.PetData.Race + "' WHERE id = " + pet.PetData.PetId); + queryReactor.RunFastQuery("UPDATE pets_data SET race_id = '" + pet.PetData.Race + "' WHERE id = " + pet.PetData.PetId); + queryReactor.RunFastQuery($"DELETE FROM items_rooms WHERE id={item.Id} LIMIT 1"); goto IL_40C; } @@ -1711,7 +1715,7 @@ internal void AddSaddle() using ( IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { - queryReactor.RunFastQuery($"UPDATE pets_data SET have_saddle = 1 WHERE id = {pet.PetData.PetId}"); + queryReactor.RunFastQuery($"UPDATE pets_data SET have_saddle = '1' WHERE id = {pet.PetData.PetId}"); queryReactor.RunFastQuery($"DELETE FROM items_rooms WHERE id={item.Id} LIMIT 1"); } goto IL_40C; @@ -1739,8 +1743,8 @@ internal void AddSaddle() ServerMessage serverMessage2 = new ServerMessage(LibraryParser.OutgoingRequest("SerializePetMessageComposer")); serverMessage2.AppendInteger(pet.PetData.VirtualId); serverMessage2.AppendInteger(pet.PetData.PetId); - serverMessage2.AppendInteger(pet.PetData.Type); - serverMessage2.AppendInteger(int.Parse(pet.PetData.Race)); + serverMessage2.AppendInteger(pet.PetData.RaceId); + serverMessage2.AppendInteger(pet.PetData.Race); serverMessage2.AppendString(pet.PetData.Color.ToLower()); if (pet.PetData.HaveSaddle) { @@ -1792,7 +1796,7 @@ internal void RemoveSaddle() using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { - queryReactor.RunFastQuery($"UPDATE pets_data SET have_saddle = 0 WHERE id = {pet.PetData.PetId}"); + queryReactor.RunFastQuery($"UPDATE pets_data SET have_saddle = '0' WHERE id = {pet.PetData.PetId}"); queryReactor.RunFastQuery($"INSERT INTO items_rooms (user_id, item_name) VALUES ({Session.GetHabbo().Id}, 'horse_saddle1');"); } @@ -1807,8 +1811,8 @@ internal void RemoveSaddle() ServerMessage serverMessage2 = new ServerMessage(LibraryParser.OutgoingRequest("SerializePetMessageComposer")); serverMessage2.AppendInteger(pet.PetData.VirtualId); serverMessage2.AppendInteger(pet.PetData.PetId); - serverMessage2.AppendInteger(pet.PetData.Type); - serverMessage2.AppendInteger(int.Parse(pet.PetData.Race)); + serverMessage2.AppendInteger(pet.PetData.RaceId); + serverMessage2.AppendInteger(pet.PetData.Race); serverMessage2.AppendString(pet.PetData.Color.ToLower()); serverMessage2.AppendInteger(1); serverMessage2.AppendInteger(2); @@ -1825,22 +1829,24 @@ internal void RemoveSaddle() internal void CancelMountOnPet() { - Room room = - Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); - if (room == null) - return; - RoomUser roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); + Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); + + RoomUser roomUserByHabbo = room?.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); + if (roomUserByHabbo == null) return; + uint petId = Request.GetUInteger(); + RoomUser pet = room.GetRoomUserManager().GetPet(petId); - if (pet == null || pet.PetData == null) + + if (pet?.PetData == null) return; + roomUserByHabbo.RidingHorse = false; roomUserByHabbo.HorseId = 0u; pet.RidingHorse = false; pet.HorseId = 0u; - { roomUserByHabbo.MoveTo(roomUserByHabbo.X + 1, roomUserByHabbo.Y + 1); roomUserByHabbo.ApplyEffect(-1); @@ -1849,16 +1855,18 @@ internal void CancelMountOnPet() internal void GiveHanditem() { - Room room = - Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); - if (room == null) - return; - RoomUser roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); + Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); + + RoomUser roomUserByHabbo = room?.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); + if (roomUserByHabbo == null) return; + RoomUser roomUserByHabbo2 = room.GetRoomUserManager().GetRoomUserByHabbo(Request.GetUInteger()); + if (roomUserByHabbo2 == null) return; + if ((!( Math.Abs(roomUserByHabbo.X - roomUserByHabbo2.X) < 3 && @@ -1878,7 +1886,9 @@ internal void RedeemVoucher() string productName = string.Empty; string productDescription = string.Empty; bool isValid = false; + DataRow row; + using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { queryReactor.SetQuery("SELECT * FROM items_vouchers WHERE voucher = @vo LIMIT 1"); @@ -1886,35 +1896,32 @@ internal void RedeemVoucher() row = queryReactor.GetRow(); } + if (row != null) { - if (row != null) - { - isValid = true; - using (IQueryAdapter queryreactor2 = Yupi.GetDatabaseManager().GetQueryReactor()) - { - queryreactor2.SetQuery("DELETE FROM items_vouchers WHERE voucher = @vou LIMIT 1"); - queryreactor2.AddParameter("vou", query); - queryreactor2.RunQuery(); - } + isValid = true; - Session.GetHabbo().Credits += (uint)row["value"]; - Session.GetHabbo().UpdateCreditsBalance(); - Session.GetHabbo().NotifyNewPixels((uint)row["extra_duckets"]); + using (IQueryAdapter queryreactor2 = Yupi.GetDatabaseManager().GetQueryReactor()) + { + queryreactor2.SetQuery("DELETE FROM items_vouchers WHERE voucher = @vou LIMIT 1"); + queryreactor2.AddParameter("vou", query); + queryreactor2.RunQuery(); } - Session.GetHabbo().NotifyVoucher(isValid, productName, productDescription); + + Session.GetHabbo().Credits += (uint)row["value"]; + Session.GetHabbo().UpdateCreditsBalance(); + Session.GetHabbo().NotifyNewPixels((uint)row["extra_duckets"]); } + + Session.GetHabbo().NotifyVoucher(isValid, productName, productDescription); } internal void RemoveHanditem() { - Room room = - Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); - if (room == null) - return; - RoomUser roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); - if (roomUserByHabbo == null) - return; - if (roomUserByHabbo.CarryItemId > 0 && roomUserByHabbo.CarryTimer > 0) + Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); + + RoomUser roomUserByHabbo = room?.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); + + if (roomUserByHabbo?.CarryItemId > 0 && roomUserByHabbo.CarryTimer > 0) roomUserByHabbo.CarryItem(0); } @@ -1922,18 +1929,17 @@ internal void MountOnPet() { Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); - if (room == null) - return; - RoomUser roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); + RoomUser roomUserByHabbo = room?.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (roomUserByHabbo == null) return; uint petId = Request.GetUInteger(); bool flag = Request.GetBool(); + RoomUser pet = room.GetRoomUserManager().GetPet(petId); - if (pet == null || pet.PetData == null) + if (pet?.PetData == null) return; if (pet.PetData.AnyoneCanRide == 0 && pet.PetData.OwnerId != roomUserByHabbo.UserId) @@ -1947,7 +1953,9 @@ internal void MountOnPet() if (pet.RidingHorse) { string[] value = PetLocale.GetValue("pet.alreadymounted"); + Random random = new Random(); + pet.Chat(null, value[random.Next(0, value.Length - 1)], false, 0); } else if (!roomUserByHabbo.RidingHorse) @@ -2001,19 +2009,18 @@ internal void MountOnPet() } GameClient clientByUserId = Yupi.GetGame().GetClientManager().GetClientByUserId(Session.GetHabbo().Id); + if (Session.GetHabbo().Id != pet.PetData.OwnerId) { if (clientByUserId != null) - { Yupi.GetGame().GetAchievementManager().ProgressUserAchievement(clientByUserId, "ACH_HorseRent", 1); - } } ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("SerializePetMessageComposer")); serverMessage.AppendInteger(pet.PetData.VirtualId); serverMessage.AppendInteger(pet.PetData.PetId); - serverMessage.AppendInteger(pet.PetData.Type); - serverMessage.AppendInteger(int.Parse(pet.PetData.Race)); + serverMessage.AppendInteger(pet.PetData.RaceId); + serverMessage.AppendInteger(pet.PetData.Race); serverMessage.AppendString(pet.PetData.Color.ToLower()); serverMessage.AppendInteger(2); serverMessage.AppendInteger(3); @@ -2034,40 +2041,38 @@ internal void MountOnPet() internal void SaveWired() { uint pId = Request.GetUInteger(); - RoomItem item = - Yupi.GetGame() - .GetRoomManager() - .GetRoom(Session.GetHabbo().CurrentRoomId) - .GetRoomItemHandler() - .GetItem(pId); + + RoomItem item = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomItemHandler().GetItem(pId); + WiredSaver.SaveWired(Session, item, Request); } internal void SaveWiredConditions() { uint pId = Request.GetUInteger(); - RoomItem item = - Yupi.GetGame() - .GetRoomManager() - .GetRoom(Session.GetHabbo().CurrentRoomId) - .GetRoomItemHandler() - .GetItem(pId); + + RoomItem item = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomItemHandler().GetItem(pId); + WiredSaver.SaveWired(Session, item, Request); } internal void ChooseTvPlaylist() { uint num = Request.GetUInteger(); + string video = Request.GetString(); RoomItem item = Session.GetHabbo().CurrentRoom.GetRoomItemHandler().GetItem(num); if (item.GetBaseItem().InteractionType != Interaction.YoutubeTv) return; + if (!Session.GetHabbo().GetYoutubeManager().Videos.ContainsKey(video)) return; + item.ExtraData = video; item.UpdateState(); + ServerMessage serverMessage = new ServerMessage(); serverMessage.Init(LibraryParser.OutgoingRequest("YouTubeLoadVideoMessageComposer")); serverMessage.AppendInteger(num); @@ -2076,47 +2081,63 @@ internal void ChooseTvPlaylist() serverMessage.AppendInteger(0); serverMessage.AppendInteger(0); Response = serverMessage; + SendResponse(); } internal void ChooseTvPlayerVideo() { + // Not Coded? @TODO } internal void GetTvPlayer() { uint itemId = Request.GetUInteger(); + RoomItem item = Session.GetHabbo().CurrentRoom.GetRoomItemHandler().GetItem(itemId); - if (item == null) return; + + if (item == null) + return; + Dictionary videos = Session.GetHabbo().GetYoutubeManager().Videos; - if (videos == null) return; - ServerMessage serverMessage = new ServerMessage(); - serverMessage.Init(LibraryParser.OutgoingRequest("YouTubeLoadVideoMessageComposer")); - serverMessage.AppendInteger(itemId); - serverMessage.AppendString(item.ExtraData); - serverMessage.AppendInteger(0); - serverMessage.AppendInteger(0);// duration - serverMessage.AppendInteger(0); - Response = serverMessage; + + if (videos == null) + return; + + Response.Init(LibraryParser.OutgoingRequest("YouTubeLoadVideoMessageComposer")); + Response.AppendInteger(itemId); + Response.AppendString(item.ExtraData); + Response.AppendInteger(0); + Response.AppendInteger(0); + Response.AppendInteger(0); + SendResponse(); - ServerMessage serverMessage2 = new ServerMessage(); - serverMessage2.Init(LibraryParser.OutgoingRequest("YouTubeLoadPlaylistsMessageComposer")); - serverMessage2.AppendInteger(itemId); - serverMessage2.AppendInteger(videos.Count); + + Response.Clear(); + + Response.Init(LibraryParser.OutgoingRequest("YouTubeLoadPlaylistsMessageComposer")); + Response.AppendInteger(itemId); + Response.AppendInteger(videos.Count); + foreach (YoutubeVideo video in videos.Values) - video.Serialize(serverMessage2); - serverMessage2.AppendString(item.ExtraData); - Response = serverMessage2; + video.Serialize(Response); + + Response.AppendString(item.ExtraData); + SendResponse(); } internal void PlaceBot() { Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); + if (room == null || !room.CheckRights(Session, true)) return; + uint num = Request.GetUInteger(); + RoomBot bot = Session.GetHabbo().GetInventoryComponent().GetBot(num); + if (bot == null) return; @@ -2128,8 +2149,10 @@ internal void PlaceBot() Session.SendNotif(Yupi.GetLanguage().GetVar("bot_error_1")); return; } + using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) queryReactor.RunFastQuery(string.Concat("UPDATE bots_data SET room_id = '", room.RoomId, "', x = '", x, "', y = '", y, "' WHERE id = '", num, "'")); + bot.RoomId = room.RoomId; bot.X = x; @@ -2137,6 +2160,7 @@ internal void PlaceBot() room.GetRoomUserManager().DeployBot(bot, null); bot.WasPicked = false; + Session.GetHabbo().GetInventoryComponent().MoveBotToRoom(num); Session.SendMessage(Session.GetHabbo().GetInventoryComponent().SerializeBotInventory()); } @@ -2144,19 +2168,21 @@ internal void PlaceBot() internal void PickUpBot() { uint id = Request.GetUInteger(); - Room room = - Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); + + Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); RoomUser bot = room.GetRoomUserManager().GetBot(id); - if (Session == null || Session.GetHabbo() == null || - Session.GetHabbo().GetInventoryComponent() == null || bot == null || - !room.CheckRights(Session, true)) + if (Session?.GetHabbo() == null || Session.GetHabbo().GetInventoryComponent() == null || bot == null || !room.CheckRights(Session, true)) return; + Session.GetHabbo().GetInventoryComponent().AddBot(bot.BotData); + using (IQueryAdapter queryreactor2 = Yupi.GetDatabaseManager().GetQueryReactor()) queryreactor2.RunFastQuery("UPDATE bots_data SET room_id = '0' WHERE id = " + id); + room.GetRoomUserManager().RemoveBot(bot.VirtualId, false); bot.BotData.WasPicked = true; + Session.SendMessage(Session.GetHabbo().GetInventoryComponent().SerializeBotInventory()); } diff --git a/Yupi/Messages/Handlers/Others.cs b/Yupi/Messages/Handlers/Others.cs index e3498015..eef7fb58 100644 --- a/Yupi/Messages/Handlers/Others.cs +++ b/Yupi/Messages/Handlers/Others.cs @@ -113,19 +113,7 @@ internal void AddStaffPick() /// internal void GetClientVersionMessageEvent() { - string release = Request.GetString(); - if (release.Contains("201409222303-304766480")) - { - Session.GetHabbo().ReleaseName = "304766480"; - Console.WriteLine("[Handled] Release Id: RELEASE63-201409222303-304766480"); - } - else if (release.Contains("201411201226-580134750")) - { - Session.GetHabbo().ReleaseName = "304766480"; - Console.WriteLine("[Handled] Release Id: RELEASE63-201411201226-580134750"); - } - else - LibraryParser.ReleaseName = "Undefined Release"; + Request.GetString(); } /// @@ -160,13 +148,6 @@ internal void LatencyTest() SendResponse(); } - /// - /// Fuckyous this instance. - /// - internal void Fuckyou() - { - } - /// /// Initializes the crypto. /// @@ -180,6 +161,7 @@ internal void InitCrypto() SendResponse(); return; } + Response.Init(LibraryParser.OutgoingRequest("InitCryptoMessageComposer")); Response.AppendString(Handler.GetRsaDiffieHellmanPrimeKey()); Response.AppendString(Handler.GetRsaDiffieHellmanGeneratorKey()); @@ -258,8 +240,9 @@ internal void InfoRetrieve() return; Habbo habbo = Session.GetHabbo(); + bool tradeLocked = Session.GetHabbo().CheckTrading(); - bool canUseFloorEditor = ServerExtraSettings.EveryoneUseFloor || Session.GetHabbo().Vip || Session.GetHabbo().Rank >= 4; + bool canUseFloorEditor = true;//ServerExtraSettings.EveryoneUseFloor || Session.GetHabbo().Vip || Session.GetHabbo().Rank >= 4; Response.Init(LibraryParser.OutgoingRequest("UserObjectMessageComposer")); Response.AppendInteger(habbo.Id); diff --git a/Yupi/Messages/Handlers/Rooms.cs b/Yupi/Messages/Handlers/Rooms.cs index 0299a3a0..57b9f644 100644 --- a/Yupi/Messages/Handlers/Rooms.cs +++ b/Yupi/Messages/Handlers/Rooms.cs @@ -28,6 +28,7 @@ using Yupi.Game.Pathfinding; using Yupi.Game.Pets; using Yupi.Game.Pets.Enums; +using Yupi.Game.Pets.Structs; using Yupi.Game.Polls; using Yupi.Game.Polls.Enums; using Yupi.Game.RoomBots; @@ -49,26 +50,33 @@ partial class GameClientMessageHandler public void GetPetBreeds() { string type = Request.GetString(); - string petType; - int petId = PetRace.GetPetId(type, out petType); - List races = PetRace.GetRacesForRaceId(petId); + + string petType = PetTypeManager.GetPetTypeByHabboPetType(type); + + uint petId = PetTypeManager.GetPetRaceByItemName(petType); + + List races = PetTypeManager.GetRacesByPetType(petType); + ServerMessage message = new ServerMessage(LibraryParser.OutgoingRequest("SellablePetBreedsMessageComposer")); - message.AppendString(petType); + + message.AppendString(type); message.AppendInteger(races.Count); + foreach (PetRace current in races) { message.AppendInteger(petId); - message.AppendInteger(current.Color1); - message.AppendInteger(current.Color2); - message.AppendBool(current.Has1Color); - message.AppendBool(current.Has2Color); + message.AppendInteger(current.ColorOne); + message.AppendInteger(current.ColorTwo); + message.AppendBool(current.HasColorOne); + message.AppendBool(current.HasColorTwo); } + Session.SendMessage(message); } internal void GoRoom() { - if (Yupi.ShutdownStarted || Session == null || Session.GetHabbo() == null) + if (Yupi.ShutdownStarted || Session?.GetHabbo() == null) return; uint num = Request.GetUInteger(); RoomData roomData = Yupi.GetGame().GetRoomManager().GenerateRoomData(num); @@ -1265,14 +1273,16 @@ internal void RateRoom() internal void Dance() { Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); - if (room == null) - return; - RoomUser roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); + RoomUser roomUserByHabbo = room?.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); + if (roomUserByHabbo == null) return; + roomUserByHabbo.UnIdle(); - int num = Request.GetInteger(); - if (num < 0 || num > 4) + + uint num = Request.GetUInteger(); + + if (num > 4) num = 0; if (num > 0 && roomUserByHabbo.CarryItemId > 0) @@ -1504,19 +1514,21 @@ internal void GetPromotionableRooms() serverMessage.Init(LibraryParser.OutgoingRequest("CatalogPromotionGetRoomsMessageComposer")); serverMessage.AppendBool(true); serverMessage.AppendInteger(Session.GetHabbo().UsersRooms.Count); + foreach (RoomData current in Session.GetHabbo().UsersRooms) { serverMessage.AppendInteger(current.Id); serverMessage.AppendString(current.Name); serverMessage.AppendBool(false); } + Response = serverMessage; SendResponse(); } internal void SaveHeightmap() { - if (Session != null && Session.GetHabbo() != null) + if (Session?.GetHabbo() != null) { Room room = Session.GetHabbo().CurrentRoom; @@ -1563,6 +1575,7 @@ internal void SaveHeightmap() '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', '\r' }; + if (heightMap.Any(letter => !validLetters.Contains(letter))) { Session.SendNotif(Yupi.GetLanguage().GetVar("user_floor_editor_error")); @@ -1579,8 +1592,7 @@ internal void SaveHeightmap() message.AppendString("floorplan_editor.error"); message.AppendInteger(1); message.AppendString("errors"); - message.AppendString( - "(general): too large height (max 64 tiles)\r(general): too large area (max 1800 tiles)"); + message.AppendString("(general): too large height (max 64 tiles)\r(general): too large area (max 1800 tiles)"); Session.SendMessage(message); return; @@ -1653,29 +1665,39 @@ internal void SaveHeightmap() internal void PlantMonsterplant(RoomItem mopla, Room room) { int rarity = 0, internalRarity = 0; + if (room == null || mopla == null) return; if ((mopla.GetBaseItem().InteractionType != Interaction.Moplaseed) && (mopla.GetBaseItem().InteractionType != Interaction.RareMoplaSeed)) return; + if (string.IsNullOrEmpty(mopla.ExtraData) || mopla.ExtraData == "0") rarity = 1; + if (!string.IsNullOrEmpty(mopla.ExtraData) && mopla.ExtraData != "0") rarity = int.TryParse(mopla.ExtraData, out internalRarity) ? internalRarity : 1; int getX = mopla.X; int getY = mopla.Y; + room.GetRoomItemHandler().RemoveFurniture(Session, mopla.Id, false); - Pet pet = CatalogManager.CreatePet(Session.GetHabbo().Id, "Monsterplant", 16, "0", "0", rarity); + + Pet pet = CatalogManager.CreatePet(Session.GetHabbo().Id, "Monsterplant", "pet_monster", "0", "0", rarity); + Response.Init(LibraryParser.OutgoingRequest("SendMonsterplantIdMessageComposer")); Response.AppendInteger(pet.PetId); SendResponse(); + using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) - queryReactor.RunFastQuery(string.Concat("UPDATE bots_data SET room_id = '", room.RoomId, "', x = '", getX, "', y = '", getY, "' WHERE id = '", pet.PetId, "'")); + queryReactor.RunFastQuery(string.Concat("UPDATE pets_data SET room_id = '", room.RoomId, "', x = '", getX, "', y = '", getY, "' WHERE id = '", pet.PetId, "'")); + pet.PlacedInRoom = true; pet.RoomId = room.RoomId; + RoomBot bot = new RoomBot(pet.PetId, pet.OwnerId, pet.RoomId, AiType.Pet, "freeroam", pet.Name, "", pet.Look, getX, getY, 0.0, 4, null, null, "", 0, ""); + room.GetRoomUserManager().DeployBot(bot, pet); if (pet.DbState != DatabaseUpdateState.NeedsInsert) @@ -1691,9 +1713,12 @@ internal void PlantMonsterplant(RoomItem mopla, Room room) internal void KickBot() { Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); + if (room == null || !room.CheckRights(Session, true)) return; + RoomUser roomUserByVirtualId = room.GetRoomUserManager().GetRoomUserByVirtualId(Request.GetInteger()); + if (roomUserByVirtualId == null || !roomUserByVirtualId.IsBot) return; @@ -1704,11 +1729,11 @@ internal void PlacePet() { Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); - if (room == null || (!room.RoomData.AllowPets && !room.CheckRights(Session, true)) || - !room.CheckRights(Session, true)) + if (room == null || (!room.RoomData.AllowPets && !room.CheckRights(Session, true)) || !room.CheckRights(Session, true)) return; uint petId = Request.GetUInteger(); + Pet pet = Session.GetHabbo().GetInventoryComponent().GetPet(petId); if (pet == null || pet.PlacedInRoom) @@ -1721,20 +1746,21 @@ internal void PlacePet() return; using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) - queryReactor.RunFastQuery("UPDATE bots_data SET room_id = '" + room.RoomId + "', x = '" + x + "', y = '" + y + "' WHERE id = '" + petId + "'"); + queryReactor.RunFastQuery("UPDATE pets_data SET room_id = '" + room.RoomId + "', x = '" + x + "', y = '" + y + "' WHERE id = '" + petId + "'"); pet.PlacedInRoom = true; pet.RoomId = room.RoomId; - room.GetRoomUserManager() - .DeployBot( - new RoomBot(pet.PetId, Convert.ToUInt32(pet.OwnerId), pet.RoomId, AiType.Pet, "freeroam", pet.Name, - "", pet.Look, x, y, 0.0, 4, null, null, "", 0, ""), pet); + room.GetRoomUserManager().DeployBot(new RoomBot(pet.PetId, Convert.ToUInt32(pet.OwnerId), pet.RoomId, AiType.Pet, "freeroam", pet.Name, "", pet.Look, x, y, 0.0, 4, null, null, "", 0, ""), pet); + Session.GetHabbo().GetInventoryComponent().MovePetToRoom(pet.PetId); + if (pet.DbState != DatabaseUpdateState.NeedsInsert) pet.DbState = DatabaseUpdateState.NeedsUpdate; + using (IQueryAdapter queryreactor2 = Yupi.GetDatabaseManager().GetQueryReactor()) room.GetRoomUserManager().SavePets(queryreactor2); + Session.SendMessage(Session.GetHabbo().GetInventoryComponent().SerializePetInventory()); } @@ -1797,11 +1823,16 @@ internal void HandleBotSpeechList() internal void ManageBotActions() { Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); + uint botId = Request.GetUInteger(); int action = Request.GetInteger(); + string data = Yupi.FilterInjectionChars(Request.GetString()); + RoomUser bot = room.GetRoomUserManager().GetBot(botId); + bool flag = false; + switch (action) { case 1: @@ -1815,8 +1846,11 @@ internal void ManageBotActions() string[] speechsJunk = array[0].Substring(0, array[0].Length > 1024 ? 1024 : array[0].Length) .Split(Convert.ToChar(13)); + bool speak = array[1] == "true"; - int speechDelay = int.Parse(array[2]); + + uint speechDelay = uint.Parse(array[2]); + bool mix = array[3] == "true"; if (speechDelay < 7) speechDelay = 7; @@ -1828,10 +1862,10 @@ internal void ManageBotActions() .Aggregate(string.Empty, (current, speech) => current + ServerUserChatTextHandler.FilterHtml(speech, Session.GetHabbo().GotCommand("ha")) + ";"); + using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { - queryReactor.SetQuery( - "UPDATE bots_data SET automatic_chat = @autochat, speaking_interval = @interval, mix_phrases = @mix_phrases, speech = @speech WHERE id = @botid"); + queryReactor.SetQuery("UPDATE bots_data SET automatic_chat = @autochat, speaking_interval = @interval, mix_phrases = @mix_phrases, speech = @speech WHERE id = @botid"); queryReactor.AddParameter("autochat", speak ? "1" : "0"); queryReactor.AddParameter("interval", speechDelay); @@ -1884,7 +1918,7 @@ internal void ManageBotActions() else { Random random = new Random(); - bot.DanceId = random.Next(1, 4); + bot.DanceId = (uint) random.Next(1, 4); bot.BotData.DanceId = bot.DanceId; } ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("DanceStatusMessageComposer")); diff --git a/Yupi/Messages/Handlers/Users.cs b/Yupi/Messages/Handlers/Users.cs index 86219a04..23ba3ec1 100644 --- a/Yupi/Messages/Handlers/Users.cs +++ b/Yupi/Messages/Handlers/Users.cs @@ -29,6 +29,7 @@ partial class GameClientMessageHandler public void SendBullyReport() { uint reportedId = Request.GetUInteger(); + Yupi.GetGame().GetModerationTool().SendNewTicket(Session, 104, 9, reportedId, string.Empty, new List()); Response.Init(LibraryParser.OutgoingRequest("BullyReportSentMessageComposer")); @@ -73,11 +74,11 @@ internal void RetrieveCitizenship() /// internal void LoadClubGifts() { - if (Session == null || Session.GetHabbo() == null) + if (Session?.GetHabbo() == null) return; - //var i = 0; - //var i2 = 0; + Session.GetHabbo().GetSubscriptionManager().GetSubscription(); + ServerMessage serverMessage = new ServerMessage(); serverMessage.Init(LibraryParser.OutgoingRequest("LoadCatalogClubGiftsMessageComposer")); serverMessage.AppendInteger(0); // i @@ -90,7 +91,7 @@ internal void LoadClubGifts() /// internal void ChooseClubGift() { - if (Session == null || Session.GetHabbo() == null) + if (Session?.GetHabbo() == null) return; Request.GetString(); } @@ -101,24 +102,26 @@ internal void ChooseClubGift() internal void GetUserTags() { Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); - if (room == null) - return; - RoomUser roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(Request.GetUInteger()); + + RoomUser roomUserByHabbo = room?.GetRoomUserManager().GetRoomUserByHabbo(Request.GetUInteger()); + if (roomUserByHabbo == null || roomUserByHabbo.IsBot) return; + Response.Init(LibraryParser.OutgoingRequest("UserTagsMessageComposer")); Response.AppendInteger(roomUserByHabbo.GetClient().GetHabbo().Id); Response.AppendInteger(roomUserByHabbo.GetClient().GetHabbo().Tags.Count); + foreach (string current in roomUserByHabbo.GetClient().GetHabbo().Tags) Response.AppendString(current); + SendResponse(); if (Session != roomUserByHabbo.GetClient()) return; + if (Session.GetHabbo().Tags.Count >= 5) - Yupi.GetGame() - .GetAchievementManager() - .ProgressUserAchievement(roomUserByHabbo.GetClient(), "ACH_UserTags", 5); + Yupi.GetGame().GetAchievementManager().ProgressUserAchievement(roomUserByHabbo.GetClient(), "ACH_UserTags", 5); } /// @@ -127,33 +130,32 @@ internal void GetUserTags() internal void GetUserBadges() { Room room = Yupi.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); - if (room != null) + + RoomUser roomUserByHabbo = room?.GetRoomUserManager().GetRoomUserByHabbo(Request.GetUInteger()); + + if (roomUserByHabbo != null && !roomUserByHabbo.IsBot && roomUserByHabbo.GetClient() != null && roomUserByHabbo.GetClient().GetHabbo() != null) { - RoomUser roomUserByHabbo = room.GetRoomUserManager().GetRoomUserByHabbo(Request.GetUInteger()); - if (roomUserByHabbo != null && !roomUserByHabbo.IsBot && roomUserByHabbo.GetClient() != null && roomUserByHabbo.GetClient().GetHabbo() != null) + Session.GetHabbo().LastSelectedUser = roomUserByHabbo.UserId; + Response.Init(LibraryParser.OutgoingRequest("UserBadgesMessageComposer")); + Response.AppendInteger(roomUserByHabbo.GetClient().GetHabbo().Id); + + Response.StartArray(); + foreach ( + Badge badge in + roomUserByHabbo.GetClient() + .GetHabbo() + .GetBadgeComponent() + .BadgeList.Values.Cast() + .Where(badge => badge.Slot > 0).Take(5)) { - Session.GetHabbo().LastSelectedUser = roomUserByHabbo.UserId; - Response.Init(LibraryParser.OutgoingRequest("UserBadgesMessageComposer")); - Response.AppendInteger(roomUserByHabbo.GetClient().GetHabbo().Id); - - Response.StartArray(); - foreach ( - Badge badge in - roomUserByHabbo.GetClient() - .GetHabbo() - .GetBadgeComponent() - .BadgeList.Values.Cast() - .Where(badge => badge.Slot > 0).Take(5)) - { - Response.AppendInteger(badge.Slot); - Response.AppendString(badge.Code); + Response.AppendInteger(badge.Slot); + Response.AppendString(badge.Code); - Response.SaveArray(); - } - - Response.EndArray(); - SendResponse(); + Response.SaveArray(); } + + Response.EndArray(); + SendResponse(); } } @@ -236,8 +238,11 @@ internal void EnableEffect() internal void MuteUser() { uint num = Request.GetUInteger(); + Request.GetUInteger(); + uint num2 = Request.GetUInteger(); + Room currentRoom = Session.GetHabbo().CurrentRoom; if ((currentRoom == null || (currentRoom.RoomData.WhoCanBan == 0 && !currentRoom.CheckRights(Session, true)) || (currentRoom.RoomData.WhoCanBan == 1 && !currentRoom.CheckRights(Session))) && Session.GetHabbo().Rank < Convert.ToUInt32(Yupi.GetDbConfig().DbData["ambassador.minrank"])) @@ -247,17 +252,18 @@ internal void MuteUser() if (roomUserByHabbo == null) return; + if (roomUserByHabbo.GetClient().GetHabbo().Rank >= Session.GetHabbo().Rank) return; + if (currentRoom.MutedUsers.ContainsKey(num)) { if (currentRoom.MutedUsers[num] >= (ulong)Yupi.GetUnixTimeStamp()) return; currentRoom.MutedUsers.Remove(num); } - currentRoom.MutedUsers.Add(num, - uint.Parse( - (Yupi.GetUnixTimeStamp() + unchecked(checked(num2 * 60u))).ToString())); + + currentRoom.MutedUsers.Add(num, uint.Parse((Yupi.GetUnixTimeStamp() + checked(num2 * 60u)).ToString())); roomUserByHabbo.GetClient().SendNotif(string.Format(Yupi.GetLanguage().GetVar("room_owner_has_mute_user"), num2)); } @@ -284,7 +290,7 @@ internal void GetUserInfo() /// internal void GetBalance() { - if (Session == null || Session.GetHabbo() == null) return; + if (Session?.GetHabbo() == null) return; Session.GetHabbo().UpdateCreditsBalance(); Session.GetHabbo().UpdateSeasonalCurrencyBalance(); @@ -949,39 +955,7 @@ internal void SetRelationship() /// public void ReceiveNuxGifts() { - if (!ServerExtraSettings.NewUsersGiftsEnabled) - { - Session.SendNotif(Yupi.GetLanguage().GetVar("nieuwe_gebruiker_kado_error_1")); - return; - } - if (Session.GetHabbo().NuxPassed) - { - Session.SendNotif(Yupi.GetLanguage().GetVar("nieuwe_gebruiker_kado_error_2")); - return; - } - - /*UserItem item = Session.GetHabbo().GetInventoryComponent().AddNewItem(0, ServerExtraSettings.NewUserGiftYttv2Id, "", 0, true, false, 0, 0); - Session.GetHabbo().GetInventoryComponent().UpdateItems(false); - - Session.GetHabbo().Diamonds += 25; - Session.GetHabbo().UpdateSeasonalCurrencyBalance(); - if (item != null) - Session.GetHabbo().GetInventoryComponent().SendNewItems(item.Id); - - using (IQueryAdapter dbClient = Yupi.GetDatabaseManager().GetQueryReactor()) - if (Session.GetHabbo().Vip) - dbClient.RunFastQuery( - string.Format( - "UPDATE users SET vip = '1', vip_expire = DATE_ADD(vip_expire, INTERVAL 1 DAY), nux_passed = '1' WHERE id = {0}", - Session.GetHabbo().Id)); - else - dbClient.RunFastQuery( - string.Format( - "UPDATE users SET vip = '1', vip_expire = DATE_ADD(NOW(), INTERVAL 1 DAY), nux_passed = '1' WHERE id = {0}", - Session.GetHabbo().Id)); - - Session.GetHabbo().NuxPassed = true; - Session.GetHabbo().Vip = true;*/ + // Newbie Gifts Removed from Yupi } /// @@ -989,42 +963,7 @@ public void ReceiveNuxGifts() /// public void AcceptNuxGifts() { - if (ServerExtraSettings.NewUsersGiftsEnabled == false || Request.GetInteger() != 0) - return; - - ServerMessage nuxGifts = new ServerMessage(LibraryParser.OutgoingRequest("NuxListGiftsMessageComposer")); - nuxGifts.AppendInteger(3); //Cantidad - - nuxGifts.AppendInteger(0); - nuxGifts.AppendInteger(0); - nuxGifts.AppendInteger(1); //Cantidad - // ahora nuevo bucle - nuxGifts.AppendString(""); - nuxGifts.AppendString("nux/gift_yttv2.png"); - nuxGifts.AppendInteger(1); //cantidad - //Ahora nuevo bucle... - nuxGifts.AppendString("yttv2"); - nuxGifts.AppendString(""); - - nuxGifts.AppendInteger(2); - nuxGifts.AppendInteger(1); - nuxGifts.AppendInteger(1); - nuxGifts.AppendString(""); - nuxGifts.AppendString("nux/gift_diamonds.png"); - nuxGifts.AppendInteger(1); - nuxGifts.AppendString("nux_gift_diamonds"); - nuxGifts.AppendString(""); - - nuxGifts.AppendInteger(3); - nuxGifts.AppendInteger(1); - nuxGifts.AppendInteger(1); - nuxGifts.AppendString(""); - nuxGifts.AppendString("nux/gift_vip1day.png"); - nuxGifts.AppendInteger(1); - nuxGifts.AppendString("nux_gift_vip_1_day"); - nuxGifts.AppendString(""); - - Session.SendMessage(nuxGifts); + // Newbie Gifts Removed from Yupi } /// diff --git a/Yupi/Messages/Parsers/LibraryParser.cs b/Yupi/Messages/Parsers/LibraryParser.cs index 420ea36e..453aca4c 100644 --- a/Yupi/Messages/Parsers/LibraryParser.cs +++ b/Yupi/Messages/Parsers/LibraryParser.cs @@ -48,7 +48,7 @@ public static void HandlePacket(GameClientMessageHandler handler, ClientMessage if (Incoming.ContainsKey(message.Id)) { - if (Yupi.DebugMode) + if (Yupi.PacketDebugMode) { Console.WriteLine(); Console.Write("INCOMING "); @@ -66,7 +66,7 @@ public static void HandlePacket(GameClientMessageHandler handler, ClientMessage StaticRequestHandler staticRequestHandler = Incoming[message.Id]; staticRequestHandler(handler); } - else if (Yupi.DebugMode) + else if (Yupi.PacketDebugMode) { Console.WriteLine(); Console.Write("INCOMING "); @@ -99,7 +99,7 @@ internal static void RegisterIncoming() { CountReleases = 0; - string[] filePaths = Directory.GetFiles($"{Yupi.YupiVariablesDirectory}\\Packets", "*.incoming"); + string[] filePaths = Directory.GetFiles($"{Yupi.YupiVariablesDirectory}\\Packets\\{ReleaseName}", "*.incoming"); foreach (string[] fileContents in filePaths.Select(currentFile => File.ReadAllLines(currentFile, Encoding.UTF8))) { @@ -136,7 +136,7 @@ internal static void RegisterIncoming() internal static void RegisterConfig() { - string[] filePaths = Directory.GetFiles($"{Yupi.YupiVariablesDirectory}\\Packets", "*.inf"); + string[] filePaths = Directory.GetFiles($"{Yupi.YupiVariablesDirectory}\\Packets\\{ReleaseName}", "*.inf"); foreach (string[] fields in filePaths.Select(File.ReadAllLines).SelectMany(fileContents => fileContents.Where(line => !string.IsNullOrEmpty(line) && !line.StartsWith("[")).Select(line => line.Split('=')))) { if (fields[1].Contains('/')) @@ -150,7 +150,7 @@ internal static void RegisterOutgoing() { _registeredOutoings = new List(); - string[] filePaths = Directory.GetFiles($"{Yupi.YupiVariablesDirectory}\\Packets", "*.outgoing"); + string[] filePaths = Directory.GetFiles($"{Yupi.YupiVariablesDirectory}\\Packets\\{ReleaseName}", "*.outgoing"); foreach (string[] fields in filePaths.Select(File.ReadAllLines).SelectMany(fileContents => fileContents.Where(line => !string.IsNullOrEmpty(line) && !line.StartsWith("[")).Select(line => line.Replace(" ", string.Empty).Split('=')))) { if (fields[1].Contains('/')) @@ -175,7 +175,7 @@ internal static void RegisterOutgoing() internal static void RegisterLibrary() { - string[] filePaths = Directory.GetFiles($"{Yupi.YupiVariablesDirectory}\\Packets", "*.library"); + string[] filePaths = Directory.GetFiles($"{Yupi.YupiVariablesDirectory}\\Packets\\{ReleaseName}", "*.library"); foreach (string[] fields in filePaths.Select(File.ReadAllLines).SelectMany(fileContents => fileContents.Select(line => line.Split('=')))) { if (fields[1].Contains('/')) diff --git a/Yupi/Messages/Parsers/PacketLibrary.cs b/Yupi/Messages/Parsers/PacketLibrary.cs index b63ba9a1..5cf7114d 100644 --- a/Yupi/Messages/Parsers/PacketLibrary.cs +++ b/Yupi/Messages/Parsers/PacketLibrary.cs @@ -1741,15 +1741,6 @@ internal static void LoadProfile(GameClientMessageHandler handler) handler.LoadProfile(); } - /// - /// Fuckyous the specified handler. - /// - /// The handler. - internal static void Fuckyou(GameClientMessageHandler handler) - { - handler.Fuckyou(); - } - /// /// Gets the balance. /// diff --git a/Yupi/Messages/ServerMessage.cs b/Yupi/Messages/ServerMessage.cs index 03974fef..b5ba437c 100644 --- a/Yupi/Messages/ServerMessage.cs +++ b/Yupi/Messages/ServerMessage.cs @@ -339,7 +339,7 @@ public byte[] GetReversedBytes() bytes = finalBuffer.ToArray(); } - if (Yupi.DebugMode) + if (Yupi.PacketDebugMode) { Console.ForegroundColor = ConsoleColor.DarkBlue; Console.WriteLine(); diff --git a/Yupi/Yupi.cs b/Yupi/Yupi.cs index 3ec35c1d..6c632e0b 100644 --- a/Yupi/Yupi.cs +++ b/Yupi/Yupi.cs @@ -57,7 +57,7 @@ public static class Yupi /// /// The is live /// - internal static bool IsLive, SeparatedTasksInGameClientManager, SeparatedTasksInMainLoops, DebugMode, ConsoleTimerOn; + internal static bool IsLive, SeparatedTasksInGameClientManager, SeparatedTasksInMainLoops, PacketDebugMode, ConsoleTimerOn; /// /// The staff alert minimum rank @@ -302,6 +302,11 @@ internal static void Initialize() LibraryParser.Outgoing = new Dictionary(); LibraryParser.Config = new Dictionary(); + if (ServerConfigurationSettings.Data.ContainsKey("client.build")) + LibraryParser.ReleaseName = ServerConfigurationSettings.Data["client.build"]; + else + throw new Exception("Unable to Continue if No Release is configured to the Emulator Handle."); + LibraryParser.RegisterLibrary(); LibraryParser.RegisterOutgoing(); LibraryParser.RegisterIncoming(); @@ -326,12 +331,17 @@ internal static void Initialize() CrossDomainSettings.Set(); _game = new Game.Game(int.Parse(ServerConfigurationSettings.Data["game.tcp.conlimit"])); + _game.GetNavigator().LoadNewPublicRooms(); _game.ContinueLoading(); + FurnitureDataManager.Clear(); - ServerLanguage = Convert.ToString(ServerConfigurationSettings.Data["system.lang"]); + if (ServerConfigurationSettings.Data.ContainsKey("server.lang")) + ServerLanguage = Convert.ToString(ServerConfigurationSettings.Data["server.lang"]); + _languages = new ServerLanguageSettings(ServerLanguage); + Writer.WriteLine("Loaded " + _languages.Count() + " Languages Vars", "Yupi.Interpreters"); if (plugins != null) @@ -364,7 +374,7 @@ internal static void Initialize() if (ConsoleTimerOn) { - Timer = new System.Timers.Timer { Interval = ConsoleTimer }; + Timer = new Timer { Interval = ConsoleTimer }; Timer.Elapsed += TimerElapsed; Timer.Start(); } @@ -372,15 +382,15 @@ internal static void Initialize() if (ServerConfigurationSettings.Data.ContainsKey("StaffAlert.MinLevel")) StaffAlertMinRank = uint.Parse(ServerConfigurationSettings.Data["StaffAlert.MinLevel"]); - if (ServerConfigurationSettings.Data.ContainsKey("SeparatedTasksInMainLoops.enabled") && ServerConfigurationSettings.Data["SeparatedTasksInMainLoops.enabled"] == "true") - SeparatedTasksInMainLoops = true; + if (ServerConfigurationSettings.Data.ContainsKey("game.multithread.enabled")) + SeparatedTasksInMainLoops = ServerConfigurationSettings.Data["game.multithread.enabled"] == "true"; - if (ServerConfigurationSettings.Data.ContainsKey("SeparatedTasksInGameClientManager.enabled") && ServerConfigurationSettings.Data["SeparatedTasksInGameClientManager.enabled"] == "true") - SeparatedTasksInGameClientManager = true; + if (ServerConfigurationSettings.Data.ContainsKey("client.multithread.enabled")) + SeparatedTasksInGameClientManager = ServerConfigurationSettings.Data["client.multithread.enabled"] == "true"; - if (ServerConfigurationSettings.Data.ContainsKey("Debug")) - if (ServerConfigurationSettings.Data["Debug"] == "true") - DebugMode = true; + if (ServerConfigurationSettings.Data.ContainsKey("debug.packet")) + if (ServerConfigurationSettings.Data["debug.packet"] == "true") + PacketDebugMode = true; Writer.WriteLine("Yupi Emulator ready. Status: idle", "Yupi.Boot"); @@ -388,7 +398,7 @@ internal static void Initialize() } catch (Exception e) { - Writer.WriteLine("Error loading config.ini: Configuration file is invalid" + Environment.NewLine + e.Message, "Yupi.Boot", ConsoleColor.Red); + Writer.WriteLine("Error When Starting Yupi Environment!" + Environment.NewLine + e.Message, "Yupi.Boot", ConsoleColor.Red); Writer.WriteLine("Please press Y to get more details or press other Key to Exit", "Yupi.Boot", ConsoleColor.Red); ConsoleKeyInfo key = Console.ReadKey(); @@ -398,7 +408,7 @@ internal static void Initialize() Writer.WriteLine( Environment.NewLine + "[Message] Error Details: " + Environment.NewLine + e.StackTrace + Environment.NewLine + e.InnerException + Environment.NewLine + e.TargetSite + - Environment.NewLine + "[Message]Press Any Key To Exit", "Yupi.Boot", ConsoleColor.Red); + Environment.NewLine + "[Message] Press Any Key To Exit", "Yupi.Boot", ConsoleColor.Red); Console.ReadKey(); Environment.Exit(1); } diff --git a/Yupi/Yupi.csproj b/Yupi/Yupi.csproj index 0c2d4474..36953172 100644 --- a/Yupi/Yupi.csproj +++ b/Yupi/Yupi.csproj @@ -215,6 +215,14 @@ + + + + + + + + @@ -225,6 +233,7 @@ + @@ -603,7 +612,7 @@ - +