Cleanup of previous commit.

This commit is contained in:
harmonic 2020-07-10 16:26:16 +01:00
parent 8005c5cf1f
commit 3b50122d74
8 changed files with 25 additions and 23 deletions

View File

@ -68,6 +68,9 @@ public class WiredEffectBotClothes extends InteractionWiredEffect {
@Override
public boolean execute(RoomUnit roomUnit, Room room, Object[] stuff) {
List<Bot> bots = room.getBots(this.botName);
if (bots.size() > 1) {
return false;
}
for (Bot bot : bots) {
bot.setFigure(this.botLook);
}

View File

@ -88,10 +88,10 @@ public class WiredEffectBotFollowHabbo extends InteractionWiredEffect {
if (habbo != null) {
List<Bot> bots = room.getBots(this.botName);
if (bots.size() > 1) {
return false;
}
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
if (this.mode == 1)
bot.startFollowingHabbo(habbo);
else

View File

@ -91,11 +91,10 @@ public class WiredEffectBotGiveHandItem extends InteractionWiredEffect {
if (habbo != null) {
List<Bot> bots = room.getBots(this.botName);
if (bots.size() > 1) {
return false;
}
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
List<Runnable> tasks = new ArrayList<>();
tasks.add(new RoomUnitGiveHanditem(habbo.getRoomUnit(), room, this.itemId));
tasks.add(new RoomUnitGiveHanditem(bot.getRoomUnit(), room, 0));

View File

@ -84,11 +84,10 @@ public class WiredEffectBotTalk extends InteractionWiredEffect {
.replace(Emulator.getTexts().getValue("wired.variable.points"), habbo.getHabboInfo().getCurrencyAmount(Emulator.getConfig().getInt("seasonal.primary.type")) + "");
}
List<Bot> bots = room.getBots(this.botName);
if (bots.size() > 1) {
return false;
}
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
if (this.mode == 1)
bot.shout(message);
else

View File

@ -103,11 +103,10 @@ public class WiredEffectBotTalkToHabbo extends InteractionWiredEffect {
.replace(Emulator.getTexts().getValue("wired.variable.points"), habbo.getHabboInfo().getCurrencyAmount(Emulator.getConfig().getInt("seasonal.primary.type")) + "");
List<Bot> bots = room.getBots(this.botName);
if (bots.size() > 1) {
return false;
}
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
if (this.mode == 1) {
bot.whisper(m, habbo);
} else {

View File

@ -97,10 +97,10 @@ public class WiredEffectBotTeleport extends InteractionWiredEffect {
if (bots.isEmpty())
return false;
if (bots.size() > 1) {
return false;
}
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
int i = Emulator.getRandom().nextInt(this.items.size()) + 1;
int j = 1;
for (HabboItem item : this.items) {

View File

@ -108,10 +108,10 @@ public class WiredEffectBotWalkToFurni extends InteractionWiredEffect {
}
if (this.items.size() > 0) {
if (bots.size() > 1) {
return false;
}
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
int i = Emulator.getRandom().nextInt(this.items.size()) + 1;
int j = 1;
for (HabboItem item : this.items) {

View File

@ -70,6 +70,7 @@ public class PluginManager {
@EventHandler
public static void globalOnConfigurationUpdated(EmulatorConfigUpdatedEvent event) {
ItemManager.RECYCLER_ENABLED = Emulator.getConfig().getBoolean("hotel.catalog.recycler.enabled");
MarketPlace.MARKETPLACE_ENABLED = Emulator.getConfig().getBoolean("hotel.marketplace.enabled");
MarketPlace.MARKETPLACE_CURRENCY = Emulator.getConfig().getInt("hotel.marketplace.currency");
@ -159,8 +160,6 @@ public class PluginManager {
BotManager.MAXIMUM_BOT_INVENTORY_SIZE = Emulator.getConfig().getInt("hotel.bots.max.inventory");
PetManager.MAXIMUM_PET_INVENTORY_SIZE = Emulator.getConfig().getInt("hotel.pets.max.inventory");
GiftConfigurationComposer.BOX_TYPES = Arrays.stream(Emulator.getConfig().getValue("hotel.gifts.box_types").split(",")).mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
GiftConfigurationComposer.RIBBON_TYPES = Arrays.stream(Emulator.getConfig().getValue("hotel.gifts.ribbon_types").split(",")).mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
NewNavigatorEventCategoriesComposer.CATEGORIES.clear();
for (String category : Emulator.getConfig().getValue("navigator.eventcategories", "").split(";")) {
@ -172,6 +171,9 @@ public class PluginManager {
}
if (Emulator.isReady) {
GiftConfigurationComposer.BOX_TYPES = Arrays.stream(Emulator.getConfig().getValue("hotel.gifts.box_types").split(",")).mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
GiftConfigurationComposer.RIBBON_TYPES = Arrays.stream(Emulator.getConfig().getValue("hotel.gifts.ribbon_types").split(",")).mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
Emulator.getGameEnvironment().getCreditsScheduler().reloadConfig();
Emulator.getGameEnvironment().getPointsScheduler().reloadConfig();
Emulator.getGameEnvironment().getPixelScheduler().reloadConfig();