summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-02-24 20:06:01 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-02-24 20:06:01 +0800
commit137cc4396d651798a95641d529955845a25a56e1 (patch)
treeb04eccd22e415d4a9823a2f7677517d29047ee97 /src/map/pc.c
parentfa2751b503d41388cf82dbf882877db280b1bba7 (diff)
downloadhercules-137cc4396d651798a95641d529955845a25a56e1.tar.gz
hercules-137cc4396d651798a95641d529955845a25a56e1.tar.bz2
hercules-137cc4396d651798a95641d529955845a25a56e1.tar.xz
hercules-137cc4396d651798a95641d529955845a25a56e1.zip
Fixed Bug #7092
-Follow up adda8d74c3280ae1e3745591caafd9ce6e81ded7 where 'close2' is not working properly. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 6078283e7..7eae16193 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4232,6 +4232,14 @@ int pc_useitem(struct map_session_data *sd,int n)
nullpo_ret(sd);
+ //This flag enables you to use items while in an NPC. [Skotlex]
+ if( sd->npc_id && sd->npc_id != sd->npc_item_flag ){
+#ifdef RENEWAL
+ clif_msg(sd, 0x783); // TODO look for the client date that has this message.
+#endif
+ return 0;
+ }
+
if( sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 )
return 0;