mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 22:03:03 +08:00
Handle quest execute which sets the player's flying state
This commit is contained in:
parent
64eb6ee325
commit
47cdfe5c14
@ -15,7 +15,7 @@ public enum QuestExec implements QuestTrigger {
|
|||||||
QUEST_EXEC_LOCK_FORCE(5), // missing, currently unused
|
QUEST_EXEC_LOCK_FORCE(5), // missing, currently unused
|
||||||
QUEST_EXEC_CHANGE_AVATAR_ELEMET(6),
|
QUEST_EXEC_CHANGE_AVATAR_ELEMET(6),
|
||||||
QUEST_EXEC_REFRESH_GROUP_MONSTER(7),
|
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_WEATHER_LOCKED(9), // missing
|
||||||
QUEST_EXEC_SET_IS_GAME_TIME_LOCKED(10), // missing
|
QUEST_EXEC_SET_IS_GAME_TIME_LOCKED(10), // missing
|
||||||
QUEST_EXEC_SET_IS_TRANSFERABLE(11), // missing, currently unused
|
QUEST_EXEC_SET_IS_TRANSFERABLE(11), // missing, currently unused
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user