Revert change made to ContentCompleteTalk

This commit is contained in:
KingRainbow44 2023-05-03 23:41:15 -04:00
parent f85a7cbe59
commit dae2ad394c
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -10,11 +10,16 @@ import lombok.val;
@QuestValueContent(QUEST_CONTENT_COMPLETE_TALK)
public class ContentCompleteTalk extends BaseContent {
@Override
public boolean execute(
GameQuest quest, QuestData.QuestContentCondition condition, String paramStr, int... params) {
return condition.getParam()[0] == params[0] &&
GameData.getTalkConfigDataMap().get(condition.getParam()[0]) != null;
val talkId = condition.getParam()[0];
val checkMainQuest = quest.getOwner().getQuestManager().getMainQuestByTalkId(talkId);
if (checkMainQuest == null) {
return false;
}
val talkData = checkMainQuest.getTalks().get(talkId);
return talkData != null;
}
}