mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 07:05:51 +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)) {
|
||||
if (quest.getOptions().getRequireSameQuest() && this.containsObjective(quest, objectiveType)) {
|
||||
fun.apply(q);
|
||||
} else if (!quest.getOptions().getRequireSameQuest()) {
|
||||
fun.apply(q);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -729,13 +729,10 @@ 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;
|
||||
@ -743,7 +740,6 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerDeath(PlayerDeathEvent evt) {
|
||||
|
Loading…
Reference in New Issue
Block a user