Anime-Game-Servers / Grasscutter-Quests

A server software implementation, ineroperable with a certain anime game client. The code in this repository is fully custom made for edyoucational purposes and future preservation, no copyrighted code is allowed in this repository.
https://grasscutters.xyz/grasscutter
GNU Affero General Public License v3.0
133 stars 31 forks source link

[Bug] I killed Stormterror in first Stormterror encounter #84

Open scooterboo opened 8 months ago

scooterboo commented 8 months ago

Describe the bug During the first Stormterror fight, I got Stormterror to 0 hp and he died. :(

This appeared in console every time I got a hit on him:

org.luaj.vm2.LuaError: script:88 attempt to compare __lt on number and nil
    at org.luaj.vm2.LuaValue.error(LuaValue.java:337)
    at org.luaj.vm2.LuaValue.comparemt(LuaValue.java:4175)
    at org.luaj.vm2.LuaValue.lt_b(LuaValue.java:3747)
    at org.luaj.vm2.LuaInteger.lt_b(LuaInteger.java:322)
    at org.luaj.vm2.LuaClosure.execute(LuaClosure.java:341)
    at org.luaj.vm2.LuaClosure.onInvoke(LuaClosure.java:204)
    at org.luaj.vm2.LuaClosure.invoke(LuaClosure.java:197)
    at org.luaj.vm2.LuaValue.invoke(LuaValue.java:2751)
    at org.anime_game_servers.luaj_engine.LuaJScript.callMethod(LuaJScript.java:101)
    at emu.grasscutter.scripts.SceneScriptManager.callScriptFunc(SceneScriptManager.java:832)
    at emu.grasscutter.scripts.SceneScriptManager.evaluateTriggerCondition(SceneScriptManager.java:774)
    at emu.grasscutter.scripts.SceneScriptManager.handleEventForTrigger(SceneScriptManager.java:747)
    at emu.grasscutter.scripts.SceneScriptManager.realCallEvent(SceneScriptManager.java:736)
    at emu.grasscutter.scripts.SceneScriptManager.lambda$callEvent$27(SceneScriptManager.java:724)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:833)

Pretty sure that's our problem here.

How to replicate: Just do the Dvalin fight as normal hand keep hitting him.

Notes: Some cuscenes are triggered by bosses getting to certain HP values, but sometimes the events don't end up firing, leading to Boss death. In this case, I hit him slowly enough that there should have been the cutscene

Which branch did you use? multi_proto Grasscutter version: 1.4.4-dev-59e2d2b4 Lua: LuaJ

Screenshots

image

scooterboo commented 8 months ago

This does not happen with JNLua

Hartie95 commented 7 months ago

should be fixed with https://github.com/Hartie95/AnimeGamesLua/commit/0f9db85b24608fb911776f2ffa9aa3175400f7da