Added rental_item_novalue config (#3749)

* Added a config to always sell the rental items to NPC for 0

Thanks to @Lemongrass3110, @cydh, @aleos89, @Daegaladh for the review !
This commit is contained in:
Atemo
2020-05-21 21:13:45 +02:00
committed by GitHub
parent 43caf7cc0a
commit b8ee97b6a1
5 changed files with 16 additions and 4 deletions

View File

@@ -2211,7 +2211,10 @@ uint8 npc_selllist(struct map_session_data* sd, int n, unsigned short *item_list
return 1; // In official server, this illegal attempt the player will be disconnected
}
value = pc_modifysellvalue(sd, sd->inventory_data[idx]->value_sell);
if (battle_config.rental_item_novalue && sd->inventory.u.items_inventory[idx].expire_time)
value = 0;
else
value = pc_modifysellvalue(sd, sd->inventory_data[idx]->value_sell);
z+= (double)value*amount;
}