mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 01:50:50 +01:00
Fixed a IllegalArgumentException in WiredEffectBotWalkToFurni
This commit is contained in:
parent
8161e28411
commit
75985a3696
@ -119,21 +119,18 @@ public class WiredEffectBotWalkToFurni extends InteractionWiredEffect
|
||||
this.items.remove(item);
|
||||
}
|
||||
|
||||
for(Bot bot : bots)
|
||||
{
|
||||
int i = Emulator.getRandom().nextInt(this.items.size()) + 1;
|
||||
int j = 1;
|
||||
for (HabboItem item : this.items)
|
||||
{
|
||||
if(item.getRoomId() != 0 && item.getRoomId() == bot.getRoom().getId())
|
||||
{
|
||||
if (i == j)
|
||||
{
|
||||
bot.getRoomUnit().setGoalLocation(room.getLayout().getTile(item.getX(), item.getY()));
|
||||
break;
|
||||
} else
|
||||
{
|
||||
j++;
|
||||
if(this.items.size() > 0) {
|
||||
for (Bot bot : bots) {
|
||||
int i = Emulator.getRandom().nextInt(this.items.size()) + 1;
|
||||
int j = 1;
|
||||
for (HabboItem item : this.items) {
|
||||
if (item.getRoomId() != 0 && item.getRoomId() == bot.getRoom().getId()) {
|
||||
if (i == j) {
|
||||
bot.getRoomUnit().setGoalLocation(room.getLayout().getTile(item.getX(), item.getY()));
|
||||
break;
|
||||
} else {
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user