fix the Monster spawn between stage challenges

This commit is contained in:
Akka
2022-05-10 00:05:01 +08:00
parent 45b45c4beb
commit faa3cde575
10 changed files with 133 additions and 50 deletions

View File

@@ -373,6 +373,12 @@ public class SceneScriptManager {
new ScriptMonsterTideService(this, group, tideCount, sceneLimit, ordersConfigId);
}
public void unloadCurrentMonsterTide(){
if(this.getScriptMonsterTideService() == null){
return;
}
this.getScriptMonsterTideService().unload();
}
public void spawnMonstersByConfigId(int configId, int delayTime) {
// TODO delay
this.scriptMonsterSpawnService.spawnMonster(this.currentGroup.id, this.currentGroup.monsters.get(configId));
@@ -395,12 +401,15 @@ public class SceneScriptManager {
if (params != null) {
args = CoerceJavaToLua.coerce(params);
}
ScriptLib.logger.trace("Call Condition Trigger {}", trigger);
ret = safetyCall(trigger.condition, condition, args);
}
if (ret.isboolean() && ret.checkboolean()) {
ScriptLib.logger.trace("Call Action Trigger {}", trigger);
LuaValue action = (LuaValue) this.getBindings().get(trigger.action);
// TODO impl the param of SetGroupVariableValueByGroup
var arg = new ScriptArgs();
arg.param2 = 100;
var args = CoerceJavaToLua.coerce(arg);