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

@@ -20,8 +20,8 @@
package server.loot;
import client.Character;
import database.drop.DropProvider;
import server.life.MonsterDropEntry;
import server.life.MonsterInformationProvider;
import server.quest.Quest;
import java.util.Collections;
@@ -63,8 +63,8 @@ public class LootManager {
return false;
}
public static List<MonsterDropEntry> retrieveRelevantDrops(int monsterId, List<Character> chrs) {
List<MonsterDropEntry> drops = MonsterInformationProvider.getInstance().retrieveEffectiveDrop(monsterId);
public static List<MonsterDropEntry> retrieveRelevantDrops(int monsterId, List<Character> chrs, DropProvider dropProvider) {
List<MonsterDropEntry> drops = dropProvider.getMonsterDropEntries(monsterId);
if (drops.isEmpty()) {
return Collections.emptyList();
}