Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
314916279a | ||
|
|
dbf1a1bb36 | ||
|
|
8f2b8dd013 | ||
|
|
0245e7d1af |
@@ -58,8 +58,8 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
if (cm.getChar().getGender() == 1) {
|
||||
for (var i = 0; i < fface.length; i++) {
|
||||
pushIfItemExists(facenew, fface[i] + cm.getChar().getFace()
|
||||
for (var i = 0; i < fface_v.length; i++) {
|
||||
pushIfItemExists(facenew, fface_v[i] + cm.getChar().getFace()
|
||||
% 1000 - (cm.getChar().getFace()
|
||||
% 100));
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class MonsterInformationProvider {
|
||||
|
||||
private final Map<Integer, List<MonsterDropEntry>> drops = new HashMap<>();
|
||||
private final List<MonsterGlobalDropEntry> globaldrops = new ArrayList<>();
|
||||
private final Map<Integer, List<MonsterGlobalDropEntry>> continentdrops = new HashMap<>();
|
||||
private final Map<Integer, List<MonsterGlobalDropEntry>> continentDrops = new HashMap<>();
|
||||
|
||||
private final Map<Integer, List<Integer>> dropsChancePool = new HashMap<>(); // thanks to ronan
|
||||
private final Set<Integer> hasNoMultiEquipDrops = new HashSet<>();
|
||||
@@ -76,23 +76,15 @@ public class MonsterInformationProvider {
|
||||
retrieveGlobal();
|
||||
}
|
||||
|
||||
public final List<MonsterGlobalDropEntry> getRelevantGlobalDrops(int mapid) {
|
||||
int continentid = mapid / 100000000;
|
||||
public final List<MonsterGlobalDropEntry> getRelevantGlobalDrops(int mapId) {
|
||||
final int continentId = mapId / 100000000;
|
||||
return continentDrops.computeIfAbsent(continentId, this::loadContinentDrops);
|
||||
}
|
||||
|
||||
List<MonsterGlobalDropEntry> contiItems = continentdrops.get(continentid);
|
||||
if (contiItems == null) { // continent separated global drops found thanks to marcuswoon
|
||||
contiItems = new ArrayList<>();
|
||||
|
||||
for (MonsterGlobalDropEntry e : globaldrops) {
|
||||
if (e.continentid < 0 || e.continentid == continentid) {
|
||||
contiItems.add(e);
|
||||
}
|
||||
}
|
||||
|
||||
continentdrops.put(continentid, contiItems);
|
||||
}
|
||||
|
||||
return contiItems;
|
||||
private List<MonsterGlobalDropEntry> loadContinentDrops(int continentId) {
|
||||
return globaldrops.stream()
|
||||
.filter(dropEntry -> dropEntry.continentid < 0 || dropEntry.continentid == continentId)
|
||||
.toList();
|
||||
}
|
||||
|
||||
private void retrieveGlobal() {
|
||||
@@ -291,7 +283,7 @@ public class MonsterInformationProvider {
|
||||
extraMultiEquipDrops.clear();
|
||||
dropsChancePool.clear();
|
||||
globaldrops.clear();
|
||||
continentdrops.clear();
|
||||
continentDrops.clear();
|
||||
retrieveGlobal();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -751,7 +751,7 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
final MonsterInformationProvider mi = MonsterInformationProvider.getInstance();
|
||||
final List<MonsterGlobalDropEntry> globalEntry = mi.getRelevantGlobalDrops(this.getId());
|
||||
final List<MonsterGlobalDropEntry> globalEntry = new ArrayList<>(mi.getRelevantGlobalDrops(mapid));
|
||||
|
||||
final List<MonsterDropEntry> dropEntry = new ArrayList<>();
|
||||
final List<MonsterDropEntry> visibleQuestEntry = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user