From 50bc76c412b6618d90fdbdb24d43da2bda0525a2 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 3 Feb 2014 14:09:58 -0200 Subject: Fixed Bug 7333 Zones are now able to merge during runtime. Special Thanks to Haru, kyeme. http://hercules.ws/board/tracker/issue-7333-map-zone-db/ Signed-off-by: shennetsind --- src/map/npc.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index 458fc52ed..36efc7267 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3173,12 +3173,17 @@ void npc_unsetcells(struct npc_data* nd) { int16 m = nd->bl.m, x = nd->bl.x, y = nd->bl.y, xs, ys; int i,j, x0, x1, y0, y1; - if (nd->subtype == WARP) { - xs = nd->u.warp.xs; - ys = nd->u.warp.ys; - } else { - xs = nd->u.scr.xs; - ys = nd->u.scr.ys; + switch(nd->subtype) { + case WARP: + xs = nd->u.warp.xs; + ys = nd->u.warp.ys; + break; + case SCRIPT: + xs = nd->u.scr.xs; + ys = nd->u.scr.ys; + break; + default: + return; // Other types doesn't have touch area } if (m < 0 || xs < 0 || ys < 0 || map->list[m].cell == (struct mapcell *)0xdeadbeaf) -- cgit v1.2.3-70-g09d2