From 1f3e81a8e420079eb73a12f191c915c2ed66f242 Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Sun, 4 Aug 2019 16:42:18 +0300 Subject: [PATCH] Fix WiredGame --- .../habbohotel/games/wired/WiredGame.java | 21 +++++++++++++------ .../effects/WiredEffectGiveScoreToTeam.java | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/games/wired/WiredGame.java b/src/main/java/com/eu/habbo/habbohotel/games/wired/WiredGame.java index 24511b32..21cd5469 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/wired/WiredGame.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/wired/WiredGame.java @@ -1,26 +1,25 @@ package com.eu.habbo.habbohotel.games.wired; -import com.eu.habbo.habbohotel.games.Game; -import com.eu.habbo.habbohotel.games.GamePlayer; -import com.eu.habbo.habbohotel.games.GameTeam; -import com.eu.habbo.habbohotel.games.GameTeamColors; +import com.eu.habbo.habbohotel.games.*; import com.eu.habbo.habbohotel.games.freeze.FreezeGame; import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.users.Habbo; public class WiredGame extends Game { + public GameState state = GameState.RUNNING; + public WiredGame(Room room) { super(GameTeam.class, GamePlayer.class, room, false); } @Override public void initialise() { - + this.state = GameState.RUNNING; } @Override public void run() { - + this.state = GameState.RUNNING; } @Override @@ -34,4 +33,14 @@ public class WiredGame extends Game { super.removeHabbo(habbo); this.room.giveEffect(habbo, 0, -1); } + + @Override + public void stop() { + this.state = GameState.RUNNING; + } + + @Override + public GameState getState() { + return GameState.RUNNING; + } } \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScoreToTeam.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScoreToTeam.java index 2a094d98..738fc508 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScoreToTeam.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectGiveScoreToTeam.java @@ -120,7 +120,7 @@ public class WiredEffectGiveScoreToTeam extends InteractionWiredEffect { this.points = packet.readInt(); this.count = packet.readInt(); - this.teamColor = GameTeamColors.values()[packet.readInt() - 1]; + this.teamColor = GameTeamColors.values()[packet.readInt()]; packet.readString(); packet.readInt(); this.setDelay(packet.readInt());