Fix: GameTimer
This commit is contained in:
parent
15a399a263
commit
b2ffaf5a7c
@ -234,8 +234,7 @@ public class InteractionGameTimer extends HabboItem implements Runnable {
|
|||||||
state = InteractionGameTimerAction.getByAction((int) objects[0]);
|
state = InteractionGameTimerAction.getByAction((int) objects[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (state) {
|
if (state == InteractionGameTimer.InteractionGameTimerAction.START_STOP) {
|
||||||
case START_STOP:
|
|
||||||
if (this.isRunning) { // a game has been started
|
if (this.isRunning) { // a game has been started
|
||||||
this.isPaused = !this.isPaused;
|
this.isPaused = !this.isPaused;
|
||||||
if (this.isPaused) {
|
if (this.isPaused) {
|
||||||
@ -262,10 +261,7 @@ public class InteractionGameTimer extends HabboItem implements Runnable {
|
|||||||
Emulator.getThreading().run(new GameTimer(this), 1000);
|
Emulator.getThreading().run(new GameTimer(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (state == InteractionGameTimer.InteractionGameTimerAction.INCREASE_TIME) {
|
||||||
break;
|
|
||||||
|
|
||||||
case INCREASE_TIME:
|
|
||||||
if (!this.isRunning) {
|
if (!this.isRunning) {
|
||||||
this.increaseTimer(room);
|
this.increaseTimer(room);
|
||||||
} else if (this.isPaused) {
|
} else if (this.isPaused) {
|
||||||
@ -273,14 +269,13 @@ public class InteractionGameTimer extends HabboItem implements Runnable {
|
|||||||
this.increaseTimer(room);
|
this.increaseTimer(room);
|
||||||
WiredHandler.handle(WiredTriggerType.GAME_ENDS, null, room, new Object[]{});
|
WiredHandler.handle(WiredTriggerType.GAME_ENDS, null, room, new Object[]{});
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onClick(client, room, objects);
|
super.onClick(client, room, objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onWalk(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
public void onWalk(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user