Added current quest info to the party menu.

This commit is contained in:
Luis C.M committed 2024-02-18 01:30:34 -06:00
1 parent e46b78ff71
commit 1044269f5e
3 files changed
+137 -29

No files matched your search

@@ -260,7 +260,20 @@ public class PacketHandlerServer{
if (playerData.partyUUID != null) {
Party party = PartyController.Instance().getParty(playerData.partyUUID);
Server.sendData(player, EnumPacketClient.GUI_DATA, party.writeToNBT());
NBTTagCompound compound = party.writeToNBT();
if (party.getQuest() != null) {
Quest quest = (Quest) party.getQuest();
Vector<String> vector = quest.questInterface.getQuestLogStatus(player);
NBTTagList list = new NBTTagList();
for (String s : vector) {
list.appendTag(new NBTTagString(s));
}
compound.setTag("QuestProgress", list);
if(quest.completion == EnumQuestCompletion.Npc && quest.questInterface.isCompleted(playerData)) {
compound.setString("QuestCompleteWith", quest.completerNpc);
}
}
Server.sendData(player, EnumPacketClient.GUI_DATA, compound);
} else {
sendInviteData(player);
}