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/skill.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/skill.c')
-rw-r--r-- | src/map/skill.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index e4b171636..61cd89ebd 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2823,7 +2823,8 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s clif_updatestatus(sd,SP_SP); } } - pc_blockskill_start (sd, skillid, (skilllv < 5 ? 10000: 15000)); + if (sd) + pc_blockskill_start (sd, skillid, (skilllv < 5 ? 10000: 15000)); } break; @@ -3305,7 +3306,8 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int case SM_ENDURE: /* インデュア */ clif_skill_nodamage(src,bl,skillid,skilllv,1); status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 ); - pc_blockskill_start (sd, skillid, 10000); + if (sd) + pc_blockskill_start (sd, skillid, 10000); break; case SM_AUTOBERSERK: // Celest @@ -5039,7 +5041,8 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil pc_movepos(sd,x,y); }else if( src->type==BL_MOB ) mob_warp((struct mob_data *)src,-1,x,y,0); - pc_blockskill_start (sd, MO_EXTREMITYFIST, 2000); + if (sd) + pc_blockskill_start (sd, MO_EXTREMITYFIST, 2000); break; case AM_CANNIBALIZE: // バイオプラント if(sd){ @@ -7718,10 +7721,12 @@ int skill_use_id( struct map_session_data *sd, int target_id, case WE_FEMALE: { struct map_session_data *p_sd = pc_get_partner(sd); - nullpo_retr (0, p_sd) + if (p_sd == NULL) // it's possible to get null if we're not married ^^; + return 0; + // nullpo_retr (0, p_sd) if(skill_num == WE_MALE && sd->status.hp <= ((15*sd->status.max_hp)/100)) // Requires more than 15% of Max HP for WE_MALE return 0; - if(skill_num == WE_FEMALE && sd->status.sp <= ((15*sd->status.max_sp)/100)) // Requires more than 15% of Max SP for WE_FEMALE + else if(skill_num == WE_FEMALE && sd->status.sp <= ((15*sd->status.max_sp)/100)) // Requires more than 15% of Max SP for WE_FEMALE return 0; target_id = p_sd->bl.id; //rangeをもう1回?査 |