From 729424c1ebb6762f49b85c97d56dabb5975958a1 Mon Sep 17 00:00:00 2001 From: Lance Date: Fri, 17 Mar 2006 06:39:58 +0000 Subject: * Final fix on Juperos NPC. * Fix on initnpctimer not attaching rid. * Fix on OnTouch ignoring -1 NPCs. * Fix on @reloadscript crashing due to passing non BL_SKILL bl to a function that accepts only BL_SKILL bl. * Added area NPC detection in clif_parseLoadEndAck. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5638 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 1fc99de95..4e6842b97 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -777,6 +777,7 @@ int npc_settimerevent_tick(struct npc_data *nd,int newtimer) flag= sd->npc_timer_id != -1 ; } else flag= nd->u.scr.timerid != -1 ; + if(flag) npc_timerevent_stop(nd); nd->u.scr.timer=newtimer; @@ -1556,6 +1557,7 @@ int npc_unload (struct npc_data *nd) } } } + aFree(nd); return 0; @@ -2033,7 +2035,7 @@ static int npc_parse_script (char *w1,char *w2,char *w3,char *w4,char *first_lin if (xs >= 0) xs = xs * 2 + 1; if (ys >= 0) ys = ys * 2 + 1; - if (class_ >= 0) { + if (class_ >= -1) { // -1 NPCs use OnTouch [Lance] for (i = 0; i < ys; i++) { for (j = 0; j < xs; j++) { if (map_getcell(m, x - xs/2 + j, y - ys/2 + i, CELL_CHKNOPASS)) -- cgit v1.2.3-70-g09d2