mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-09 03:22:52 +08:00
Created Add/Del SceneTag exec for quests
Added 2 missing classes for adding and deleting sceneTags in quests
This commit is contained in:
parent
4022267888
commit
6ff8ec43e5
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user