summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/map.c12
-rw-r--r--src/map/pc.c3
-rw-r--r--src/map/status.c5
3 files changed, 13 insertions, 7 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 4ffd10414..e1d97b0de 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1324,18 +1324,18 @@ int map_searchrandfreecell(int m,int *x,int *y,int stack) {
int free_cells[9][2];
for(free_cell=0,i=-1;i<=1;i++){
- if(i+y<0 || i+y>=map[m].ys)
+ if(i+*y<0 || i+*y>=map[m].ys)
continue;
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;
- if(map_getcell(m,j+x,i+y,CELL_CHKNOPASS))
+ if(map_getcell(m,j+*x,i+*y,CELL_CHKNOPASS))
continue;
//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)
continue;
- free_cells[free_cell][0] = j+x;
- free_cells[free_cell++][1] = i+y;
+ free_cells[free_cell][0] = j+*x;
+ free_cells[free_cell++][1] = i+*y;
}
}
if(free_cell==0)
diff --git a/src/map/pc.c b/src/map/pc.c
index a45ac1902..34286e3cb 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -359,6 +359,9 @@ int pc_can_move(struct map_session_data *sd)
if ((sd->sc.option & OPTION_HIDE) && pc_checkskill(sd, RG_TUNNELDRIVE) <= 0)
return 0;
+
+ if (pc_issit(sd))
+ return 0; //Can't move while sitting...
if (DIFF_TICK(sd->canmove_tick, gettick()) > 0)
return 0;
diff --git a/src/map/status.c b/src/map/status.c
index 38469eba7..3eb09a6ba 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3745,7 +3745,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
if (elem == 1 && !(flag&1))
return 0; //Can't freeze water elementals.
case SC_STONE:
- //I've been informed that undead chars are inmune to stone curse too. [Skotlex]
+ //Undead are inmune to Freeze/Stone
if (undead_flag && !(flag&1))
return 0;
case SC_SLEEP:
@@ -4631,6 +4631,9 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_FREEZE:
case SC_STAN:
case SC_SLEEP:
+ case SC_STONE:
+ if (sd && pc_issit(sd)) //Avoid sprite sync problems.
+ pc_setstand(sd);
case SC_TRICKDEAD:
battle_stopattack(bl);
skill_stop_dancing(bl); /* 演奏/ダンスの中? */