diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-10 05:25:39 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-10 05:25:39 +0000 |
commit | 22c1a797e182554a1e701f5cc0a21f2a605413fb (patch) | |
tree | 42374dd8e895269f686d3cc5faa9cff31e28e911 /src/map/pc.c | |
parent | d574e16397271aa01b5a8ce41738a89be911b0ac (diff) | |
download | hercules-22c1a797e182554a1e701f5cc0a21f2a605413fb.tar.gz hercules-22c1a797e182554a1e701f5cc0a21f2a605413fb.tar.bz2 hercules-22c1a797e182554a1e701f5cc0a21f2a605413fb.tar.xz hercules-22c1a797e182554a1e701f5cc0a21f2a605413fb.zip |
- Added sc_data check for pc_damage
- Corrected error in skill.c
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@528 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 3fb63c57b..242462a5a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5365,11 +5365,12 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage) } // ? いていたら足を止める - if(sd->sc_data[SC_ENDURE].timer == -1 && sd->sc_data[SC_BERSERK].timer && !sd->special_state.infinite_endure) - pc_stop_walking(sd,3); - else if(sd->sc_data[SC_ENDURE].timer != -1 && src->type==BL_MOB) // [Celest] - if((--sd->sc_data[SC_ENDURE].val2) <= 0) + if (sd->sc_data) { + if (sd->sc_data[SC_ENDURE].timer == -1 && sd->sc_data[SC_BERSERK].timer == -1 && !sd->special_state.infinite_endure) + pc_stop_walking(sd,3); + else if(sd->sc_data[SC_ENDURE].timer != -1 && src->type==BL_MOB && (--sd->sc_data[SC_ENDURE].val2) <= 0) skill_status_change_end(&sd->bl, SC_ENDURE, -1); + } // 演奏/ダンスの中? if(damage > sd->status.max_hp>>2) skill_stop_dancing(&sd->bl,0); |