ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/shop.c
(Generate patch)

Comparing deliantra/server/server/shop.c (file contents):
Revision 1.13 by root, Wed Jul 5 21:02:50 2006 UTC vs.
Revision 1.15 by root, Thu Jul 6 03:03:33 2006 UTC

1/* 1/*
2 * static char *rcsid_shop_c = 2 * static char *rcsid_shop_c =
3 * "$Id: shop.c,v 1.13 2006/07/05 21:02:50 root Exp $"; 3 * "$Id: shop.c,v 1.15 2006/07/06 03:03:33 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
224 224
225 /* ratio determines how much of the price modification 225 /* ratio determines how much of the price modification
226 * will come from the basic stat charisma 226 * will come from the basic stat charisma
227 * the rest will come from the level in bargaining skill 227 * the rest will come from the level in bargaining skill
228 */ 228 */
229 const double cha_ratio = 0.45; 229 const double cha_ratio = 0.40;
230 230
231 diff = no_bargain ? 1.0 : 1. - pow (lev_bargain / (double)settings.max_level, 0.25); 231 diff = no_bargain ? 1.0 : 1. - pow (lev_bargain / (double)settings.max_level, 0.25);
232 232
233 diff = (1. - cha_ratio) * diff 233 diff = (1. - cha_ratio) * diff
234 + cha_ratio * (cha_bonus[who->stats.Cha] - 1.) / (cha_bonus[who->stats.Cha] + 1.); 234 + cha_ratio * (cha_bonus[who->stats.Cha] - 1.) / (cha_bonus[who->stats.Cha] + 1.);
235 235
236 diff = .02 + (0.80. - .02) * diff; 236 diff = .02 + (.80 - .02) * diff;
237 237
238 if (flag == F_BUY) val += val * diff; 238 if (flag == F_BUY) val += val * diff;
239 else if (flag == F_SELL) val -= val * diff; 239 else if (flag == F_SELL) val -= val * diff;
240 240
241 // now find a price range. the less good we can judge, the larger the range is 241 // now find a price range. the less good we can judge, the larger the range is

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines