mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-07 00:38:42 +01:00
Fix different logic behavior for fast payment
This commit is contained in:
parent
22d985f0b4
commit
21673860c7
@ -845,8 +845,7 @@ public class PlayerManager {
|
|||||||
|
|
||||||
ItemBonusCache c = cj.get(prog);
|
ItemBonusCache c = cj.get(prog);
|
||||||
if (c == null) {
|
if (c == null) {
|
||||||
c = new ItemBonusCache();
|
c = new ItemBonusCache(getInventoryBoost(player, prog));
|
||||||
c.setBoostMultiplier(getInventoryBoost(player, prog));
|
|
||||||
cj.put(prog, c);
|
cj.put(prog, c);
|
||||||
return c.getBoostMultiplier();
|
return c.getBoostMultiplier();
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,11 @@ public class ItemBonusCache {
|
|||||||
|
|
||||||
private BoostMultiplier bm = new BoostMultiplier();
|
private BoostMultiplier bm = new BoostMultiplier();
|
||||||
|
|
||||||
|
public ItemBonusCache(BoostMultiplier bm) {
|
||||||
|
this.bm = bm;
|
||||||
|
}
|
||||||
|
|
||||||
public BoostMultiplier getBoostMultiplier() {
|
public BoostMultiplier getBoostMultiplier() {
|
||||||
return bm;
|
return bm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBoostMultiplier(BoostMultiplier bm) {
|
|
||||||
this.bm = bm;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -122,13 +122,7 @@ public class QuestProgression {
|
|||||||
|
|
||||||
jPlayer.setSaved(false);
|
jPlayer.setSaved(false);
|
||||||
|
|
||||||
if (!isCompleted())
|
if (!isCompleted() || !jPlayer.isOnline() || givenReward)
|
||||||
return;
|
|
||||||
|
|
||||||
if (!jPlayer.isOnline())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (givenReward)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
givenReward = true;
|
givenReward = true;
|
||||||
|
@ -384,8 +384,8 @@ public class JobsPaymentListener implements Listener {
|
|||||||
|
|
||||||
FastPayment fp = Jobs.FASTPAYMENT.get(player.getUniqueId());
|
FastPayment fp = Jobs.FASTPAYMENT.get(player.getUniqueId());
|
||||||
if (fp != null) {
|
if (fp != null) {
|
||||||
if (fp.getTime() > System.currentTimeMillis() && fp.getInfo().getName().equalsIgnoreCase(bInfo.getName()) ||
|
if (fp.getTime() > System.currentTimeMillis() && (fp.getInfo().getName().equalsIgnoreCase(bInfo.getName()) ||
|
||||||
fp.getInfo().getNameWithSub().equalsIgnoreCase(bInfo.getNameWithSub())) {
|
fp.getInfo().getNameWithSub().equalsIgnoreCase(bInfo.getNameWithSub()))) {
|
||||||
Jobs.perform(fp.getPlayer(), fp.getInfo(), fp.getPayment(), fp.getJob());
|
Jobs.perform(fp.getPlayer(), fp.getInfo(), fp.getPayment(), fp.getJob());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user