Conf: hide favorite items while selling to NPCs (#1925)
Added a configuration for hiding favorite items in the sell menu. Thanks to @Jeybla!
This commit is contained in:
parent
fa443eee30
commit
e31428df64
@ -150,3 +150,6 @@ disp_servervip_msg: no
|
||||
|
||||
// Delay to allow user resend new mail (default & minimum is 1000)
|
||||
mail_delay: 1000
|
||||
|
||||
// Hides items from the player's favorite tab from being sold to a NPC. (Note 1)
|
||||
hide_fav_sell: no
|
||||
|
@ -8405,6 +8405,7 @@ static const struct _battle_data {
|
||||
{ "change_party_leader_samemap", &battle_config.change_party_leader_samemap, 1, 0, 1, },
|
||||
{ "dispel_song", &battle_config.dispel_song, 0, 0, 1, },
|
||||
{ "guild_maprespawn_clones", &battle_config.guild_maprespawn_clones, 0, 0, 1, },
|
||||
{ "hide_fav_sell", &battle_config.hide_fav_sell, 0, 0, 1, },
|
||||
|
||||
#include "../custom/battle_config_init.inc"
|
||||
};
|
||||
|
@ -617,6 +617,7 @@ extern struct Battle_Config
|
||||
int change_party_leader_samemap;
|
||||
int dispel_song; //Can songs be dispelled?
|
||||
int guild_maprespawn_clones; // Should clones be killed by maprespawnguildid?
|
||||
int hide_fav_sell;
|
||||
|
||||
#include "../custom/battle_config_struct.inc"
|
||||
} battle_config;
|
||||
|
@ -1990,6 +1990,9 @@ void clif_selllist(struct map_session_data *sd)
|
||||
if( !itemdb_cansell(&sd->inventory.u.items_inventory[i], pc_get_group_level(sd)) )
|
||||
continue;
|
||||
|
||||
if( battle_config.hide_fav_sell && sd->inventory.u.items_inventory[i].favorite )
|
||||
continue; //Cannot sell favs [Jey]
|
||||
|
||||
if( sd->inventory.u.items_inventory[i].expire_time || (sd->inventory.u.items_inventory[i].bound && !pc_can_give_bounded_items(sd)) )
|
||||
continue; // Cannot Sell Rental Items or Account Bounded Items
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user