Continue with merchant tax changes.

This commit is contained in:
MobiusDev
2017-08-19 14:37:32 +00:00
parent 0c183135c2
commit eacee48ca7
10 changed files with 50 additions and 56 deletions

View File

@@ -176,12 +176,11 @@ public final class RequestSellItem implements IClientIncomingPacket
player.addAdena("Sell", totalPrice, merchant, false);
// add to castle treasury
// add to castle treasury?
if (merchant != null)
{
final long taxCollection = (long) (totalPrice * (1.0 - merchant.getTotalTaxRate(TaxType.SELL)));
merchant.getCastle().addToTreasury(taxCollection);
totalPrice -= taxCollection;
}
// Update current load as well