diff --git a/sqlupdates/1_16_0_TO_2_0_0.sql b/sqlupdates/1_16_0_TO_2_0_0.sql index 51a0f8df..88c13216 100644 --- a/sqlupdates/1_16_0_TO_2_0_0.sql +++ b/sqlupdates/1_16_0_TO_2_0_0.sql @@ -1,6 +1,8 @@ #DATABASE UPDATE: 1.16.0 -> 2.0.0 -INSERT INTO `catalog_pages`(`id`, `parent_id`, `caption_save`, `caption`, `icon_color`, `icon_image`, `visible`, `enabled`, `min_rank`, `club_only`, `order_num`, `page_layout`, `page_headline`, `page_teaser`, `page_special`, `page_text1`, `page_text2`, `page_text_details`, `page_text_teaser`, `vip_only`, `includes`, `room_id`) VALUES (null, -1, 'guilds_forum', 'Group Forums', 1, 27181, '1', '1', 1, '0', 2, 'guild_forum', 'catalog_groups_en', 'catalog_groupsteaser_en', '', 'Group Forums are here! Buy a terminal and chat to your groups!', '', 'Group Forums are here!', '', '0', '', 0); -UPDATE `catalog_items` set page_id = LAST_INSERT_ID() WHERE `catalog_name` LIKE '%guild_forum%'; -INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.room.wired.norules', '0'); + +INSERT INTO `arcturus`.`catalog_pages`(`id`, `parent_id`, `caption_save`, `caption`, `icon_color`, `icon_image`, `visible`, `enabled`, `min_rank`, `club_only`, `order_num`, `page_layout`, `page_headline`, `page_teaser`, `page_special`, `page_text1`, `page_text2`, `page_text_details`, `page_text_teaser`, `vip_only`, `includes`, `room_id`) VALUES (null, -1, 'guilds_forum', 'Group Forums', 1, 27181, '1', '1', 1, '0', 2, 'guild_forum', 'catalog_groups_en', 'catalog_groupsteaser_en', '', 'Group Forums are here! Buy a terminal and chat to your groups!', '', 'Group Forums are here!', '', '0', '', 0); +SET @page_id = LAST_INSERT_ID(); +UPDATE catalog_items SET page_id = @page_id WHERE catalog_name LIKE '%guild_forum%'; +UPDATE items_base SET `interaction_type` = 'guild_furni' WHERE item_name LIKE '%guild_forum%'; #END DATABASE UPDATE: 1.16.0 -> 2.0.0 \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/core/CreditsScheduler.java b/src/main/java/com/eu/habbo/core/CreditsScheduler.java index fcee3e14..fed09c67 100644 --- a/src/main/java/com/eu/habbo/core/CreditsScheduler.java +++ b/src/main/java/com/eu/habbo/core/CreditsScheduler.java @@ -16,16 +16,21 @@ public class CreditsScheduler extends Scheduler public static int CREDITS; - public CreditsScheduler() - { + public CreditsScheduler() { super(Emulator.getConfig().getInt("hotel.auto.credits.interval")); + this.reloadConfig(); + } + public void reloadConfig() { if(Emulator.getConfig().getBoolean("hotel.auto.credits.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.credits.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.credits.ignore.idled"); - CREDITS = Emulator.getConfig().getInt("hotel.auto.credits.amount"); + if (this.disposed) { + this.disposed = false; + this.run(); + } } else { diff --git a/src/main/java/com/eu/habbo/core/PixelScheduler.java b/src/main/java/com/eu/habbo/core/PixelScheduler.java index 9ea17f03..705db579 100644 --- a/src/main/java/com/eu/habbo/core/PixelScheduler.java +++ b/src/main/java/com/eu/habbo/core/PixelScheduler.java @@ -19,13 +19,19 @@ public class PixelScheduler extends Scheduler public PixelScheduler() { super(Emulator.getConfig().getInt("hotel.auto.pixels.interval")); + this.reloadConfig(); + } + public void reloadConfig() { if(Emulator.getConfig().getBoolean("hotel.auto.pixels.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.pixels.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.pixels.ignore.idled"); - PIXELS = Emulator.getConfig().getInt("hotel.auto.pixels.amount"); + if (this.disposed) { + this.disposed = false; + this.run(); + } } else { diff --git a/src/main/java/com/eu/habbo/core/PointsScheduler.java b/src/main/java/com/eu/habbo/core/PointsScheduler.java index 180125a3..86037820 100644 --- a/src/main/java/com/eu/habbo/core/PointsScheduler.java +++ b/src/main/java/com/eu/habbo/core/PointsScheduler.java @@ -19,13 +19,19 @@ public class PointsScheduler extends Scheduler public PointsScheduler() { super(Emulator.getConfig().getInt("hotel.auto.points.interval")); + this.reloadConfig(); + } + public void reloadConfig() { if(Emulator.getConfig().getBoolean("hotel.auto.points.enabled")) { IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.points.ignore.hotelview"); IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.points.ignore.idled"); - POINTS = Emulator.getConfig().getInt("hotel.auto.points.amount"); + if (this.disposed) { + this.disposed = false; + this.run(); + } } else { diff --git a/src/main/java/com/eu/habbo/plugin/PluginManager.java b/src/main/java/com/eu/habbo/plugin/PluginManager.java index cb70be93..98fefed4 100644 --- a/src/main/java/com/eu/habbo/plugin/PluginManager.java +++ b/src/main/java/com/eu/habbo/plugin/PluginManager.java @@ -384,5 +384,10 @@ public class PluginManager AchievementManager.TALENTTRACK_ENABLED = Emulator.getConfig().getBoolean("hotel.talenttrack.enabled"); InteractionRoller.NO_RULES = Emulator.getConfig().getBoolean("hotel.room.rollers.norules"); RoomManager.SHOW_PUBLIC_IN_POPULAR_TAB = Emulator.getConfig().getBoolean("hotel.navigator.populartab.publics"); + if(Emulator.isReady) { + Emulator.getGameEnvironment().getCreditsScheduler().reloadConfig(); + Emulator.getGameEnvironment().getPointsScheduler().reloadConfig(); + Emulator.getGameEnvironment().getPixelScheduler().reloadConfig(); + } } }