summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 45274e3dd..4e5ed7fdd 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);
}
@@ -7127,7 +7127,7 @@ BUILDIN(getitem) {
if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) {
clif->additem(sd, 0, 0, flag);
if( pc->candrop(sd,&it) )
- map->addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+ map->addflooritem(&sd->bl, &it, get_count, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
}
}
}
@@ -7235,7 +7235,7 @@ BUILDIN(getitem2)
if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_SCRIPT))) {
clif->additem(sd, 0, 0, flag);
if( pc->candrop(sd,&item_tmp) )
- map->addflooritem(&item_tmp,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+ map->addflooritem(&sd->bl, &item_tmp, get_count, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
}
}
}
@@ -7429,7 +7429,7 @@ BUILDIN(makeitem)
item_tmp.nameid = nameid;
item_tmp.identify=1;
- map->addflooritem(&item_tmp,amount,m,x,y,0,0,0,0);
+ map->addflooritem(NULL, &item_tmp, amount, m, x, y, 0, 0, 0, 0);
return true;
}
@@ -12310,7 +12310,7 @@ BUILDIN(successremovecards)
if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) {
// get back the cart in inventory
clif->additem(sd,0,0,flag);
- map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+ map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
}
}
}
@@ -12335,7 +12335,7 @@ BUILDIN(successremovecards)
if ((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) {
//chk if can be spawn in inventory otherwise put on floor
clif->additem(sd,0,0,flag);
- map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+ map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
}
clif->misceffect(&sd->bl,3);
@@ -12384,7 +12384,7 @@ BUILDIN(failedremovecards)
if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) {
clif->additem(sd,0,0,flag);
- map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+ map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
}
}
}
@@ -12415,7 +12415,7 @@ BUILDIN(failedremovecards)
if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) {
clif->additem(sd,0,0,flag);
- map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+ map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
}
}
clif->misceffect(&sd->bl,2);
@@ -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;
}
@@ -18632,7 +18633,7 @@ BUILDIN(getrandgroupitem) {
if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) {
clif->additem(sd, 0, 0, flag);
if( pc->candrop(sd,&it) )
- map->addflooritem(&it,get_count,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+ map->addflooritem(&sd->bl, &it, get_count, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
}
}
}