Fixes issue with calculating the value of items being sold. The loop was starting at 0 instead of 1.

This commit is contained in:
Drajor 2017-02-22 06:26:49 +10:00
parent 056725b9bd
commit 7db82a3b14

View File

@ -12447,7 +12447,7 @@ void Client::Handle_OP_ShopPlayerSell(const EQApplicationPacket *app)
uint32 i;
if (RuleB(Merchant, UsePriceMod)) {
for (i = 0; i < cost_quantity; i++) {
for (i = 1; i <= cost_quantity; i++) {
price = (uint32)((item->Price * i)*(RuleR(Merchant, BuyCostMod))*Client::CalcPriceMod(vendor, true) + 0.5); // need to round up, because client does it automatically when displaying price
if (price > 4000000000) {
cost_quantity = i;
@ -12457,7 +12457,7 @@ void Client::Handle_OP_ShopPlayerSell(const EQApplicationPacket *app)
}
}
else {
for (i = 0; i < cost_quantity; i++) {
for (i = 1; i <= cost_quantity; i++) {
price = (uint32)((item->Price * i)*(RuleR(Merchant, BuyCostMod)) + 0.5); // need to round up, because client does it automatically when displaying price
if (price > 4000000000) {
cost_quantity = i;