From e264c509578e8228e90bc22f6ba9ed6bc15be1a7 Mon Sep 17 00:00:00 2001 From: Beny Date: Mon, 3 Jun 2019 20:18:33 +0100 Subject: [PATCH] Added can_swim to pets --- sqlupdates/2_0_0_TO_2_1_0-RC-1.sql | 7 ++++++- src/main/java/com/eu/habbo/habbohotel/pets/PetData.java | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sqlupdates/2_0_0_TO_2_1_0-RC-1.sql b/sqlupdates/2_0_0_TO_2_1_0-RC-1.sql index b751625b..224de66c 100644 --- a/sqlupdates/2_0_0_TO_2_1_0-RC-1.sql +++ b/sqlupdates/2_0_0_TO_2_1_0-RC-1.sql @@ -15,4 +15,9 @@ ADD COLUMN `has_gotten_default_saved_searches` tinyint(1) NOT NULL DEFAULT 0 AFT ALTER TABLE `support_tickets` ADD COLUMN `group_id` int(11) NOT NULL AFTER `category`, ADD COLUMN `thread_id` int(11) NOT NULL AFTER `group_id`, -ADD COLUMN `comment_id` int(11) NOT NULL AFTER `thread_id`; \ No newline at end of file +ADD COLUMN `comment_id` int(11) NOT NULL AFTER `thread_id`; + +ALTER TABLE `pet_actions` +ADD COLUMN `can_swim` enum('1','0') NULL DEFAULT '0' AFTER `random_actions`; + +UPDATE `pet_actions` SET `can_swim` = '1' WHERE `pet_type` = 9 OR `pet_type` = 14 OR `pet_type` = 23 OR `pet_type` = 24 OR `pet_type` = 25 OR `pet_type` = 28 OR `pet_type` = 29 OR `pet_type` = 30 OR `pet_type` = 32; \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/PetData.java b/src/main/java/com/eu/habbo/habbohotel/pets/PetData.java index 9479b16d..8771b7b3 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/PetData.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/PetData.java @@ -31,6 +31,7 @@ public class PetData implements Comparable { public String[] actionsTired; public String[] actionsRandom; public THashMap> petVocals; + public boolean canSwim; private int type; private String name; private List petCommands; @@ -51,6 +52,7 @@ public class PetData implements Comparable { this.actionsHappy = set.getString("happy_actions").split(";"); this.actionsTired = set.getString("tired_actions").split(";"); this.actionsRandom = set.getString("random_actions").split(";"); + this.canSwim = set.getString("can_swim").equalsIgnoreCase("1"); this.reset(); }