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