From 30d093f3480784c51d0cf98752d3a66feb8b58b5 Mon Sep 17 00:00:00 2001 From: Nazrin Date: Fri, 23 Jun 2023 21:37:13 -0700 Subject: [PATCH] Update ScriptLib.java (#2227) --- src/main/java/emu/grasscutter/scripts/ScriptLib.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/scripts/ScriptLib.java b/src/main/java/emu/grasscutter/scripts/ScriptLib.java index 790406aa5..e6f9b3921 100644 --- a/src/main/java/emu/grasscutter/scripts/ScriptLib.java +++ b/src/main/java/emu/grasscutter/scripts/ScriptLib.java @@ -823,17 +823,17 @@ public class ScriptLib { //TODO implement return 0; } - public int IsPlayerAllAvatarDie(int sceneUid){ + public boolean IsPlayerAllAvatarDie(int sceneUid){ logger.warn("[LUA] Call unimplemented IsPlayerAllAvatarDie {}", sceneUid); var playerEntities = getSceneScriptManager().getScene().getEntities().values().stream().filter(e -> e.getEntityType() == EntityType.Avatar).toList(); for (GameEntity p : playerEntities){ var player = (EntityAvatar)p; if(player.isAlive()){ - return 0; + return false; } } //TODO check - return 1; + return true; } public int sendShowCommonTipsToClient(String title, String content, int closeTime) { @@ -869,6 +869,11 @@ public class ScriptLib { //TODO implement var6 object has int success, int fail, bool fail_on_wipe return 0; } + public int StopChallenge(int var1, int var2){ + logger.warn("[LUA] Call unimplemented StopChallenge with {} {}", var1, var2); + //TODO implement + return 0; + } public int CreateEffigyChallengeMonster(int var1, int[] var2){ logger.warn("[LUA] Call unimplemented CreateEffigyChallengeMonster with {} {}", var1, var2); //TODO implement