Changes the default value of the conf item_enabled_npc to no (#6574)

* Split pre-re/re setting
** Changing of equipment while interacting with NPCs is allowed on pre-renewal by default
** Changing of equipment while interacting with NPCs is not allowed on renewal by default
* Added a message when the player tries to change the equipment while talking to npc

Fixed #6566

Thanks to @aleos89, @Lemongrass3110 and @Balferian !
This commit is contained in:
Atemo 2022-02-14 16:04:47 +01:00 committed by GitHub
parent 9ed2a90900
commit c092c8711b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View File

@ -90,8 +90,8 @@ allow_consume_restricted_item: no
allow_equip_restricted_item: yes
// Allow changing of equipment while interacting with NPCs? (Note 1)
// Default: yes
item_enabled_npc: yes
// Default on official servers: yes for Pre-renewal, no for Renewal
//item_enabled_npc: yes
// Allow map_flooritem to check if item is droppable? (Note 1)
// If yes, undroppable items will be destroyed instead of appearing on the map when a player's inventory is full.

View File

@ -9909,7 +9909,11 @@ static const struct _battle_data {
{ "allow_consume_restricted_item", &battle_config.allow_consume_restricted_item, 1, 0, 1, },
{ "allow_equip_restricted_item", &battle_config.allow_equip_restricted_item, 1, 0, 1, },
{ "max_walk_path", &battle_config.max_walk_path, 17, 1, MAX_WALKPATH, },
#ifdef RENEWAL
{ "item_enabled_npc", &battle_config.item_enabled_npc, 0, 0, 1, },
#else
{ "item_enabled_npc", &battle_config.item_enabled_npc, 1, 0, 1, },
#endif
{ "item_flooritem_check", &battle_config.item_onfloor, 1, 0, 1, },
{ "bowling_bash_area", &battle_config.bowling_bash_area, 0, 0, 20, },
{ "drop_rateincrease", &battle_config.drop_rateincrease, 0, 0, 1, },

View File

@ -12147,6 +12147,7 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
return; //Out of bounds check.
if(sd->npc_id && !sd->npc_item_flag) {
clif_msg_color( sd, C_ITEM_NOEQUIP, color_table[COLOR_RED] );
return;
} else if (sd->state.storage_flag || sd->sc.opt1)
; //You can equip/unequip stuff while storage is open/under status changes
@ -12201,6 +12202,7 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
}
if (sd->npc_id && !sd->npc_item_flag) {
clif_msg_color( sd, C_ITEM_NOEQUIP, color_table[COLOR_RED] );
return;
} else if (sd->state.storage_flag || sd->sc.opt1)
; //You can equip/unequip stuff while storage is open/under status changes

View File

@ -552,6 +552,7 @@ enum clif_messages : uint16_t {
// Unofficial names
C_ITEM_EQUIP_SWITCH = 0xbc7,
C_ITEM_NOEQUIP = 0x174, /// <"You can't put this item on."
};
enum e_personalinfo : uint8_t {