mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Fixes issue with Bot Wired.
This commit is contained in:
parent
e45d2867ef
commit
8005c5cf1f
@ -89,6 +89,9 @@ public class WiredEffectBotFollowHabbo extends InteractionWiredEffect {
|
|||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
List<Bot> bots = room.getBots(this.botName);
|
List<Bot> bots = room.getBots(this.botName);
|
||||||
for (Bot bot : bots) {
|
for (Bot bot : bots) {
|
||||||
|
if (bots.size() > 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (this.mode == 1)
|
if (this.mode == 1)
|
||||||
bot.startFollowingHabbo(habbo);
|
bot.startFollowingHabbo(habbo);
|
||||||
else
|
else
|
||||||
|
@ -93,6 +93,9 @@ public class WiredEffectBotGiveHandItem extends InteractionWiredEffect {
|
|||||||
List<Bot> bots = room.getBots(this.botName);
|
List<Bot> bots = room.getBots(this.botName);
|
||||||
|
|
||||||
for (Bot bot : bots) {
|
for (Bot bot : bots) {
|
||||||
|
if (bots.size() > 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
List<Runnable> tasks = new ArrayList<>();
|
List<Runnable> tasks = new ArrayList<>();
|
||||||
tasks.add(new RoomUnitGiveHanditem(habbo.getRoomUnit(), room, this.itemId));
|
tasks.add(new RoomUnitGiveHanditem(habbo.getRoomUnit(), room, this.itemId));
|
||||||
tasks.add(new RoomUnitGiveHanditem(bot.getRoomUnit(), room, 0));
|
tasks.add(new RoomUnitGiveHanditem(bot.getRoomUnit(), room, 0));
|
||||||
|
@ -86,6 +86,9 @@ public class WiredEffectBotTalk extends InteractionWiredEffect {
|
|||||||
List<Bot> bots = room.getBots(this.botName);
|
List<Bot> bots = room.getBots(this.botName);
|
||||||
|
|
||||||
for (Bot bot : bots) {
|
for (Bot bot : bots) {
|
||||||
|
if (bots.size() > 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (this.mode == 1)
|
if (this.mode == 1)
|
||||||
bot.shout(message);
|
bot.shout(message);
|
||||||
else
|
else
|
||||||
|
@ -105,6 +105,9 @@ public class WiredEffectBotTalkToHabbo extends InteractionWiredEffect {
|
|||||||
List<Bot> bots = room.getBots(this.botName);
|
List<Bot> bots = room.getBots(this.botName);
|
||||||
|
|
||||||
for (Bot bot : bots) {
|
for (Bot bot : bots) {
|
||||||
|
if (bots.size() > 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (this.mode == 1) {
|
if (this.mode == 1) {
|
||||||
bot.whisper(m, habbo);
|
bot.whisper(m, habbo);
|
||||||
} else {
|
} else {
|
||||||
|
@ -13,7 +13,6 @@ import com.eu.habbo.habbohotel.wired.WiredHandler;
|
|||||||
import com.eu.habbo.messages.ClientMessage;
|
import com.eu.habbo.messages.ClientMessage;
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.threading.runnables.RoomUnitTeleport;
|
import com.eu.habbo.threading.runnables.RoomUnitTeleport;
|
||||||
import com.eu.habbo.threading.runnables.SendRoomUnitEffectComposer;
|
|
||||||
import gnu.trove.set.hash.THashSet;
|
import gnu.trove.set.hash.THashSet;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@ -99,6 +98,9 @@ public class WiredEffectBotTeleport extends InteractionWiredEffect {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (Bot bot : bots) {
|
for (Bot bot : bots) {
|
||||||
|
if (bots.size() > 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
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) {
|
||||||
|
@ -109,6 +109,9 @@ public class WiredEffectBotWalkToFurni extends InteractionWiredEffect {
|
|||||||
|
|
||||||
if (this.items.size() > 0) {
|
if (this.items.size() > 0) {
|
||||||
for (Bot bot : bots) {
|
for (Bot bot : bots) {
|
||||||
|
if (bots.size() > 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user