mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 07:37:43 +00:00
Fix ContentNotFinishPlot
This commit is contained in:
parent
31cef88ef7
commit
762e7ae301
@ -1,21 +1,17 @@
|
||||
package emu.grasscutter.game.quest.content;
|
||||
|
||||
import emu.grasscutter.data.excels.quest.QuestData;
|
||||
import emu.grasscutter.game.quest.*;
|
||||
|
||||
import static emu.grasscutter.game.quest.enums.QuestContent.QUEST_CONTENT_FINISH_PLOT;
|
||||
|
||||
import emu.grasscutter.data.binout.MainQuestData;
|
||||
import emu.grasscutter.data.excels.quest.QuestData;
|
||||
import emu.grasscutter.game.quest.GameQuest;
|
||||
import emu.grasscutter.game.quest.QuestValueContent;
|
||||
|
||||
@QuestValueContent(QUEST_CONTENT_FINISH_PLOT)
|
||||
public class ContentFinishPlot extends BaseContent {
|
||||
|
||||
@Override
|
||||
public boolean execute(
|
||||
GameQuest quest, QuestData.QuestContentCondition condition, String paramStr, int... params) {
|
||||
MainQuestData.TalkData talkData =
|
||||
quest.getMainQuest().getTalks().get(Integer.valueOf(params[0]));
|
||||
GameQuest subQuest = quest.getMainQuest().getChildQuestById(params[0]);
|
||||
var talkData = quest.getMainQuest().getTalks().get(params[0]);
|
||||
var subQuest = quest.getMainQuest().getChildQuestById(params[0]);
|
||||
return (talkData != null && subQuest != null || condition.getParamStr().equals(paramStr))
|
||||
&& condition.getParam()[0] == params[0];
|
||||
}
|
||||
|
@ -1,24 +1,18 @@
|
||||
package emu.grasscutter.game.quest.content;
|
||||
|
||||
import emu.grasscutter.data.excels.quest.QuestData;
|
||||
import emu.grasscutter.game.quest.*;
|
||||
|
||||
import static emu.grasscutter.game.quest.enums.QuestContent.QUEST_CONTENT_NOT_FINISH_PLOT;
|
||||
|
||||
import emu.grasscutter.data.excels.quest.QuestData;
|
||||
import emu.grasscutter.game.quest.GameQuest;
|
||||
import emu.grasscutter.game.quest.QuestValueContent;
|
||||
import lombok.val;
|
||||
|
||||
@QuestValueContent(QUEST_CONTENT_NOT_FINISH_PLOT)
|
||||
public class ContentNotFinishPlot extends BaseContent {
|
||||
|
||||
@Override
|
||||
public boolean execute(
|
||||
GameQuest quest, QuestData.QuestContentCondition condition, String paramStr, int... params) {
|
||||
val talkId = condition.getParam()[0];
|
||||
val checkMainQuest = quest.getOwner().getQuestManager().getMainQuestByTalkId(talkId);
|
||||
if (checkMainQuest == null) {
|
||||
return true;
|
||||
}
|
||||
val talkData = checkMainQuest.getTalks().get(talkId);
|
||||
return talkData == null;
|
||||
var talkData = quest.getMainQuest().getTalks().get(params[0]);
|
||||
var subQuest = quest.getMainQuest().getChildQuestById(params[0]);
|
||||
return (talkData == null && subQuest != null || condition.getParamStr().equals(paramStr))
|
||||
&& condition.getParam()[0] == params[0];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user