From 66b17cad266bff4b2329c6760efe65efdd9c2a3a Mon Sep 17 00:00:00 2001 From: Akka <104902222+Akka0@users.noreply.github.com> Date: Tue, 10 May 2022 00:14:50 +0800 Subject: [PATCH] little fix --- .../scripts/service/ScriptMonsterTideService.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/emu/grasscutter/scripts/service/ScriptMonsterTideService.java b/src/main/java/emu/grasscutter/scripts/service/ScriptMonsterTideService.java index 878438190..57d4735ba 100644 --- a/src/main/java/emu/grasscutter/scripts/service/ScriptMonsterTideService.java +++ b/src/main/java/emu/grasscutter/scripts/service/ScriptMonsterTideService.java @@ -60,18 +60,18 @@ public class ScriptMonsterTideService { return currentGroup.monsters.values().stream().findFirst().orElse(null); } - public class OnMonsterDead implements ScriptMonsterListener{ + public class OnMonsterDead implements ScriptMonsterListener { @Override public void onNotify(EntityMonster sceneMonster) { - if(monsterSceneLimit <= 0){ + if (monsterSceneLimit <= 0) { return; } - if(monsterAlive.decrementAndGet() >= monsterSceneLimit) { + if (monsterAlive.decrementAndGet() >= monsterSceneLimit) { // maybe not happen return; } monsterKillCount.incrementAndGet(); - if(monsterTideCount.get() > 0){ + if (monsterTideCount.get() > 0) { // add more sceneScriptManager.getScriptMonsterSpawnService().spawnMonster(currentGroup.id, getNextMonster()); } @@ -79,9 +79,7 @@ public class ScriptMonsterTideService { // fix the 5-2 sceneScriptManager.callEvent(EventType.EVENT_MONSTER_TIDE_DIE, new ScriptArgs(monsterKillCount.get())); } - // spawn the last turn of monsters - // fix the 5-2 - this.sceneScriptManager.callEvent(EventType.EVENT_MONSTER_TIDE_DIE, new ScriptArgs(this.monsterKillCount.get())); + } public void unload(){