Made tracked quest a private field, clearer intent in code for bug fixing.

This commit is contained in:
Luis C.M committed 2023-05-11 20:17:16 -05:00
1 parent f5bae9099d
commit e0360f9a6e
6 files changed
+69 -67

No files matched your search

@@ -25,7 +25,7 @@ import java.util.List;
public class PlayerQuestData implements IPlayerQuestData {
private final PlayerData parent;
public IQuest trackedQuest = null;
private IQuest trackedQuest = null;
public HashMap<Integer,QuestData> activeQuests = new HashMap<Integer,QuestData>();
public HashMap<Integer,Long> finishedQuests = new HashMap<Integer,Long>();
@@ -145,8 +145,20 @@ public class PlayerQuestData implements IPlayerQuestData {
}
public void trackQuest(IQuest quest) {
if (quest.getId() != this.trackedQuest.getId()) {
this.trackedQuest = quest;
NoppesUtilPlayer.sendTrackedQuestData((EntityPlayerMP) this.parent.player, (Quest) this.trackedQuest);
}
}
public void untrackQuest() {
this.trackedQuest = null;
Server.sendData((EntityPlayerMP) this.parent.player, EnumPacketClient.OVERLAY_QUEST_TRACKING);
}
public IQuest getTrackedQuest() {
return trackedQuest;
return this.trackedQuest;
}
public void startQuest(int id) {