mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 02:25:42 +01:00
Check quest before multiplayer dispatch, fixes #1185. Bump version
This commit is contained in:
parent
588902e81c
commit
3e975a30a1
2
dist/pom.xml
vendored
2
dist/pom.xml
vendored
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.9.2</version>
|
||||
<version>3.9.3</version>
|
||||
</parent>
|
||||
<artifactId>quests-dist</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.9.2</version>
|
||||
<version>3.9.3</version>
|
||||
</parent>
|
||||
<artifactId>quests-main</artifactId>
|
||||
|
||||
|
@ -3676,13 +3676,16 @@ public class Quester {
|
||||
* @param fun The function to execute, the event call
|
||||
*/
|
||||
public void dispatchMultiplayerEverything(Quest quest, String objectiveType, Function<Quester, Void> fun) {
|
||||
if (quest == null) {
|
||||
return;
|
||||
}
|
||||
if (quest.getOptions().getShareProgressLevel() == 1) {
|
||||
List<Quester> mq = getMultiplayerQuesters(quest);
|
||||
if (mq == null) {
|
||||
return;
|
||||
}
|
||||
for (Quester q : mq) {
|
||||
if (q.getCurrentStage(quest).containsObjective(objectiveType)) {
|
||||
if (q != null && q.getCurrentStage(quest).containsObjective(objectiveType)) {
|
||||
if (this.getCurrentStage(quest).containsObjective(objectiveType)
|
||||
|| !quest.getOptions().getRequireSameQuest()) {
|
||||
fun.apply(q);
|
||||
@ -3700,10 +3703,17 @@ public class Quester {
|
||||
* @param fun The function to execute, the event call
|
||||
*/
|
||||
public void dispatchMultiplayerObjectives(Quest quest, Stage currentStage, Function<Quester, Void> fun) {
|
||||
if (quest == null) {
|
||||
return;
|
||||
}
|
||||
if (quest.getOptions().getShareProgressLevel() == 2) {
|
||||
List<Quester> mq = getMultiplayerQuesters(quest);
|
||||
if (mq == null) {
|
||||
return;
|
||||
}
|
||||
for (Quester q : mq) {
|
||||
if ((q.getCurrentQuests().containsKey(quest) && currentStage.equals(q.getCurrentStage(quest)))
|
||||
if (q != null
|
||||
&& (q.getCurrentQuests().containsKey(quest) && currentStage.equals(q.getCurrentStage(quest)))
|
||||
|| !quest.getOptions().getRequireSameQuest()) {
|
||||
fun.apply(q);
|
||||
}
|
||||
|
4
pom.xml
4
pom.xml
@ -6,12 +6,12 @@
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.9.2</version>
|
||||
<version>3.9.3</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/PikaMug/Quests/</url>
|
||||
|
||||
<properties>
|
||||
<revision>3.9.2</revision>
|
||||
<revision>3.9.3</revision>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.9.2</version>
|
||||
<version>3.9.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.9.2</version>
|
||||
<version>3.9.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.9.2</version>
|
||||
<version>3.9.3</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
Loading…
Reference in New Issue
Block a user