Merge remote-tracking branch 'origin/unstable' into unstable

This commit is contained in:
KingRainbow44 2023-05-30 00:58:53 -04:00
commit 2b13ea2a82
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
3 changed files with 25 additions and 0 deletions

View File

@ -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");

View File

@ -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",

View File

@ -0,0 +1,7 @@
package emu.grasscutter.scripts.constants;
public enum VisionLevelType {
VISION_LEVEL_NORMAL,
VISION_LEVEL_LITTLE_REMOTE,
VISION_LEVEL_REMOTE
}