|
@@ -1346,8 +1346,7 @@ int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data)
|
|
* to place an BL_ITEM object. Scan area is 9x9, returns 1 on success.
|
|
* to place an BL_ITEM object. Scan area is 9x9, returns 1 on success.
|
|
* x and y are modified with the target cell when successful.
|
|
* x and y are modified with the target cell when successful.
|
|
*------------------------------------------*/
|
|
*------------------------------------------*/
|
|
-int map_searchrandfreecell(int m,int *x,int *y,int stack)
|
|
|
|
-{
|
|
|
|
|
|
+int map_searchrandfreecell(int m,int *x,int *y,int stack) {
|
|
int free_cell,i,j;
|
|
int free_cell,i,j;
|
|
int free_cells[9][2];
|
|
int free_cells[9][2];
|
|
|
|
|
|
@@ -1357,7 +1356,7 @@ int map_searchrandfreecell(int m,int *x,int *y,int stack)
|
|
for(j=-1;j<=1;j++){
|
|
for(j=-1;j<=1;j++){
|
|
if(j+*x<0 || j+*x>=map[m].xs)
|
|
if(j+*x<0 || j+*x>=map[m].xs)
|
|
continue;
|
|
continue;
|
|
- if(map_getcell(m,j+*x,i+*y,CELL_CHKNOPASS))
|
|
|
|
|
|
+ if(map_getcell(m,j+*x,i+*y,CELL_CHKNOPASS) && !map_getcell(m,j+*x,i+*y,CELL_CHKICEWALL))
|
|
continue;
|
|
continue;
|
|
//Avoid item stacking to prevent against exploits. [Skotlex]
|
|
//Avoid item stacking to prevent against exploits. [Skotlex]
|
|
if(stack && map_count_oncell(m,j+*x,i+*y, BL_ITEM) > stack)
|
|
if(stack && map_count_oncell(m,j+*x,i+*y, BL_ITEM) > stack)
|
|
@@ -2515,6 +2514,8 @@ int map_getcellp(struct map_data* m,int x,int y,cell_chk cellchk)
|
|
return (cell.nochat);
|
|
return (cell.nochat);
|
|
case CELL_CHKMAELSTROM:
|
|
case CELL_CHKMAELSTROM:
|
|
return (cell.maelstrom);
|
|
return (cell.maelstrom);
|
|
|
|
+ case CELL_CHKICEWALL:
|
|
|
|
+ return (cell.icewall);
|
|
|
|
|
|
// special checks
|
|
// special checks
|
|
case CELL_CHKPASS:
|
|
case CELL_CHKPASS:
|
|
@@ -2568,6 +2569,7 @@ void map_setcell(int m, int x, int y, cell_t cell, bool flag)
|
|
case CELL_NOVENDING: map[m].cell[j].novending = flag; break;
|
|
case CELL_NOVENDING: map[m].cell[j].novending = flag; break;
|
|
case CELL_NOCHAT: map[m].cell[j].nochat = flag; break;
|
|
case CELL_NOCHAT: map[m].cell[j].nochat = flag; break;
|
|
case CELL_MAELSTROM: map[m].cell[j].maelstrom = flag; break;
|
|
case CELL_MAELSTROM: map[m].cell[j].maelstrom = flag; break;
|
|
|
|
+ case CELL_ICEWALL: map[m].cell[j].icewall = flag; break;
|
|
default:
|
|
default:
|
|
ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell);
|
|
ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell);
|
|
break;
|
|
break;
|