mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-24 11:38:42 +01:00
Support both types of progress sharing w/o overriding quest option
This commit is contained in:
parent
c268dca82f
commit
17ac3b9430
@ -3282,9 +3282,12 @@ public class Quester {
|
||||
List<Quester> mq = getMultiplayerQuesters(quest);
|
||||
for (Quester q : mq) {
|
||||
if (q.containsObjective(quest, objectiveType)) {
|
||||
fun.apply(q);
|
||||
if (quest.getOptions().getRequireSameQuest() && this.containsObjective(quest, objectiveType)) {
|
||||
fun.apply(q);
|
||||
} else if (!quest.getOptions().getRequireSameQuest()) {
|
||||
fun.apply(q);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -729,18 +729,14 @@ public class PlayerListener implements Listener {
|
||||
Quester quester = plugin.getQuester(damager.getUniqueId());
|
||||
LinkedList<Quest> allQuests = plugin.getQuests();
|
||||
for (Quest quest : allQuests) {
|
||||
boolean multiplayer = !quest.getOptions().getRequireSameQuest();
|
||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "killMob")) {
|
||||
quester.killMob(quest, target.getLocation(), target.getType());
|
||||
multiplayer = true;
|
||||
}
|
||||
|
||||
if (multiplayer) {
|
||||
quester.dispatchMultiplayerEverything(quest, "killMob", (Quester q) -> {
|
||||
q.killMob(quest, target.getLocation(), target.getType());
|
||||
return null;
|
||||
});
|
||||
}
|
||||
quester.dispatchMultiplayerEverything(quest, "killMob", (Quester q) -> {
|
||||
q.killMob(quest, target.getLocation(), target.getType());
|
||||
return null;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user