Quote:
Originally Posted by lerxst2112
Code:
if (RuleB(Merchant, UsePriceMod)){
price=(int)((item->Price*mp->quantity)*(RuleR(Merchant, BuyCostMod))*Client::CalcPriceMod(vendor,true)+0.5); // need to round up, because client does it automatically when displaying price
}
else
price=(int)((item->Price*mp->quantity)*(RuleR(Merchant, BuyCostMod))+0.5);
AddMoneyToPP(price,false);
At a quick glance, this math looks ok to me. Probably worth setting the EventLog:RecordSellToMerchant rule to true to see what is actually being calculated. With some concrete example items it should be easy enough to see if there's an issue with specific values.
|
Here's the log of above the transactions:
