mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 05:44:36 +01:00
Fixed stagnant shadow bosses being the wrong world level when spawned
Also reworked how monsters scaled when changing world level
This commit is contained in:
@@ -82,7 +82,7 @@ public class BattleService extends BaseGameService {
|
||||
List<StageExcel> stages = new ArrayList<>();
|
||||
|
||||
for (var monster : monsters) {
|
||||
StageExcel stage = GameData.getStageExcelMap().get(monster.getStageId(player.getWorldLevel()));
|
||||
StageExcel stage = GameData.getStageExcelMap().get(monster.getStageId());
|
||||
|
||||
if (stage != null) {
|
||||
stages.add(stage);
|
||||
|
||||
@@ -89,6 +89,7 @@ public class Scene {
|
||||
monster.setInstId(monsterInfo.getID());
|
||||
monster.setEventId(monsterInfo.getEventID());
|
||||
monster.setGroupId(group.getId());
|
||||
monster.setWorldLevel(this.getPlayer().getWorldLevel());
|
||||
|
||||
// Add to monsters
|
||||
this.addEntity(monster);
|
||||
@@ -210,6 +211,10 @@ public class Scene {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entity instanceof EntityMonster monster) {
|
||||
monster.setWorldLevel(worldLevel);
|
||||
}
|
||||
|
||||
player.sendPacket(new PacketActivateFarmElementScRsp(entityId, worldLevel));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class EntityMonster implements GameEntity {
|
||||
this.rot = new Position();
|
||||
}
|
||||
|
||||
public int getStageId(int worldLevel) {
|
||||
public int getStageId() {
|
||||
return (this.getEventId() * 10) + worldLevel;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user