Handle quest execute which sets the player's flying state

This commit is contained in:
KingRainbow44 2023-04-13 17:59:42 -04:00
parent 64eb6ee325
commit 47cdfe5c14
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
2 changed files with 19 additions and 1 deletions

View File

@ -15,7 +15,7 @@ public enum QuestExec implements QuestTrigger {
QUEST_EXEC_LOCK_FORCE(5), // missing, currently unused
QUEST_EXEC_CHANGE_AVATAR_ELEMET(6),
QUEST_EXEC_REFRESH_GROUP_MONSTER(7),
QUEST_EXEC_SET_IS_FLYABLE(8), // missing, maybe gives glider
QUEST_EXEC_SET_IS_FLYABLE(8),
QUEST_EXEC_SET_IS_WEATHER_LOCKED(9), // missing
QUEST_EXEC_SET_IS_GAME_TIME_LOCKED(10), // missing
QUEST_EXEC_SET_IS_TRANSFERABLE(11), // missing, currently unused

View File

@ -0,0 +1,18 @@
package emu.grasscutter.game.quest.exec;
import emu.grasscutter.data.excels.QuestData;
import emu.grasscutter.game.props.PlayerProperty;
import emu.grasscutter.game.quest.GameQuest;
import emu.grasscutter.game.quest.QuestValueExec;
import emu.grasscutter.game.quest.enums.QuestExec;
import emu.grasscutter.game.quest.handlers.QuestExecHandler;
@QuestValueExec(QuestExec.QUEST_EXEC_SET_IS_FLYABLE)
public final class ExecSetFlyable extends QuestExecHandler {
@Override
public boolean execute(GameQuest quest, QuestData.QuestExecParam condition, String... paramStr) {
var canFly = Integer.parseInt(paramStr[0]);
quest.getOwner().setProperty(PlayerProperty.PROP_IS_FLYABLE, canFly);
return true;
}
}