diff options
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 4497ef54f..c1261c839 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5163,7 +5163,8 @@ static int pc_useitem(struct map_session_data *sd, int n) nullpo_ret(sd); Assert_ret(n >= 0 && n < sd->status.inventorySize); - if (sd->npc_id || sd->state.workinprogress & 1) { + if ((sd->npc_id != 0 && (sd->npc_item_flag & ITEMENABLEDNPC_CONSUME) == 0) + || (sd->state.workinprogress & 1) != 0) { #if PACKETVER >= 20110308 clif->msgtable(sd, MSG_BUSY); #else @@ -5172,7 +5173,7 @@ static int pc_useitem(struct map_session_data *sd, int n) return 0; } - if (battle_config.storage_use_item == 1 && sd->state.storage_flag != STORAGE_FLAG_CLOSED) { + if (battle_config.storage_use_item == 0 && sd->state.storage_flag != STORAGE_FLAG_CLOSED) { clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd, 1475)); return 0; // You cannot use this item while storage is open. } @@ -5914,11 +5915,6 @@ static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int status_change_end(&sd->bl, SC_CLOAKINGEXCEED, INVALID_TIMER); } - for (int i = 0; i < EQI_MAX; i++) { - if (sd->equip_index[i] >= 0 && pc->isequip(sd , sd->equip_index[i]) == 0) - pc->unequipitem(sd, sd->equip_index[i], PCUNEQUIPITEM_FORCE); - } - if ((battle_config.clear_unit_onwarp & BL_PC) != 0) skill->clear_unitgroup(&sd->bl); |