mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-21 19:11:46 +01:00
Addressed several compiler warnings.
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
* By Jeff Fink. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __SHOP_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
@@ -458,15 +456,15 @@ static struct obj_data *get_purchase_obj(struct char_data *ch, char *arg, struct
|
||||
static int buy_price(struct obj_data *obj, int shop_nr, struct char_data *keeper, struct char_data *buyer)
|
||||
{
|
||||
return (int) (GET_OBJ_COST(obj) * SHOP_BUYPROFIT(shop_nr)
|
||||
* (1 + (GET_CHA(keeper) - GET_CHA(buyer)) / (float)70));
|
||||
* (1 + (GET_CHA(keeper) - GET_CHA(buyer)) / (double)70));
|
||||
}
|
||||
|
||||
/* When the shopkeeper is buying, we reverse the discount. Also make sure
|
||||
we don't buy for more than we sell for, to prevent infinite money-making. */
|
||||
static int sell_price(struct obj_data *obj, int shop_nr, struct char_data *keeper, struct char_data *seller)
|
||||
{
|
||||
float sell_cost_modifier = SHOP_SELLPROFIT(shop_nr) * (1 - (GET_CHA(keeper) - GET_CHA(seller)) / (float)70);
|
||||
float buy_cost_modifier = SHOP_BUYPROFIT(shop_nr) * (1 + (GET_CHA(keeper) - GET_CHA(seller)) / (float)70);
|
||||
float sell_cost_modifier = SHOP_SELLPROFIT(shop_nr) * (1 - (GET_CHA(keeper) - GET_CHA(seller)) / (double)70);
|
||||
float buy_cost_modifier = SHOP_BUYPROFIT(shop_nr) * (1 + (GET_CHA(keeper) - GET_CHA(seller)) / (double)70);
|
||||
|
||||
if (sell_cost_modifier > buy_cost_modifier)
|
||||
sell_cost_modifier = buy_cost_modifier;
|
||||
|
||||
Reference in New Issue
Block a user