Monster drops are retrieved from DropProvider (postgres db)

This commit emphasizes the need for events to be reworked.
This is the chain of constructors the DropProvider has to pass through to reach MapleMap:
Channel -> EventScriptManager -> EventManager -> EventInstanceManager -> MapManager -> MapleMap
This commit is contained in:
P0nk
2023-03-16 08:31:38 +01:00
parent a95fa2efc1
commit cc88d382e6
12 changed files with 55 additions and 63 deletions

View File

@@ -361,7 +361,7 @@ public class Server {
wldRLock.unlock();
}
Channel channel = new Channel(worldid, channelid, getCurrentTime());
Channel channel = new Channel(worldid, channelid, getCurrentTime(), channelDependencies.dropProvider());
channel.setServerMessage(YamlConfig.config.worlds.get(worldid).why_am_i_recommended);
if (world.addChannel(channel)) {
@@ -434,7 +434,7 @@ public class Server {
long bootTime = getCurrentTime();
for (int j = 1; j <= YamlConfig.config.worlds.get(i).channels; j++) {
int channelid = j;
Channel channel = new Channel(i, channelid, bootTime);
Channel channel = new Channel(i, channelid, bootTime, channelDependencies.dropProvider());
world.addChannel(channel);
channelInfo.put(channelid, channel.getIP());