mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-03-28 02:23:31 +01:00
Handle Unlocking of Waypoints and Statues (#1608)
Original commits: * Add necessary protos for scene point/area unlocking. * Rename PlayerOpenStateManager to PlayerProgressManager and move data to Player. * Handle unlocking of waypoints. * Add primo rewards for waypoint unlock. * Statue unlocking. * Add statue quest on player login. * I forgor to add an unlock command. * Give EXP as reward, fire quest trigger, make EXP UI show up.
This commit is contained in:
@@ -13,9 +13,15 @@ public class ContentCompleteTalk extends QuestBaseHandler {
|
||||
|
||||
@Override
|
||||
public boolean execute(GameQuest quest, QuestCondition condition, String paramStr, int... params) {
|
||||
GameMainQuest checkMainQuest = quest.getOwner().getQuestManager().getMainQuestById(params[0]/100);
|
||||
if (checkMainQuest == null) {return false;}
|
||||
MainQuestData.TalkData talkData = checkMainQuest.getTalks().get(Integer.valueOf(params[0]));
|
||||
return talkData == null || condition.getParamStr().contains(paramStr) || checkMainQuest.getChildQuestById(params[0]) != null;
|
||||
GameMainQuest checkMainQuest = quest.getOwner().getQuestManager().getMainQuestById(params[0] / 100);
|
||||
if (checkMainQuest == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MainQuestData.TalkData talkData = checkMainQuest.getTalks().get(condition.getParam()[0]);
|
||||
return talkData != null;
|
||||
|
||||
// This expression makes zero sense.
|
||||
// return talkData == null || condition.getParamStr().contains(paramStr) || checkMainQuest.getChildQuestById(params[0]) != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user