- Added pc_issit check to pc_can_move

- Stone/Freeze/Stun/Sleep now make you stand up as well.
- Some logic pointer fixes on map_searchrandfreecell.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5251 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-02-10 15:30:10 +00:00
parent f8df39576f
commit 5b7bbaa4eb
4 changed files with 14 additions and 7 deletions

View File

@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/02/10 2006/02/10
* Fixed map_searchrandcell function. [Skotlex]
* Modified the NPC_BREAK* skills to break equipment at a 10%*lv rate. [Skotlex] * Modified the NPC_BREAK* skills to break equipment at a 10%*lv rate. [Skotlex]
* Modified the drop item routines to perform stacking checks only for * Modified the drop item routines to perform stacking checks only for
player attempted item drops, therefore, mob drops will stack up to player attempted item drops, therefore, mob drops will stack up to

View File

@ -1324,18 +1324,18 @@ int map_searchrandfreecell(int m,int *x,int *y,int stack) {
int free_cells[9][2]; int free_cells[9][2];
for(free_cell=0,i=-1;i<=1;i++){ 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; continue;
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))
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)
continue; continue;
free_cells[free_cell][0] = j+x; free_cells[free_cell][0] = j+*x;
free_cells[free_cell++][1] = i+y; free_cells[free_cell++][1] = i+*y;
} }
} }
if(free_cell==0) if(free_cell==0)

View File

@ -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) if ((sd->sc.option & OPTION_HIDE) && pc_checkskill(sd, RG_TUNNELDRIVE) <= 0)
return 0; return 0;
if (pc_issit(sd))
return 0; //Can't move while sitting...
if (DIFF_TICK(sd->canmove_tick, gettick()) > 0) if (DIFF_TICK(sd->canmove_tick, gettick()) > 0)
return 0; return 0;

View File

@ -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)) if (elem == 1 && !(flag&1))
return 0; //Can't freeze water elementals. return 0; //Can't freeze water elementals.
case SC_STONE: 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)) if (undead_flag && !(flag&1))
return 0; return 0;
case SC_SLEEP: 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_FREEZE:
case SC_STAN: case SC_STAN:
case SC_SLEEP: case SC_SLEEP:
case SC_STONE:
if (sd && pc_issit(sd)) //Avoid sprite sync problems.
pc_setstand(sd);
case SC_TRICKDEAD: case SC_TRICKDEAD:
battle_stopattack(bl); battle_stopattack(bl);
skill_stop_dancing(bl); /* 演奏/ダンスの中? */ skill_stop_dancing(bl); /* 演奏/ダンスの中? */