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