Fix game teams

This commit is contained in:
Alejandro 2019-06-10 19:06:22 +03:00
parent 38ac515158
commit 8908e601d3
9 changed files with 14 additions and 14 deletions

View File

@ -24,7 +24,7 @@ import java.util.concurrent.ThreadPoolExecutor;
public class BattleBanzaiGame extends Game {
public static final int effectId = 33;
public static final int effectId = 32;
public static final int POINTS_HIJACK_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.steal", 0);
@ -136,7 +136,7 @@ public class BattleBanzaiGame extends Game {
if (highestScore != null) {
for (HabboItem item : this.room.getRoomSpecialTypes().getItemsOfType(InteractionBattleBanzaiSphere.class)) {
item.setExtradata((highestScore.teamColor.type + 3) + "");
item.setExtradata((highestScore.teamColor.type + 2) + "");
this.room.updateItemState(item);
}
}
@ -179,7 +179,7 @@ public class BattleBanzaiGame extends Game {
}
for (HabboItem item : this.room.getRoomSpecialTypes().getItemsOfType(InteractionBattleBanzaiSphere.class)) {
item.setExtradata((7 + winningTeam.teamColor.type) + "");
item.setExtradata((6 + winningTeam.teamColor.type) + "");
this.room.updateItemState(item);
}
@ -263,7 +263,7 @@ public class BattleBanzaiGame extends Game {
tileItem.ifPresent(habboItem -> {
this.tileLocked(teamColor, habboItem, habbo, true);
habboItem.setExtradata((2 + (teamColor.type * 3) + 3) + "");
habboItem.setExtradata((2 + (teamColor.type * 3)) + "");
this.room.updateItem(habboItem);
});
}
@ -373,7 +373,7 @@ public class BattleBanzaiGame extends Game {
if (!this.gameTiles.contains(tile.getId())) return;
int check = state - (habbo.getHabboInfo().getGamePlayer().getTeamColor().type * 3);
if (check == 3 || check == 4) {
if (check == 0 || check == 1) {
state++;
if (state % 3 == 2) {
@ -383,7 +383,7 @@ public class BattleBanzaiGame extends Game {
habbo.getHabboInfo().getGamePlayer().addScore(BattleBanzaiGame.POINTS_FILL_TILE);
}
} else {
state = (habbo.getHabboInfo().getGamePlayer().getTeamColor().type * 3) + 3;
state = habbo.getHabboInfo().getGamePlayer().getTeamColor().type * 3;
habbo.getHabboInfo().getGamePlayer().addScore(BattleBanzaiGame.POINTS_HIJACK_TILE);
}

View File

@ -28,7 +28,7 @@ import java.util.HashMap;
import java.util.Map;
public class FreezeGame extends Game {
public static final int effectId = 40;
public static final int effectId = 39;
public static int POWER_UP_POINTS;
public static int POWER_UP_CHANCE;

View File

@ -195,7 +195,7 @@ public class FreezeGamePlayer extends GamePlayer {
return 0;
if (!this.isFrozen()) {
int effectId = 40;
int effectId = FreezeGame.effectId;
effectId += super.getTeamColor().type;

View File

@ -165,7 +165,7 @@ public class InteractionBattleBanzaiPuck extends InteractionPushable {
}
}
this.setExtradata(team.teamColor.type + 1 + "");
this.setExtradata(team.teamColor.type + "");
room.updateItemState(this);
}
}

View File

@ -75,7 +75,7 @@ public class WiredConditionNotInTeam extends InteractionWiredCondition {
message.appendInt(this.getId());
message.appendString("");
message.appendInt(1);
message.appendInt(this.teamColor.type + 1);
message.appendInt(this.teamColor.type);
message.appendInt(0);
message.appendInt(this.getType().code);
message.appendInt(0);

View File

@ -75,7 +75,7 @@ public class WiredConditionTeamMember extends InteractionWiredCondition {
message.appendInt(this.getId());
message.appendString("");
message.appendInt(1);
message.appendInt(this.teamColor.type + 1);
message.appendInt(this.teamColor.type);
message.appendInt(0);
message.appendInt(this.getType().code);
message.appendInt(0);

View File

@ -107,7 +107,7 @@ public class WiredEffectGiveScoreToTeam extends InteractionWiredEffect {
message.appendInt(3);
message.appendInt(this.points);
message.appendInt(this.count);
message.appendInt(this.teamColor.type + 1);
message.appendInt(this.teamColor.type);
message.appendInt(0);
message.appendInt(this.getType().code);
message.appendInt(this.getDelay());

View File

@ -90,7 +90,7 @@ public class WiredEffectJoinTeam extends InteractionWiredEffect {
message.appendInt(this.getId());
message.appendString("");
message.appendInt(1);
message.appendInt(this.teamColor.type + 1);
message.appendInt(this.teamColor.type);
message.appendInt(0);
message.appendInt(this.getType().code);
message.appendInt(this.getDelay());

View File

@ -28,7 +28,7 @@ public class BattleBanzaiTilesFlicker implements Runnable {
int state = 0;
if (this.on) {
state = (this.color.type * 3) + 5;
state = (this.color.type * 3) + 2;
this.on = false;
} else {
this.on = true;