Difference for server/shop.c from version 1.52 to 1.53


version 1.52 version 1.53
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_shop_c =   * static char *rcsid_shop_c =
  *   "$Id: shop.c,v 1.52 2006/02/10 23:59:28 akirschbaum Exp $";   *   "$Id: shop.c,v 1.53 2006/03/07 21:28:38 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 184
 
Line 184
     if (flag==F_TRUE || flag==F_SELL)      if (flag==F_TRUE || flag==F_SELL)
  val=value_limit(val, number, who, shop);   val=value_limit(val, number, who, shop);
   
       /* we need to multiply these by 4.0 to keep buy costs roughly the same
        * (otherwise, you could buy a potion of charisma for around 400 pp.
        * Arguable, the costs in the archetypes should be updated to better
        * reflect values (potion charisma list for 1250 gold)
        */
       val *= 4;
   
     /* This modification is for bargaining skill.      /* This modification is for bargaining skill.
      * Now only players with max level in bargaining       * Now only players with max level in bargaining
      * AND Cha = 30 will get optimal price.       * AND Cha = 30 will get optimal price.
Line 232
 
Line 239
  /* Diff is now a float between 0.2 and 0.8 */   /* Diff is now a float between 0.2 and 0.8 */
  diff+=(cha_bonus[who->stats.Cha]-1)/(1+cha_bonus[who->stats.Cha])*ratio;   diff+=(cha_bonus[who->stats.Cha]-1)/(1+cha_bonus[who->stats.Cha])*ratio;
    
  /* we need to multiply these by 4.0 to keep buy costs roughly the same  
  * (otherwise, you could buy a potion of charisma for around 400 pp.  
  * Arguable, the costs in the archetypes should be updated to better  
  * reflect values (potion charisma list for 1250 gold)  
  */  
  if(flag==F_BUY)   if(flag==F_BUY)
           val=(4*val*(long)(1000*(1+diff)))/1000;            val=(val*(long)(1000*(1+diff)))/1000;
  else if (flag==F_SELL)   else if (flag==F_SELL)
           val=(4*val*(long)(1000*(1-diff)))/1000;            val=(val*(long)(1000*(1-diff)))/1000;
  else val *=4;  
    
  /* If we are approximating, then the value returned should be allowed to be wrong   /* If we are approximating, then the value returned should be allowed to be wrong
    * however merely using a random number each time will not be sufficiant, as then     * however merely using a random number each time will not be sufficiant, as then


Legend:
line(s) removed in v.1.52 
line(s) changed
 line(s) added in v.1.53

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:44