diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-05-10 03:02:56 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-05-13 04:53:29 +0200 |
commit | a271110b6c53cf268747ab74d1471452909c5272 (patch) | |
tree | d1023faba69fcb2506989427257ed64a1b7ed87e /src/map/pc.c | |
parent | 944d8489f1bcca93e6b2ff06a159084f064dce12 (diff) | |
download | hercules-a271110b6c53cf268747ab74d1471452909c5272.tar.gz hercules-a271110b6c53cf268747ab74d1471452909c5272.tar.bz2 hercules-a271110b6c53cf268747ab74d1471452909c5272.tar.xz hercules-a271110b6c53cf268747ab74d1471452909c5272.zip |
Extend item_enabled_npc battle flag with option for usable items
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 5faadf76a..c6f8ef4f9 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5162,7 +5162,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 |