summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-02-03 14:09:58 -0200
committershennetsind <ind@henn.et>2014-02-03 14:09:58 -0200
commit50bc76c412b6618d90fdbdb24d43da2bda0525a2 (patch)
treea98a1b4cd9aaa335b3361f2ef5cd7081b7469df2 /src/map/npc.c
parent9132878d911cfe720eaad94ad3d4a5dd11958f99 (diff)
downloadhercules-50bc76c412b6618d90fdbdb24d43da2bda0525a2.tar.gz
hercules-50bc76c412b6618d90fdbdb24d43da2bda0525a2.tar.bz2
hercules-50bc76c412b6618d90fdbdb24d43da2bda0525a2.tar.xz
hercules-50bc76c412b6618d90fdbdb24d43da2bda0525a2.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c17
1 files changed, 11 insertions, 6 deletions
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)