Fix banzai teleport link with others of different type #825

This commit is contained in:
Beny 2020-10-15 13:54:54 +02:00
parent a034d5938a
commit 0dee065524
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ public class InteractionBattleBanzaiTeleporter extends HabboItem {
super.onWalkOn(roomUnit, room, objects);
if(objects.length < 3) {
HabboItem target = room.getRoomSpecialTypes().getRandomTeleporter(this.getBaseItem(), this);
HabboItem target = room.getRoomSpecialTypes().getRandomTeleporter(null, this);
if (target == null) return;
this.setExtradata("1");

View File

@ -100,7 +100,7 @@ public class RoomSpecialTypes {
public InteractionBattleBanzaiTeleporter getRandomTeleporter(Item baseItem, InteractionBattleBanzaiTeleporter exclude) {
List<InteractionBattleBanzaiTeleporter> teleporterList = new ArrayList<>();
for (InteractionBattleBanzaiTeleporter teleporter : this.banzaiTeleporters.values()) {
if (teleporter.getBaseItem() == baseItem) {
if (baseItem == null || teleporter.getBaseItem() == baseItem) {
teleporterList.add(teleporter);
}
}