diff --git a/libs/MyPet-3.5.jar b/libs/MyPet-3.7.jar
similarity index 89%
rename from libs/MyPet-3.5.jar
rename to libs/MyPet-3.7.jar
index 3fe8e5cc..141166ae 100644
Binary files a/libs/MyPet-3.5.jar and b/libs/MyPet-3.7.jar differ
diff --git a/pom.xml b/pom.xml
index 6c4f6035..1033d2a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,9 +23,9 @@
de.Keyle.MyPet
MyPet
- 3.5
+ 3.7
system
- ${basedir}/libs/MyPet-3.5.jar
+ ${basedir}/libs/MyPet-3.7.jar
diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/quests.java b/src/main/java/com/gamingmesh/jobs/commands/list/quests.java
index b724b2dc..0fba181a 100644
--- a/src/main/java/com/gamingmesh/jobs/commands/list/quests.java
+++ b/src/main/java/com/gamingmesh/jobs/commands/list/quests.java
@@ -67,8 +67,7 @@ public class quests implements Cmd {
List hoverMsgs = Jobs.getLanguage().getMessageList("command.quests.output.hover");
List hoverList = new ArrayList<>();
- for (int i = 0; i < hoverMsgs.size(); i++) {
- String current = hoverMsgs.get(i);
+ for (String current : hoverMsgs) {
current = current.replace("[jobName]", jobProg.getJob().getName());
current = current.replace("[time]", TimeManage.to24hourShort(q.getValidUntil() - System.currentTimeMillis()));
if (current.contains("[desc]")) {
@@ -77,7 +76,6 @@ public class quests implements Cmd {
}
} else
hoverList.add(current);
-
}
for (Entry oneObjective : q.getQuest().getObjectives().entrySet()) {
diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/resetquest.java b/src/main/java/com/gamingmesh/jobs/commands/list/resetquest.java
index 5da5ddcd..20b4161c 100644
--- a/src/main/java/com/gamingmesh/jobs/commands/list/resetquest.java
+++ b/src/main/java/com/gamingmesh/jobs/commands/list/resetquest.java
@@ -10,6 +10,7 @@ import com.gamingmesh.jobs.commands.Cmd;
import com.gamingmesh.jobs.commands.JobCommand;
import com.gamingmesh.jobs.container.Job;
import com.gamingmesh.jobs.container.JobsPlayer;
+import com.gamingmesh.jobs.container.QuestObjective;
import com.gamingmesh.jobs.container.QuestProgression;
public class resetquest implements Cmd {
@@ -54,8 +55,14 @@ public class resetquest implements Cmd {
for (QuestProgression one : quests) {
one.setValidUntil(System.currentTimeMillis());
+ for (java.util.Map.Entry obj : one.getQuest().getObjectives().entrySet()) {
+ one.setAmountDone(obj.getValue(), 0);
+ }
}
+ jPlayer.setDoneQuests(0);
+ jPlayer.getQuestProgressions(job).clear();
+
sender.sendMessage(Jobs.getLanguage().getMessage("command.resetquest.output.reseted", "%playername%", jPlayer.getUserName()));
return true;
diff --git a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java
index 7a572c96..7087b17c 100644
--- a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java
+++ b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java
@@ -860,13 +860,29 @@ public class JobsPlayer {
return ls;
}
+ public void resetQuests(Job job) {
+ for (QuestProgression oneQ : getQuestProgressions(job)) {
+ oneQ.setValidUntil(0l);
+ for (java.util.Map.Entry obj : oneQ.getQuest().getObjectives().entrySet()) {
+ oneQ.setAmountDone(obj.getValue(), 0);
+ }
+ setDoneQuests(0);
+ getQuestProgressions(job).clear();
+ }
+ }
+
public void resetQuests() {
for (JobProgression one : getJobProgression()) {
for (QuestProgression oneQ : getQuestProgressions(one.getJob())) {
+ for (java.util.Map.Entry obj : oneQ.getQuest().getObjectives().entrySet()) {
+ oneQ.setAmountDone(obj.getValue(), 0);
+ }
oneQ.setValidUntil(0L);
}
+
+ setDoneQuests(0);
+ getQuestProgressions(one.getJob()).clear();
}
- getQuestProgressions();
}
public List getQuestProgressions() {