mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 02:34:10 +00:00
A shared party dialog objective is always complete
QuestDialog.isPartyCompleted's shared branch builds readValues by recording only true: a dialog nobody has read is never put in the map at all. The check underneath returns false only on finding a false, so it never can, and an empty map returns true besides. The result is that a party on a shared dialog objective has finished it before anyone speaks to anybody, and a quest waiting on that objective can be handed in immediately. Every required dialog now starts unread, which is the line that was missing. The loop below it was already right and had nothing to find. Only the shared mode is affected. All and Leader iterate the dialogs directly and return false on the first unread one.
This commit is contained in:
1 parent
d6d6111803
commit
30f65ca6e0
1 file changed
+6
@@ -264,6 +264,12 @@ public class QuestDialog extends QuestInterface implements IQuestDialog {
|
||||
return true;
|
||||
} else {
|
||||
HashMap<Integer, Boolean> readValues = new HashMap<>();
|
||||
// Every required dialog starts unread. Without this the map only ever receives true,
|
||||
// so the check below cannot find a false and a shared objective is always complete --
|
||||
// including for a party that has read nothing at all.
|
||||
for (int dialogId : dialogs.values()) {
|
||||
readValues.put(dialogId, false);
|
||||
}
|
||||
for (UUID uuid : party.getPlayerUUIDs()) {
|
||||
EntityPlayer player = NoppesUtilServer.getPlayer(uuid);
|
||||
PlayerData playerData;
|
||||
|
||||
Reference in new issue
Block a user