mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 18:05:10 +00:00
Made tracked quest a private field, clearer intent in code for bug fixing.
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user