summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-04-11 22:22:37 -0300
committerpanikon <panikon@zoho.com>2014-04-11 22:22:37 -0300
commit6f6a6b3db3b36846f68e6b8ccb59351dced66ab3 (patch)
tree090e324567c62292ab98fd1f1e1a970f8a9c82c0 /src/map/npc.c
parent6a27692a32abd3a69566626070abed88808d0489 (diff)
downloadhercules-6f6a6b3db3b36846f68e6b8ccb59351dced66ab3.tar.gz
hercules-6f6a6b3db3b36846f68e6b8ccb59351dced66ab3.tar.bz2
hercules-6f6a6b3db3b36846f68e6b8ccb59351dced66ab3.tar.xz
hercules-6f6a6b3db3b36846f68e6b8ccb59351dced66ab3.zip
Fixed issue: 7694
http://hercules.ws/board/tracker/issue-7694-guild-notice/ Follow up to 7a5f7db Follow up to 4147d9f
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 5f9422e9f..f872a6170 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1152,14 +1152,19 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd)
// another it's expected that the OnTouch event be put first in stack, because
// unit_walktoxy_timer is executed before any other function in this case.
// So it's best practice to put an 'end;' before OnTouch events in npcs that
- // have view ids of mobs to avoid this kind of error [Panikon]
+ // have view ids of mobs to avoid this "issue" [Panikon]
if (sd->npc_id != 0) {
- ShowError("npc_click: npc_id != 0\n");
+ // The player clicked a npc after entering an OnTouch area
+ if( sd->areanpc_id == sd->npc_id );
+ else
+ ShowError("npc_click: npc_id != 0\n");
+
return 1;
}
- if(!nd) return 1;
-
+ if( !nd )
+ return 1;
+
if ((nd = npc->checknear(sd,&nd->bl)) == NULL)
return 1;