diff --git a/src/main/java/emu/grasscutter/game/quest/exec/ExecAddSceneTag.java b/src/main/java/emu/grasscutter/game/quest/exec/ExecAddSceneTag.java new file mode 100644 index 000000000..da1ad1c62 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/quest/exec/ExecAddSceneTag.java @@ -0,0 +1,19 @@ +package emu.grasscutter.game.quest.exec; + +import emu.grasscutter.data.excels.quest.QuestData; +import emu.grasscutter.game.quest.*; +import emu.grasscutter.game.quest.enums.QuestExec; +import emu.grasscutter.game.quest.handlers.QuestExecHandler; +import java.util.Arrays; + +@QuestValueExec(QuestExec.QUEST_EXEC_ADD_SCENE_TAG) +public final class ExecAddSceneTag extends QuestExecHandler { + @Override + public boolean execute(GameQuest quest, QuestData.QuestExecParam condition, String... paramStr) { + var param = + Arrays.stream(paramStr).filter(i -> !i.isBlank()).mapToInt(Integer::parseInt).toArray(); + quest.getOwner().getProgressManager().addSceneTag(param[0], param[1]); + + return true; + } +} diff --git a/src/main/java/emu/grasscutter/game/quest/exec/ExecDelSceneTag.java b/src/main/java/emu/grasscutter/game/quest/exec/ExecDelSceneTag.java new file mode 100644 index 000000000..e15013144 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/quest/exec/ExecDelSceneTag.java @@ -0,0 +1,19 @@ +package emu.grasscutter.game.quest.exec; + +import emu.grasscutter.data.excels.quest.QuestData; +import emu.grasscutter.game.quest.*; +import emu.grasscutter.game.quest.enums.QuestExec; +import emu.grasscutter.game.quest.handlers.QuestExecHandler; +import java.util.Arrays; + +@QuestValueExec(QuestExec.QUEST_EXEC_DEL_SCENE_TAG) +public final class ExecDelSceneTag extends QuestExecHandler { + @Override + public boolean execute(GameQuest quest, QuestData.QuestExecParam condition, String... paramStr) { + var param = + Arrays.stream(paramStr).filter(i -> !i.isBlank()).mapToInt(Integer::parseInt).toArray(); + quest.getOwner().getProgressManager().delSceneTag(param[0], param[1]); + + return true; + } +}