1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 04:25:15 +01:00

Lets check daily quest even if player will not get paid for it.

This commit is contained in:
Zrips 2018-08-06 16:43:20 +03:00
parent 3603cc178b
commit ffa0ad5522

View File

@ -875,9 +875,14 @@ public class Jobs extends JavaPlugin {
this.setEnabled(false); this.setEnabled(false);
} }
@Deprecated
private static void checkDailyQuests(JobsPlayer jPlayer, JobProgression prog, ActionInfo info) { private static void checkDailyQuests(JobsPlayer jPlayer, JobProgression prog, ActionInfo info) {
if (!prog.getJob().getQuests().isEmpty()) { checkDailyQuests(jPlayer, prog.getJob(), info);
List<QuestProgression> q = jPlayer.getQuestProgressions(prog.getJob(), info.getType()); }
private static void checkDailyQuests(JobsPlayer jPlayer, Job job, ActionInfo info) {
if (!job.getQuests().isEmpty()) {
List<QuestProgression> q = jPlayer.getQuestProgressions(job, info.getType());
for (QuestProgression one : q) { for (QuestProgression one : q) {
if (one != null) { if (one != null) {
one.processQuest(jPlayer, info); one.processQuest(jPlayer, info);
@ -929,6 +934,8 @@ public class Jobs extends JavaPlugin {
return; return;
JobInfo jobinfo = noneJob.getJobInfo(info, 1); JobInfo jobinfo = noneJob.getJobInfo(info, 1);
checkDailyQuests(jPlayer, noneJob, info);
if (jobinfo == null) if (jobinfo == null)
return; return;
@ -998,11 +1005,11 @@ public class Jobs extends JavaPlugin {
int level = prog.getLevel(); int level = prog.getLevel();
JobInfo jobinfo = prog.getJob().getJobInfo(info, level); JobInfo jobinfo = prog.getJob().getJobInfo(info, level);
checkDailyQuests(jPlayer, prog.getJob(), info);
if (jobinfo == null) if (jobinfo == null)
continue; continue;
checkDailyQuests(jPlayer, prog, info);
Double income = jobinfo.getIncome(level, numjobs); Double income = jobinfo.getIncome(level, numjobs);
Double pointAmount = jobinfo.getPoints(level, numjobs); Double pointAmount = jobinfo.getPoints(level, numjobs);
Double expAmount = jobinfo.getExperience(level, numjobs); Double expAmount = jobinfo.getExperience(level, numjobs);