diff --git a/src/main/java/emu/grasscutter/scripts/ScriptLib.java b/src/main/java/emu/grasscutter/scripts/ScriptLib.java index 16d70cc44..d871fe25f 100644 --- a/src/main/java/emu/grasscutter/scripts/ScriptLib.java +++ b/src/main/java/emu/grasscutter/scripts/ScriptLib.java @@ -708,6 +708,17 @@ public class ScriptLib { return quest.getState().getValue(); } + public int GetHostQuestState(int questId){ + val player = getSceneScriptManager().getScene().getWorld().getHost(); + + val quest = player.getQuestManager().getQuestById(questId); + if(quest == null){ + return QuestState.QUEST_STATE_NONE.getValue(); + } + + return quest.getState().getValue(); + } + public int ShowReminder(int reminderId){ getSceneScriptManager().getScene().broadcastPacket(new PacketDungeonShowReminderNotify(reminderId)); return 0; @@ -1207,6 +1218,12 @@ public class ScriptLib { return 0; } + public int EnterWeatherArea(int var1){ + logger.warn("[LUA] Call unimplemented EnterWeatherArea with {}", var1); + //TODO implement + return 0; + } + //TODO check public boolean CheckIsInMpMode(){ logger.debug("[LUA] Call CheckIsInMpMode"); diff --git a/src/main/java/emu/grasscutter/scripts/ScriptLoader.java b/src/main/java/emu/grasscutter/scripts/ScriptLoader.java index 13efcea5b..675d826b9 100644 --- a/src/main/java/emu/grasscutter/scripts/ScriptLoader.java +++ b/src/main/java/emu/grasscutter/scripts/ScriptLoader.java @@ -73,6 +73,7 @@ public class ScriptLoader { addEnumByOrdinal(ctx, SealBattleType.values(), "SealBattleType"); addEnumByOrdinal(ctx, FatherChallengeProperty.values(), "FatherChallengeProperty"); addEnumByOrdinal(ctx, ChallengeEventMarkType.values(), "ChallengeEventMarkType"); + addEnumByOrdinal(ctx, VisionLevelType.values(), "VisionLevelType"); ctx.globals.set( "EventType", diff --git a/src/main/java/emu/grasscutter/scripts/constants/VisionLevelType.java b/src/main/java/emu/grasscutter/scripts/constants/VisionLevelType.java new file mode 100644 index 000000000..aa58783fa --- /dev/null +++ b/src/main/java/emu/grasscutter/scripts/constants/VisionLevelType.java @@ -0,0 +1,7 @@ +package emu.grasscutter.scripts.constants; + +public enum VisionLevelType { + VISION_LEVEL_NORMAL, + VISION_LEVEL_LITTLE_REMOTE, + VISION_LEVEL_REMOTE +}