View Single Post
  #11  
Old 10-13-2012, 06:42 PM
Traul
Hill Giant
 
Join Date: Jun 2005
Posts: 105
Default

Quote:
Originally Posted by lerxst2112 View Post
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:

Reply With Quote