From 386b2af17167e5dafcbbc892dba2866c22b0934b Mon Sep 17 00:00:00 2001 From: zephyrus Date: Sun, 29 Jun 2008 15:16:51 +0000 Subject: - Added support to Cash Shop for script command callshop - Fixed a bug in OnTouchNPC - Cleanup in barricade code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12896 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index 8ec20c487..c987bd5b8 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -781,7 +781,7 @@ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y) // Return 1 if Warped int npc_touch_areanpc2(struct mob_data *md) { - int i, m = md->bl.m, x = md->bl.x, y = md->bl.y; + int i, m = md->bl.m, x = md->bl.x, y = md->bl.y, id; char eventname[NAME_LENGTH*2+3]; struct event_data* ev; int xs, ys; @@ -825,7 +825,9 @@ int npc_touch_areanpc2(struct mob_data *md) if( (ev = (struct event_data*)strdb_get(ev_db, eventname)) == NULL || ev->nd == NULL ) break; // No OnTouchNPC Event md->areanpc_id = map[m].npc[i]->bl.id; + id = md->bl.id; // Stores Unique ID run_script(ev->nd->u.scr.script, ev->pos, md->bl.id, ev->nd->bl.id); + if( map_id2md(id) == NULL ) return 1; // Not Warped, but killed break; } -- cgit v1.2.3-70-g09d2