summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
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;