diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-24 14:33:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-24 15:27:07 +0300 |
commit | f94190251bc199582d819fefa448b32a662a297a (patch) | |
tree | 9da8729c5c2e7a20a5a355d520872897b5f7f9e2 /src/map/script.c | |
parent | 6b135d6fbda3e033712ab2a5dafe0c97f536cf3c (diff) | |
download | hercules-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.c | 5 |
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; } |