From 7db82a3b142dd29cde1598230e207bc3f7bcd3ab Mon Sep 17 00:00:00 2001 From: Drajor Date: Wed, 22 Feb 2017 06:26:49 +1000 Subject: [PATCH] Fixes issue with calculating the value of items being sold. The loop was starting at 0 instead of 1. --- zone/client_packet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 67e085d0d..1c5e4ebfd 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -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;