[Fix] Fixed parameter switchup in KillEntityByConfigId (thx @scooterboo )

This commit is contained in:
hartie95 2024-02-11 21:23:11 +01:00
parent a91021a048
commit 34e9f21cab
2 changed files with 6 additions and 6 deletions

View File

@ -139,12 +139,12 @@ public class SceneGroup {
this.suites = cs.getGlobalVariableList("suites", SceneSuite.class);
this.regions = cs.getGlobalVariableList("regions", SceneRegion.class).stream()
.peek(group -> {
group.groupId = groupId;
group.blockId = blockId;
group.sceneMeta = sceneMeta;
})
.collect(Collectors.toMap(x -> x.configId, y -> y, (a, b) -> a));
this.regions.values().forEach(m -> {
m.groupId = groupId;
m.blockId = blockId;
m.sceneMeta = sceneMeta;
});
this.initConfig = cs.getGlobalVariable("init_config", SceneInitConfig.class);

View File

@ -266,7 +266,7 @@ public class ScriptLib {
return INVALID_PARAMETER.getValue();
}
val entityType = EntityType.values()[entityTypeValue];
val params = new KillByConfigIdParams(groupId, configId, entityType);
val params = new KillByConfigIdParams(configId, groupId, entityType);
if (context instanceof GroupEventLuaContext gContext){
return gContext.getScriptLibHandlerProvider().getScriptLibHandler().KillEntityByConfigId(gContext, params);
} else if (context instanceof ControllerLuaContext cContext) {