mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Lets check daily quest even if player will not get paid for it.
This commit is contained in:
parent
3603cc178b
commit
ffa0ad5522
@ -137,7 +137,7 @@ public class Jobs extends JavaPlugin {
|
||||
|
||||
private static ConfigManager configManager;
|
||||
private static GeneralConfigManager GconfigManager;
|
||||
|
||||
|
||||
private static Reflections reflections;
|
||||
|
||||
private static Logger pLogger;
|
||||
@ -248,7 +248,7 @@ public class Jobs extends JavaPlugin {
|
||||
reflections = new Reflections(instance);
|
||||
return reflections;
|
||||
}
|
||||
|
||||
|
||||
public static JobsManager getDBManager() {
|
||||
if (DBManager == null)
|
||||
DBManager = new JobsManager(instance);
|
||||
@ -754,7 +754,7 @@ public class Jobs extends JavaPlugin {
|
||||
this.setEnabled(true);
|
||||
|
||||
versionCheckManager = new VersionChecker(this);
|
||||
|
||||
|
||||
ItemManager.load();
|
||||
|
||||
version = versionCheckManager.getVersion().getShortVersion();
|
||||
@ -875,9 +875,14 @@ public class Jobs extends JavaPlugin {
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static void checkDailyQuests(JobsPlayer jPlayer, JobProgression prog, ActionInfo info) {
|
||||
if (!prog.getJob().getQuests().isEmpty()) {
|
||||
List<QuestProgression> q = jPlayer.getQuestProgressions(prog.getJob(), info.getType());
|
||||
checkDailyQuests(jPlayer, prog.getJob(), info);
|
||||
}
|
||||
|
||||
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) {
|
||||
if (one != null) {
|
||||
one.processQuest(jPlayer, info);
|
||||
@ -929,6 +934,8 @@ public class Jobs extends JavaPlugin {
|
||||
return;
|
||||
JobInfo jobinfo = noneJob.getJobInfo(info, 1);
|
||||
|
||||
checkDailyQuests(jPlayer, noneJob, info);
|
||||
|
||||
if (jobinfo == null)
|
||||
return;
|
||||
|
||||
@ -998,11 +1005,11 @@ public class Jobs extends JavaPlugin {
|
||||
int level = prog.getLevel();
|
||||
JobInfo jobinfo = prog.getJob().getJobInfo(info, level);
|
||||
|
||||
checkDailyQuests(jPlayer, prog.getJob(), info);
|
||||
|
||||
if (jobinfo == null)
|
||||
continue;
|
||||
|
||||
checkDailyQuests(jPlayer, prog, info);
|
||||
|
||||
Double income = jobinfo.getIncome(level, numjobs);
|
||||
Double pointAmount = jobinfo.getPoints(level, numjobs);
|
||||
Double expAmount = jobinfo.getExperience(level, numjobs);
|
||||
|
Loading…
Reference in New Issue
Block a user