diff --git a/sqlupdates/Update 3_5_3 to 3_5_4.sql b/sqlupdates/Update 3_5_3 to 3_5_4.sql index 9b25869e..45b95b86 100644 --- a/sqlupdates/Update 3_5_3 to 3_5_4.sql +++ b/sqlupdates/Update 3_5_3 to 3_5_4.sql @@ -18,4 +18,8 @@ CREATE TABLE chat_bubbles ( --New texts for update chat bubbles command INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_update_chat_bubbles', 'update_chat_bubbles'); INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.success.cmd_update_chat_bubbles', 'Successfully updated chat bubbles'); -INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_update_chat_bubbles', ':update_chat_bubbles'); \ No newline at end of file +INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_update_chat_bubbles', ':update_chat_bubbles'); +UPDATE `emulator_texts` SET `key` = 'generic.pet.happiness', `value` = 'Happiness' WHERE `key` = 'generic.pet.happyness'; + +ALTER TABLE `pet_commands_data` CHANGE `cost_happyness` `cost_happiness` int(11) NOT NULL DEFAULT '0'; +ALTER TABLE `users_pets` CHANGE `happyness` `happiness` int(11) NOT NULL DEFAULT '100'; \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/PetInfoCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/PetInfoCommand.java index 00a81642..b368c11c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/PetInfoCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/PetInfoCommand.java @@ -34,7 +34,7 @@ public class PetInfoCommand extends Command { Emulator.getTexts().getValue("commands.generic.cmd_pet_info.stats") + "\r\n" + Emulator.getTexts().getValue("generic.pet.scratches") + ": " + pet.getRespect() + "\r" + Emulator.getTexts().getValue("generic.pet.energy") + ": " + pet.getEnergy() + "/" + PetManager.maxEnergy(pet.getLevel()) + "\r" + - Emulator.getTexts().getValue("generic.pet.happyness") + ": " + pet.getHappyness() + "\r" + + Emulator.getTexts().getValue("generic.pet.happiness") + ": " + pet.getHappiness() + "\r" + Emulator.getTexts().getValue("generic.pet.level.thirst") + ": " + pet.levelThirst + "\r" + Emulator.getTexts().getValue("generic.pet.level.hunger") + ": " + pet.levelHunger + "\r" + Emulator.getTexts().getValue("generic.pet.current_action") + ": " + (pet.getTask() == null ? Emulator.getTexts().getValue("generic.nothing") : pet.getTask().name()) + "\r" + diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/pets/InteractionPetToy.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/pets/InteractionPetToy.java index caeaf54f..9c21cbe0 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/pets/InteractionPetToy.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/pets/InteractionPetToy.java @@ -46,7 +46,7 @@ public class InteractionPetToy extends InteractionDefault { pet.packetUpdate = true; HabboItem item = this; Emulator.getThreading().run(() -> { - pet.addHappyness(25); + pet.addHappiness(25); item.setExtradata("0"); room.updateItem(item); new PetClearPosture(pet, RoomUnitStatus.PLAY, null, true).run(); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/MonsterplantPet.java b/src/main/java/com/eu/habbo/habbohotel/pets/MonsterplantPet.java index c362cf58..3dce2a58 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/MonsterplantPet.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/MonsterplantPet.java @@ -385,7 +385,7 @@ public class MonsterplantPet extends Pet implements IPetLook { if (this.mayScratch()) { AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantTreater"), 5); this.setDeathTimestamp(Emulator.getIntUnixTimestamp() + MonsterplantPet.timeToLive); - this.addHappyness(10); + this.addHappiness(10); this.addExperience(10); this.room.sendComposer(new PetStatusUpdateComposer(this).compose()); this.room.sendComposer(new RoomPetRespectComposer(this, RoomPetRespectComposer.PET_TREATED).compose()); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/Pet.java b/src/main/java/com/eu/habbo/habbohotel/pets/Pet.java index 8c5f55ba..0c5e2385 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/Pet.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/Pet.java @@ -36,7 +36,7 @@ public class Pet implements ISerialize, Runnable { protected PetData petData; protected int race; protected String color; - protected int happyness; + protected int happiness; protected int experience; protected int energy; protected int respect; @@ -45,7 +45,7 @@ public class Pet implements ISerialize, Runnable { RoomUnit roomUnit; private int chatTimeout; private int tickTimeout = Emulator.getIntUnixTimestamp(); - private int happynessDelay = Emulator.getIntUnixTimestamp(); + private int happinessDelay = Emulator.getIntUnixTimestamp(); private int gestureTickTimeout = Emulator.getIntUnixTimestamp(); private int randomActionTickTimeout = Emulator.getIntUnixTimestamp(); private int postureTimeout = Emulator.getIntUnixTimestamp(); @@ -65,12 +65,12 @@ public class Pet implements ISerialize, Runnable { this.name = set.getString("name"); this.petData = Emulator.getGameEnvironment().getPetManager().getPetData(set.getInt("type")); if (this.petData == null) { - LOGGER.error("WARNING! Missing pet data for type: " + set.getInt("type") + "! Insert a new entry into the pet_actions table for this type!"); + LOGGER.error("WARNING! Missing pet data for type: {}! Insert a new entry into the pet_actions table for this type!", set.getInt("type")); this.petData = Emulator.getGameEnvironment().getPetManager().getPetData(0); } this.race = set.getInt("race"); this.experience = set.getInt("experience"); - this.happyness = set.getInt("happyness"); + this.happiness = set.getInt("happiness"); this.energy = set.getInt("energy"); this.respect = set.getInt("respect"); this.created = set.getInt("created"); @@ -88,13 +88,13 @@ public class Pet implements ISerialize, Runnable { this.petData = Emulator.getGameEnvironment().getPetManager().getPetData(type); if (this.petData == null) { - LOGGER.warn("Missing pet data for type: " + type + "! Insert a new entry into the pet_actions table for this type!"); + LOGGER.warn("Missing pet data for type: {}! Insert a new entry into the pet_actions table for this type!", type); } this.race = race; this.color = color; this.experience = 0; - this.happyness = 100; + this.happiness = 100; this.energy = 100; this.respect = 0; this.levelThirst = 0; @@ -132,14 +132,14 @@ public class Pet implements ISerialize, Runnable { } - public void addHappyness(int amount) { - this.happyness += amount; + public void addHappiness(int amount) { + this.happiness += amount; - if (this.happyness > 100) - this.happyness = 100; + if (this.happiness > 100) + this.happiness = 100; - if (this.happyness < 0) - this.happyness = 0; + if (this.happiness < 0) + this.happiness = 0; } public int getRespect() { @@ -169,7 +169,7 @@ public class Pet implements ISerialize, Runnable { if (this.needsUpdate) { try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) { if (this.id > 0) { - try (PreparedStatement statement = connection.prepareStatement("UPDATE users_pets SET room_id = ?, experience = ?, energy = ?, respect = ?, x = ?, y = ?, z = ?, rot = ?, hunger = ?, thirst = ?, happyness = ?, created = ? WHERE id = ?")) { + try (PreparedStatement statement = connection.prepareStatement("UPDATE users_pets SET room_id = ?, experience = ?, energy = ?, respect = ?, x = ?, y = ?, z = ?, rot = ?, hunger = ?, thirst = ?, happiness = ?, created = ? WHERE id = ?")) { statement.setInt(1, (this.room == null ? 0 : this.room.getId())); statement.setInt(2, this.experience); statement.setInt(3, this.energy); @@ -180,7 +180,7 @@ public class Pet implements ISerialize, Runnable { statement.setInt(8, this.roomUnit != null ? this.roomUnit.getBodyRotation().getValue() : 0); statement.setInt(9, this.levelHunger); statement.setInt(10, this.levelThirst); - statement.setInt(11, this.happyness); + statement.setInt(11, this.happiness); statement.setInt(12, this.created); statement.setInt(13, this.id); statement.execute(); @@ -256,7 +256,7 @@ public class Pet implements ISerialize, Runnable { this.addEnergy(5); - this.addHappyness(1); + this.addHappiness(1); if (this.energy == PetManager.maxEnergy(this.level)) { this.roomUnit.removeStatus(RoomUnitStatus.LAY); @@ -296,9 +296,9 @@ public class Pet implements ISerialize, Runnable { if (this.levelThirst < 100) this.levelThirst++; - if (this.happyness > 0 && time - this.happynessDelay >= 30) { - this.happyness--; - this.happynessDelay = time; + if (this.happiness > 0 && time - this.happinessDelay >= 30) { + this.happiness--; + this.happinessDelay = time; } } @@ -315,9 +315,9 @@ public class Pet implements ISerialize, Runnable { this.say(this.petData.randomVocal(PetVocalsType.TIRED)); if (this.energy <= 10) this.findNest(); - } else if (this.happyness > 85) { + } else if (this.happiness > 85) { this.say(this.petData.randomVocal(PetVocalsType.GENERIC_HAPPY)); - } else if (this.happyness < 15) { + } else if (this.happiness < 15) { this.say(this.petData.randomVocal(PetVocalsType.GENERIC_SAD)); } else if (this.levelHunger > 50) { this.say(this.petData.randomVocal(PetVocalsType.HUNGRY)); @@ -408,12 +408,12 @@ public class Pet implements ISerialize, Runnable { if (this.energy < 30) { this.roomUnit.setStatus(RoomUnitStatus.GESTURE, PetGestures.TIRED.getKey()); this.findNest(); - } else if (this.happyness == 100) { + } else if (this.happiness == 100) { this.roomUnit.setStatus(RoomUnitStatus.GESTURE, PetGestures.LOVE.getKey()); - } else if (this.happyness >= 90) { + } else if (this.happiness >= 90) { this.randomHappyAction(); this.roomUnit.setStatus(RoomUnitStatus.GESTURE, PetGestures.HAPPY.getKey()); - } else if (this.happyness <= 5) { + } else if (this.happiness <= 5) { this.randomSadAction(); this.roomUnit.setStatus(RoomUnitStatus.GESTURE, PetGestures.SAD.getKey()); } else if (this.levelHunger > 80) { @@ -533,7 +533,7 @@ public class Pet implements ISerialize, Runnable { } this.level++; this.say(this.petData.randomVocal(PetVocalsType.LEVEL_UP)); - this.addHappyness(100); + this.addHappiness(100); this.roomUnit.setStatus(RoomUnitStatus.GESTURE, "exp"); this.gestureTickTimeout = Emulator.getIntUnixTimestamp(); AchievementManager.progressAchievement(Emulator.getGameEnvironment().getHabboManager().getHabbo(this.userId), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetLevelUp")); @@ -573,7 +573,7 @@ public class Pet implements ISerialize, Runnable { public void scratched(Habbo habbo) { - this.addHappyness(10); + this.addHappiness(10); this.addExperience(10); this.addRespect(); this.needsUpdate = true; @@ -641,12 +641,12 @@ public class Pet implements ISerialize, Runnable { this.color = color; } - public int getHappyness() { - return this.happyness; + public int getHappiness() { + return this.happiness; } - public void setHappyness(int happyness) { - this.happyness = happyness; + public void setHappiness(int happiness) { + this.happiness = happiness; } public int getExperience() { diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/PetCommand.java b/src/main/java/com/eu/habbo/habbohotel/pets/PetCommand.java index e2ca68ad..30b84482 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/PetCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/PetCommand.java @@ -24,7 +24,7 @@ public class PetCommand implements Comparable { public final int energyCost; - public final int happynessCost; + public final int happinessCost; public final PetAction action; @@ -35,7 +35,7 @@ public class PetCommand implements Comparable { this.level = set.getInt("required_level"); this.xp = set.getInt("reward_xp"); this.energyCost = set.getInt("cost_energy"); - this.happynessCost = set.getInt("cost_happyness"); + this.happinessCost = set.getInt("cost_happiness"); this.action = action; } @@ -67,7 +67,7 @@ public class PetCommand implements Comparable { pet.getRoomUnit().setStatus(RoomUnitStatus.GESTURE, this.action.gestureToSet); pet.addEnergy(-this.energyCost); - pet.addHappyness(-this.happynessCost); + pet.addHappiness(-this.happinessCost); pet.addExperience(this.xp); } } diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionBeg.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionBeg.java index e2fb3e5e..9c3695b8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionBeg.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionBeg.java @@ -17,7 +17,7 @@ public class ActionBeg extends PetAction { public boolean apply(Pet pet, Habbo habbo, String[] data) { pet.clearPosture(); - if (pet.getHappyness() > 90) + if (pet.getHappiness() > 90) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionBreatheFire.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionBreatheFire.java index e04a1883..64c4ded4 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionBreatheFire.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionBreatheFire.java @@ -19,7 +19,7 @@ public class ActionBreatheFire extends PetAction { public boolean apply(Pet pet, Habbo habbo, String[] data) { Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.FLAME, null, false), this.minimumActionDuration); - if (pet.getHappyness() > 50) + if (pet.getHappiness() > 50) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); return true; diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionCroak.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionCroak.java index 6ad3b69f..d54d1c5f 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionCroak.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionCroak.java @@ -21,7 +21,7 @@ public class ActionCroak extends PetAction { Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.CROAK, null, false), 2000); - if (pet.getHappyness() > 80) + if (pet.getHappiness() > 80) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); return true; diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionDown.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionDown.java index 2f601fb5..14d352e3 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionDown.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionDown.java @@ -18,7 +18,7 @@ public class ActionDown extends PetAction { public boolean apply(Pet pet, Habbo habbo, String[] data) { pet.getRoomUnit().setStatus(RoomUnitStatus.LAY, pet.getRoom().getStackHeight(pet.getRoomUnit().getX(), pet.getRoomUnit().getY(), false) + ""); - if (pet.getHappyness() > 50) + if (pet.getHappiness() > 50) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollow.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollow.java index 767faa3f..d197b43c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollow.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollow.java @@ -23,7 +23,7 @@ public class ActionFollow extends PetAction { Emulator.getThreading().run(new PetFollowHabbo(pet, habbo, 0)); - if (pet.getHappyness() > 75) + if (pet.getHappiness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollowLeft.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollowLeft.java index 84b16e6a..c4c9c573 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollowLeft.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollowLeft.java @@ -20,7 +20,7 @@ public class ActionFollowLeft extends PetAction { Emulator.getThreading().run(new PetFollowHabbo(pet, habbo, -2)); - if (pet.getHappyness() > 75) + if (pet.getHappiness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollowRight.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollowRight.java index e00de028..29e5a41e 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollowRight.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollowRight.java @@ -20,7 +20,7 @@ public class ActionFollowRight extends PetAction { Emulator.getThreading().run(new PetFollowHabbo(pet, habbo, +2)); - if (pet.getHappyness() > 75) + if (pet.getHappiness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionHere.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionHere.java index 150249a4..ce326c0d 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionHere.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionHere.java @@ -19,7 +19,7 @@ public class ActionHere extends PetAction { pet.getRoomUnit().setGoalLocation(pet.getRoom().getLayout().getTileInFront(habbo.getRoomUnit().getCurrentLocation(), habbo.getRoomUnit().getBodyRotation().getValue())); pet.getRoomUnit().setCanWalk(true); - if (pet.getHappyness() > 75) + if (pet.getHappiness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionJump.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionJump.java index 8e232d47..e267382b 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionJump.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionJump.java @@ -22,7 +22,7 @@ public class ActionJump extends PetAction { Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.JUMP, null, false), 2000); - if (pet.getHappyness() > 60) + if (pet.getHappiness() > 60) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlay.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlay.java index 71a7a291..dffa9b21 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlay.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlay.java @@ -14,7 +14,7 @@ public class ActionPlay extends PetAction { public boolean apply(Pet pet, Habbo habbo, String[] data) { //Play //TODO Implement playing for pets. For example; go to ball, toy etc. - if (pet.getHappyness() > 75) + if (pet.getHappiness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else { pet.say(pet.getPetData().randomVocal(PetVocalsType.DISOBEY)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlayDead.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlayDead.java index 53aae87f..ecaee9de 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlayDead.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlayDead.java @@ -21,7 +21,7 @@ public class ActionPlayDead extends PetAction { pet.getRoomUnit().setStatus(RoomUnitStatus.DEAD, pet.getRoom().getStackHeight(pet.getRoomUnit().getX(), pet.getRoomUnit().getY(), false) + ""); - if (pet.getHappyness() > 50) + if (pet.getHappiness() > 50) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlayFootball.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlayFootball.java index 3f11cdc1..f5f12c94 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlayFootball.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionPlayFootball.java @@ -34,7 +34,7 @@ public class ActionPlayFootball extends PetAction { pet.getRoomUnit().setGoalLocation(room.getLayout().getTile(foundBall.getX(), foundBall.getY())); - if (pet.getHappyness() > 75) + if (pet.getHappiness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionRelax.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionRelax.java index 00f893e5..3ec1386c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionRelax.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionRelax.java @@ -14,9 +14,9 @@ public class ActionRelax extends PetAction { @Override public boolean apply(Pet pet, Habbo habbo, String[] data) { //Relax - if (pet.getHappyness() > 75) + if (pet.getHappiness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_HAPPY)); - else if (pet.getHappyness() < 30) + else if (pet.getHappiness() < 30) pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_SAD)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSit.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSit.java index 52ef037f..235ce5ca 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSit.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSit.java @@ -17,7 +17,7 @@ public class ActionSit extends PetAction { if (pet.getTask() != PetTasks.SIT && !pet.getRoomUnit().hasStatus(RoomUnitStatus.SIT)) { pet.getRoomUnit().setStatus(RoomUnitStatus.SIT, pet.getRoom().getStackHeight(pet.getRoomUnit().getX(), pet.getRoomUnit().getY(), false) - 0.50 + ""); - if (pet.getHappyness() > 75) + if (pet.getHappiness() > 75) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSpeak.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSpeak.java index be7eaeae..ed3207b4 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSpeak.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionSpeak.java @@ -21,9 +21,9 @@ public class ActionSpeak extends PetAction { pet.setMuted(false); Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.SPEAK, null, false), 2000); - if (pet.getHappyness() > 70) + if (pet.getHappiness() > 70) pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_HAPPY)); - else if (pet.getHappyness() < 30) + else if (pet.getHappiness() < 30) pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_SAD)); else if (pet.getLevelHunger() > 65) pet.say(pet.getPetData().randomVocal(PetVocalsType.HUNGRY)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionStand.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionStand.java index 598c66dc..309b2a9c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionStand.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionStand.java @@ -20,7 +20,7 @@ public class ActionStand extends PetAction { public boolean apply(Pet pet, Habbo habbo, String[] data) { pet.clearPosture(); - if (pet.getHappyness() > 30) + if (pet.getHappiness() > 30) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); else pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionTorch.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionTorch.java index e6a7748e..04407850 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionTorch.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionTorch.java @@ -18,7 +18,7 @@ public class ActionTorch extends PetAction { @Override public boolean apply(Pet pet, Habbo habbo, String[] data) { - if (pet.getHappyness() < 30) { + if (pet.getHappiness() < 30) { pet.say(pet.getPetData().randomVocal(PetVocalsType.DISOBEY)); return false; } diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWave.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWave.java index 23b8ebfa..18b512b6 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWave.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWave.java @@ -18,7 +18,7 @@ public class ActionWave extends PetAction { @Override public boolean apply(Pet pet, Habbo habbo, String[] data) { //WAV - if (pet.getHappyness() > 65) { + if (pet.getHappiness() > 65) { pet.getRoomUnit().setStatus(RoomUnitStatus.WAVE, "0"); Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.WAVE, null, false), 2000); diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWings.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWings.java index 07a1b225..36cb44b3 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWings.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWings.java @@ -19,7 +19,7 @@ public class ActionWings extends PetAction { public boolean apply(Pet pet, Habbo habbo, String[] data) { Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.WINGS, null, false), this.minimumActionDuration); - if (pet.getHappyness() > 50) + if (pet.getHappiness() > 50) pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL)); return true; diff --git a/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/PetInformationComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/PetInformationComposer.java index 41cec304..5540377a 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/PetInformationComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/rooms/pets/PetInformationComposer.java @@ -43,7 +43,7 @@ public class PetInformationComposer extends MessageComposer { } this.response.appendInt(this.pet.getEnergy()); this.response.appendInt(this.pet.getMaxEnergy()); //Max energy - this.response.appendInt(this.pet.getHappyness()); //this.pet.getHappyness() + this.response.appendInt(this.pet.getHappiness()); this.response.appendInt(100); this.response.appendInt(this.pet.getRespect()); this.response.appendInt(this.pet.getUserId());