diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-06-29 15:16:51 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-06-29 15:16:51 +0000 |
commit | 386b2af17167e5dafcbbc892dba2866c22b0934b (patch) | |
tree | e0285c471d73eec77bfed84bcf3ec61d6ea643d2 /src/map/npc.c | |
parent | bf559662f0d0c0d9cbdd3c3f65990b6032472e33 (diff) | |
download | hercules-386b2af17167e5dafcbbc892dba2866c22b0934b.tar.gz hercules-386b2af17167e5dafcbbc892dba2866c22b0934b.tar.bz2 hercules-386b2af17167e5dafcbbc892dba2866c22b0934b.tar.xz hercules-386b2af17167e5dafcbbc892dba2866c22b0934b.zip |
- 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
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |