summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-24 14:33:37 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-24 15:27:07 +0300
commitf94190251bc199582d819fefa448b32a662a297a (patch)
tree9da8729c5c2e7a20a5a355d520872897b5f7f9e2 /src/map/script.c
parent6b135d6fbda3e033712ab2a5dafe0c97f536cf3c (diff)
downloadhercules-f94190251bc199582d819fefa448b32a662a297a.tar.gz
hercules-f94190251bc199582d819fefa448b32a662a297a.tar.bz2
hercules-f94190251bc199582d819fefa448b32a662a297a.tar.xz
hercules-f94190251bc199582d819fefa448b32a662a297a.zip
Add bl parameter to getcell functions.
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 45274e3dd..74ddf2104 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5824,7 +5824,7 @@ int buildin_areawarp_sub(struct block_list *bl,va_list ap)
tx = rnd()%(x3-x2+1)+x2;
ty = rnd()%(y3-y2+1)+y2;
j++;
- } while( map->getcell(index,tx,ty,CELL_CHKNOPASS) && j < max );
+ } while (map->getcell(index, bl, tx, ty, CELL_CHKNOPASS) && j < max);
pc->setpos((TBL_PC *)bl,index,tx,ty,CLR_OUTSIGHT);
}
@@ -16841,13 +16841,14 @@ BUILDIN(checkcell) {
int16 x = script_getnum(st,3);
int16 y = script_getnum(st,4);
cell_chk type = (cell_chk)script_getnum(st,5);
+ TBL_PC* sd = script->rid2sd(st);
if ( m == -1 ) {
ShowWarning("checkcell: Attempted to run on unexsitent map '%s', type %d, x/y %d,%d\n",script_getstr(st,2),type,x,y);
return true;
}
- script_pushint(st, map->getcell(m, x, y, type));
+ script_pushint(st, map->getcell(m, &sd->bl, x, y, type));
return true;
}