Project 1999

Go Back   Project 1999 > Server Issues > Bugs

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2010, 08:34 PM
Aqua Aqua is offline
Scrawny Gnoll


Join Date: Oct 2009
Posts: 28
Default Possible Fix

For the previous poster...no, this existed before the group changes patch.

I haven't gone through the code enough to know all the ins and outs but I found what seems to be the appropriate area in client_packet.cpp. These two lines seems to be the good ones (depending on the server's config):

Code:
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
Code:
price=(int)((item->Price*mp->quantity)*(RuleR(Merchant, BuyCostMod))+0.5);
So I think this simplifies to something like this pseudocode:

Code:
TotalPrice = INT( price * quantity * Greediness * FactionMod + 0.5 )
Which rounds the price only after everything else. Could the solution be to do compute the single item price then multiple by the quantity like so?

Code:
TotalPrice = INT( (price * Greediness * PriceMod + 0.5)) * quantity
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:51 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.