Fix logic issue in Other challenges.
This will fix issue when users could not complete other type challenges. There was logic error, that disallows negative number in required money and experience variables.
This commit is contained in:
parent
8becd9c08b
commit
12fa0e2c86
|
@ -765,14 +765,14 @@ public class TryToComplete
|
|||
private ChallengeResult checkOthers()
|
||||
{
|
||||
if (!this.addon.isEconomyProvided() ||
|
||||
this.challenge.getRequiredMoney() <= 0 ||
|
||||
this.challenge.getRequiredMoney() < 0 ||
|
||||
!this.addon.getEconomyProvider().has(this.user, this.challenge.getRequiredMoney()))
|
||||
{
|
||||
this.user.sendMessage("challenges.not-enough-money",
|
||||
"[money]",
|
||||
Integer.toString(this.challenge.getRequiredMoney()));
|
||||
}
|
||||
else if (this.challenge.getRequiredExperience() <= 0 ||
|
||||
else if (this.challenge.getRequiredExperience() < 0 ||
|
||||
this.user.getPlayer().getTotalExperience() < this.challenge.getRequiredExperience())
|
||||
{
|
||||
this.user.sendMessage("challenges.not-enough-exp",
|
||||
|
|
Loading…
Reference in New Issue