diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-02-17 08:31:32 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-02-17 08:31:32 +0000 |
commit | 6b1b1974a10bb5ad8f69d9f84d7babcc370f9264 (patch) | |
tree | bad024738cb1a318420df132ac8b4fa9dc212a5f /src/map/status.c | |
parent | cf21db7985cfaf093cca2a1d4bc3e43e7f145ff3 (diff) | |
download | hercules-6b1b1974a10bb5ad8f69d9f84d7babcc370f9264.tar.gz hercules-6b1b1974a10bb5ad8f69d9f84d7babcc370f9264.tar.bz2 hercules-6b1b1974a10bb5ad8f69d9f84d7babcc370f9264.tar.xz hercules-6b1b1974a10bb5ad8f69d9f84d7babcc370f9264.zip |
* Changes to Dissonance -- don't increment the timer again if the target has died
* Changed some nullpo checks back to normal null checks
* Changed some nullpo checks to print some debug information
* Added some sd checks before calling pc_blockskill
* Added fix for SQL char's friend list updating
* Fixed a crash if the player invited to join a guild is not online
* Find the guild invitation sender first before clearing it
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1124 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c index 55f4326f9..412308f59 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3997,13 +3997,13 @@ int status_change_end( struct block_list* bl , int type,int tid ) */ int status_change_timer(int tid, unsigned int tick, int id, int data) { - int type=data; + int type = data; struct block_list *bl; struct map_session_data *sd=NULL; struct status_change *sc_data; //short *sc_count; //使ってない? - nullpo_retr(0, bl=map_id2bl(id)); + nullpo_retr_f(0, bl=map_id2bl(id), "id=%d data=%d",id,data); nullpo_retr(0, sc_data=status_get_sc_data(bl)); if(bl->type==BL_PC) @@ -4104,8 +4104,10 @@ int status_change_timer(int tid, unsigned int tick, int id, int data) case SC_WATERBALL: /* ウォ?タ?ボ?ル */ { struct block_list *target=map_id2bl(sc_data[type].val2); - nullpo_retb(target); - nullpo_retb(target->prev); + if (!target || !target->prev) + break; // target has been killed in previous hits, no need to raise an alarm ^^; + // nullpo_retb(target); + // nullpo_retb(target->prev); skill_attack(BF_MAGIC,bl,bl,target,WZ_WATERBALL,sc_data[type].val1,tick,0); if((--sc_data[type].val3)>0) { sc_data[type].timer=add_timer( 150+tick,status_change_timer, bl->id, data ); @@ -4139,8 +4141,10 @@ int status_change_timer(int tid, unsigned int tick, int id, int data) break;*/ nullpo_retb(unit); nullpo_retb(unit->group); - nullpo_retr(0, src=map_id2bl(unit->group->src_id)); + nullpo_retb(src=map_id2bl(unit->group->src_id)); skill_attack(BF_MISC,src,&unit->bl,bl,unit->group->skill_id,sc_data[type].val1,tick,0); + if( (bl->type==BL_MOB) && (MS_DEAD==((struct mob_data *)bl)->state.state) ) + break; sc_data[type].timer=add_timer(skill_get_time2(unit->group->skill_id,unit->group->skill_lv)+tick, status_change_timer, bl->id, data ); return 0; |