mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Fix a NullPointerException in InteractionBattleBanzaiPuck
This commit is contained in:
parent
be7fc16935
commit
0fbebc5ac8
@ -140,8 +140,10 @@ public class InteractionBattleBanzaiPuck extends InteractionPushable
|
|||||||
@Override
|
@Override
|
||||||
public boolean validMove(Room room, RoomTile from, RoomTile to)
|
public boolean validMove(Room room, RoomTile from, RoomTile to)
|
||||||
{
|
{
|
||||||
|
if (room == null || from == null || to == null) return false;
|
||||||
|
|
||||||
HabboItem topItem = room.getTopItemAt(to.x, to.y, this);
|
HabboItem topItem = room.getTopItemAt(to.x, to.y, this);
|
||||||
return topItem instanceof InteractionBattleBanzaiTile;
|
return topItem != null && topItem instanceof InteractionBattleBanzaiTile;
|
||||||
//return !(!room.getLayout().tileWalkable(to.x, to.y) || (topItem != null && (!topItem.getBaseItem().setAllowStack() || topItem.getBaseItem().allowSit() || topItem.getBaseItem().allowLay())));
|
//return !(!room.getLayout().tileWalkable(to.x, to.y) || (topItem != null && (!topItem.getBaseItem().setAllowStack() || topItem.getBaseItem().allowSit() || topItem.getBaseItem().allowLay())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user