mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 12:22:36 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
eb9a38871d
@ -3244,17 +3244,17 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public THashSet<HabboItem> getItemsAt(RoomTile tile) {
|
public THashSet<HabboItem> getItemsAt(RoomTile tile) {
|
||||||
|
THashSet<HabboItem> items = new THashSet<>(0);
|
||||||
|
|
||||||
|
if (tile == null)
|
||||||
|
return items;
|
||||||
|
|
||||||
if (this.loaded) {
|
if (this.loaded) {
|
||||||
if (this.tileCache.containsKey(tile)) {
|
if (this.tileCache.containsKey(tile)) {
|
||||||
return this.tileCache.get(tile);
|
return this.tileCache.get(tile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
THashSet<HabboItem> items = new THashSet<>(0);
|
|
||||||
|
|
||||||
if (tile == null)
|
|
||||||
return items;
|
|
||||||
|
|
||||||
TIntObjectIterator<HabboItem> iterator = this.roomItems.iterator();
|
TIntObjectIterator<HabboItem> iterator = this.roomItems.iterator();
|
||||||
|
|
||||||
for (int i = this.roomItems.size(); i-- > 0; ) {
|
for (int i = this.roomItems.size(); i-- > 0; ) {
|
||||||
@ -3682,6 +3682,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
for (Habbo habbo : this.getHabbos()) {
|
for (Habbo habbo : this.getHabbos()) {
|
||||||
if (habbo.getClient() == null) {
|
if (habbo.getClient() == null) {
|
||||||
this.removeHabbo(habbo, true);
|
this.removeHabbo(habbo, true);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
habbo.getClient().sendResponse(message);
|
habbo.getClient().sendResponse(message);
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.eu.habbo.habbohotel.wired.highscores;
|
package com.eu.habbo.habbohotel.wired.highscores;
|
||||||
|
|
||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
|
import com.eu.habbo.plugin.EventHandler;
|
||||||
|
import com.eu.habbo.plugin.events.emulator.EmulatorLoadedEvent;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
@ -29,12 +31,16 @@ public class WiredHighscoreManager {
|
|||||||
this.data.clear();
|
this.data.clear();
|
||||||
this.loadHighscoreData();
|
this.loadHighscoreData();
|
||||||
|
|
||||||
|
Emulator.getLogging().logStart("Highscore Manager -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS, " + this.data.size() + " items)");
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public static void onEmulatorLoaded(EmulatorLoadedEvent event) {
|
||||||
if (midnightUpdater != null) {
|
if (midnightUpdater != null) {
|
||||||
midnightUpdater.cancel(true);
|
midnightUpdater.cancel(true);
|
||||||
}
|
}
|
||||||
midnightUpdater = Emulator.getThreading().run(new WiredHighscoreMidnightUpdater(), WiredHighscoreMidnightUpdater.getNextUpdaterRun());
|
|
||||||
|
|
||||||
Emulator.getLogging().logStart("Highscore Manager -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS, " + this.data.size() + " items)");
|
midnightUpdater = Emulator.getThreading().run(new WiredHighscoreMidnightUpdater(), WiredHighscoreMidnightUpdater.getNextUpdaterRun());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
|
@ -20,12 +20,14 @@ import com.eu.habbo.habbohotel.rooms.*;
|
|||||||
import com.eu.habbo.habbohotel.users.HabboInventory;
|
import com.eu.habbo.habbohotel.users.HabboInventory;
|
||||||
import com.eu.habbo.habbohotel.users.HabboManager;
|
import com.eu.habbo.habbohotel.users.HabboManager;
|
||||||
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
||||||
|
import com.eu.habbo.habbohotel.wired.highscores.WiredHighscoreManager;
|
||||||
import com.eu.habbo.messages.PacketManager;
|
import com.eu.habbo.messages.PacketManager;
|
||||||
import com.eu.habbo.messages.incoming.floorplaneditor.FloorPlanEditorSaveEvent;
|
import com.eu.habbo.messages.incoming.floorplaneditor.FloorPlanEditorSaveEvent;
|
||||||
import com.eu.habbo.messages.incoming.hotelview.HotelViewRequestLTDAvailabilityEvent;
|
import com.eu.habbo.messages.incoming.hotelview.HotelViewRequestLTDAvailabilityEvent;
|
||||||
import com.eu.habbo.messages.incoming.users.ChangeNameCheckUsernameEvent;
|
import com.eu.habbo.messages.incoming.users.ChangeNameCheckUsernameEvent;
|
||||||
import com.eu.habbo.messages.outgoing.catalog.DiscountComposer;
|
import com.eu.habbo.messages.outgoing.catalog.DiscountComposer;
|
||||||
import com.eu.habbo.plugin.events.emulator.EmulatorConfigUpdatedEvent;
|
import com.eu.habbo.plugin.events.emulator.EmulatorConfigUpdatedEvent;
|
||||||
|
import com.eu.habbo.plugin.events.emulator.EmulatorLoadedEvent;
|
||||||
import com.eu.habbo.plugin.events.roomunit.RoomUnitLookAtPointEvent;
|
import com.eu.habbo.plugin.events.roomunit.RoomUnitLookAtPointEvent;
|
||||||
import com.eu.habbo.plugin.events.users.*;
|
import com.eu.habbo.plugin.events.users.*;
|
||||||
import com.eu.habbo.threading.runnables.RoomTrashing;
|
import com.eu.habbo.threading.runnables.RoomTrashing;
|
||||||
@ -322,6 +324,7 @@ public class PluginManager {
|
|||||||
this.methods.add(InteractionFootballGate.class.getMethod("onUserExitRoomEvent", UserExitRoomEvent.class));
|
this.methods.add(InteractionFootballGate.class.getMethod("onUserExitRoomEvent", UserExitRoomEvent.class));
|
||||||
this.methods.add(InteractionFootballGate.class.getMethod("onUserSavedLookEvent", UserSavedLookEvent.class));
|
this.methods.add(InteractionFootballGate.class.getMethod("onUserSavedLookEvent", UserSavedLookEvent.class));
|
||||||
this.methods.add(PluginManager.class.getMethod("globalOnConfigurationUpdated", EmulatorConfigUpdatedEvent.class));
|
this.methods.add(PluginManager.class.getMethod("globalOnConfigurationUpdated", EmulatorConfigUpdatedEvent.class));
|
||||||
|
this.methods.add(WiredHighscoreManager.class.getMethod("onEmulatorLoaded", EmulatorLoadedEvent.class));
|
||||||
} catch (NoSuchMethodException e) {
|
} catch (NoSuchMethodException e) {
|
||||||
Emulator.getLogging().logStart("Failed to define default events!");
|
Emulator.getLogging().logStart("Failed to define default events!");
|
||||||
Emulator.getLogging().logErrorLine(e);
|
Emulator.getLogging().logErrorLine(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user