Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Fix issues in TNEAccount methods not checking currency parameter for …
Browse files Browse the repository at this point in the history
…hasHoldings.
  • Loading branch information
creatorfromhell committed Aug 2, 2020
1 parent e811fc8 commit f98dbe4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TNE/src/net/tnemc/core/common/account/TNEAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ public EconomyResponse removeHoldings(BigDecimal amount) {
@Override
public EconomyResponse removeHoldings(BigDecimal amount, String world) {
if(amount.equals(BigDecimal.ZERO)) return GeneralResponse.SUCCESS;
if(hasHoldings(amount)) {
if(hasHoldings(amount, world)) {
Currency currency = TNE.manager().currencyManager().get(world);
removeHoldings(amount, world, currency.name(), false);
return GeneralResponse.SUCCESS;
Expand All @@ -473,7 +473,7 @@ public EconomyResponse removeHoldings(BigDecimal amount, String world) {
@Override
public EconomyResponse removeHoldings(BigDecimal amount, Currency currency) {
if(amount.equals(BigDecimal.ZERO)) return GeneralResponse.SUCCESS;
if(hasHoldings(amount)) {
if(hasHoldings(amount, currency)) {
String world = TNE.instance().defaultWorld;
removeHoldings(amount, world, currency.name(), false);
return GeneralResponse.SUCCESS;
Expand All @@ -484,7 +484,7 @@ public EconomyResponse removeHoldings(BigDecimal amount, Currency currency) {
@Override
public EconomyResponse removeHoldings(BigDecimal amount, Currency currency, String world) {
if(amount.equals(BigDecimal.ZERO)) return GeneralResponse.SUCCESS;
if(hasHoldings(amount)) {
if(hasHoldings(amount, currency, world)) {
removeHoldings(amount, world, currency.name(), false);
return GeneralResponse.SUCCESS;
}
Expand Down

0 comments on commit f98dbe4

Please sign in to comment.