mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 04:35:03 +00:00
Only partyable quests can be set as party quests.
This commit is contained in:
1 parent
2b292d01f5
commit
5e5e212c9a
4 files changed
+47
-16
No files matched your search
@@ -9,6 +9,7 @@ import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.controllers.data.Quest;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Vector;
|
||||
|
||||
public class QuestLogData {
|
||||
@@ -16,10 +17,11 @@ public class QuestLogData {
|
||||
public HashMap<String,Vector<String>> categories = new HashMap<String,Vector<String>>();
|
||||
public String selectedQuest = "";
|
||||
public String selectedCategory = "";
|
||||
public HashMap<String,String> questText = new HashMap<String,String>();
|
||||
public HashMap<String,String> questText = new HashMap<>();
|
||||
public HashMap<String,String> questAlerts = new HashMap<>();
|
||||
public HashMap<String,Vector<String>> questStatus = new HashMap<String,Vector<String>>();
|
||||
public HashMap<String,String> finish = new HashMap<String,String>();
|
||||
public HashMap<String,Vector<String>> questStatus = new HashMap<>();
|
||||
public HashMap<String,String> finish = new HashMap<>();
|
||||
public HashSet<String> partyAbleQuests = new HashSet<>();
|
||||
|
||||
public NBTTagCompound writeNBT(){
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
@@ -29,6 +31,7 @@ public class QuestLogData {
|
||||
compound.setTag("Status", NBTTags.nbtVectorMap(questStatus));
|
||||
compound.setTag("QuestFinisher", NBTTags.nbtStringStringMap(finish));
|
||||
compound.setString("TrackedQuestID", trackedQuestKey);
|
||||
compound.setTag("PartyQuests", NBTTags.nbtStringSet(partyAbleQuests));
|
||||
return compound;
|
||||
}
|
||||
|
||||
@@ -39,6 +42,7 @@ public class QuestLogData {
|
||||
questStatus = NBTTags.getVectorMap(compound.getTagList("Status", 10));
|
||||
finish = NBTTags.getStringStringMap(compound.getTagList("QuestFinisher", 10));
|
||||
trackedQuestKey = compound.getString("TrackedQuestID");
|
||||
partyAbleQuests = NBTTags.getStringSet(compound.getTagList("PartyQuests", 10));
|
||||
}
|
||||
public void setData(EntityPlayer player){
|
||||
PlayerData playerData = PlayerDataController.Instance.getPlayerData(player);
|
||||
@@ -62,6 +66,10 @@ public class QuestLogData {
|
||||
trackedQuestKey = category + ":" + quest.title;
|
||||
}
|
||||
}
|
||||
|
||||
if (quest.allowParty) {
|
||||
partyAbleQuests.add(category + ":" + quest.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user