Fix tower mob level and hp scaling (#2430)

This commit is contained in:
longfruit
2023-11-08 18:15:10 -08:00
committed by GitHub
Unverified
parent 1fac319eb2
commit 0bbeaf254b
7 changed files with 66 additions and 27 deletions
@@ -767,6 +767,20 @@ public class Scene {
return level;
}
public int getLevelForMonster(int configId, int defaultLevel) {
if (getDungeonManager() != null) {
return getDungeonManager().getLevelForMonster(configId);
} else if (getWorld().getWorldLevel() > 0) {
var worldLevelData =
GameData.getWorldLevelDataMap().get(getWorld().getWorldLevel());
if (worldLevelData != null) {
return worldLevelData.getMonsterLevel();
}
}
return defaultLevel;
}
public void checkNpcGroup() {
Set<SceneNpcBornEntry> npcBornEntries = ConcurrentHashMap.newKeySet();
for (Player player : this.getPlayers()) {