Commit a19e7c6d authored by Paimon2022's avatar Paimon2022 Committed by Melledy
Browse files

Spawn default monsters with different levels according to data/Spawns.json...

Spawn default monsters with different levels according to data/Spawns.json when worldLevelOverride is not zero.

For example, in world with worldlevel 8, base monster level is 90 according to resources/ExcelBinOutput/WorldLevelExcelConfigData.json,
monster level bias in data/Spawns.json belongs to [1,32], so the monster level would belong to [69, 100].
parent 4119f8b7
...@@ -465,7 +465,11 @@ public class Scene { ...@@ -465,7 +465,11 @@ public class Scene {
continue; continue;
} }
EntityMonster entity = new EntityMonster(this, data, entry.getPos(), worldLevelOverride > 0 ? worldLevelOverride : entry.getLevel()); int level = worldLevelOverride > 0 ? worldLevelOverride + entry.getLevel() - 22 : entry.getLevel();
level = level >= 100 ? 100 : level;
level = level <= 0 ? 1 : level;
EntityMonster entity = new EntityMonster(this, data, entry.getPos(), level);
entity.getRotation().set(entry.getRot()); entity.getRotation().set(entry.getRot());
entity.setGroupId(entry.getGroup().getGroupId()); entity.setGroupId(entry.getGroup().getGroupId());
entity.setPoseId(entry.getPoseId()); entity.setPoseId(entry.getPoseId());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment