New pcblock flag PCBLOCK_EQUIP (#8367)
This commit is contained in:
parent
05ced985e3
commit
9e2b0b4a4d
@ -6608,7 +6608,8 @@ Available <type>:
|
||||
PCBLOCK_COMMANDS Prevent the player from using atcommands/charcommands.
|
||||
PCBLOCK_NPCCLICK Prevent the player from clicking/touching any NPC/shop/warp.
|
||||
PCBLOCK_EMOTION Prevent the player from using emotions.
|
||||
PCBLOCK_NPC Simulate NPC interaction. Useful for NPC with no mes window. Sum of PCBLOCK_MOVE|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_NPCCLICK.
|
||||
PCBLOCK_EQUIP Prevent the player from replacing equipment.
|
||||
PCBLOCK_NPC Simulate NPC interaction. Useful for NPC with no mes window. Sum of PCBLOCK_MOVE|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_NPCCLICK|PCBLOCK_EQUIP.
|
||||
PCBLOCK_ALL Sum of all the flags.
|
||||
|
||||
Examples:
|
||||
|
@ -12075,7 +12075,7 @@ void clif_parse_EquipItem(int fd,map_session_data *sd)
|
||||
if (index < 0 || index >= MAX_INVENTORY)
|
||||
return; //Out of bounds check.
|
||||
|
||||
if(sd->npc_id && !sd->npc_item_flag) {
|
||||
if((sd->npc_id && !sd->npc_item_flag) || (sd->state.block_action & PCBLOCK_EQUIP)) {
|
||||
clif_msg_color( sd, CAN_NOT_EQUIP_ITEM, color_table[COLOR_RED] );
|
||||
return;
|
||||
} else if (sd->state.storage_flag || sd->sc.opt1)
|
||||
@ -12130,7 +12130,7 @@ void clif_parse_UnequipItem(int fd,map_session_data *sd)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sd->npc_id && !sd->npc_item_flag) {
|
||||
if((sd->npc_id && !sd->npc_item_flag) || (sd->state.block_action & PCBLOCK_EQUIP)) {
|
||||
clif_msg_color( sd, CAN_NOT_EQUIP_ITEM, color_table[COLOR_RED] );
|
||||
return;
|
||||
} else if (sd->state.storage_flag || sd->sc.opt1)
|
||||
|
@ -2155,9 +2155,10 @@ enum e_pcblock_action_flag : uint16 {
|
||||
PCBLOCK_SITSTAND = 0x040,
|
||||
PCBLOCK_COMMANDS = 0x080,
|
||||
PCBLOCK_NPCCLICK = 0x100,
|
||||
PCBLOCK_NPC = 0x18D,
|
||||
PCBLOCK_EMOTION = 0x200,
|
||||
PCBLOCK_ALL = 0x3FF,
|
||||
PCBLOCK_EQUIP = 0x400,
|
||||
PCBLOCK_NPC = 0x58D,
|
||||
PCBLOCK_ALL = 0x7FF,
|
||||
};
|
||||
|
||||
/* getiteminfo/setiteminfo script commands */
|
||||
|
Loading…
x
Reference in New Issue
Block a user