diff options
author | shennetsind <ind@henn.et> | 2013-10-10 18:59:41 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-10-10 18:59:41 -0300 |
commit | b1c82364e9097ee98dc0f850bdb37f2b3e945d61 (patch) | |
tree | 5e9076832f86a3667a164ef16df7fe8389ee6ed8 /src | |
parent | 646f7e2f4ea4bd6b07e66d2949817ebdc18f3484 (diff) | |
parent | b2f05429334e1084aa062b115a66c2b85ab9f63a (diff) | |
download | hercules-b1c82364e9097ee98dc0f850bdb37f2b3e945d61.tar.gz hercules-b1c82364e9097ee98dc0f850bdb37f2b3e945d61.tar.bz2 hercules-b1c82364e9097ee98dc0f850bdb37f2b3e945d61.tar.xz hercules-b1c82364e9097ee98dc0f850bdb37f2b3e945d61.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 82a584ce2..70e946119 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6971,21 +6971,23 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if(sd) { struct map_session_data *f_sd = pc->get_father(sd); struct map_session_data *m_sd = pc->get_mother(sd); - // if neither was found - if(!f_sd && !m_sd) { - clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); - map->freeblock_unlock(); - return 0; + bool we_baby_parents = false; + if(m_sd && check_distance_bl(bl,&m_sd->bl,AREA_SIZE)) { + sc_start(&m_sd->bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)); + clif->specialeffect(&m_sd->bl,408,AREA); + we_baby_parents = true; } - status->change_start(bl,SC_STUN,10000,skill_lv,0,0,0,skill->get_time2(skill_id,skill_lv),8); - if (f_sd) { + if(f_sd && check_distance_bl(bl,&f_sd->bl,AREA_SIZE)) { sc_start(&f_sd->bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)); clif->specialeffect(&f_sd->bl,408,AREA); + we_baby_parents = true; } - if (m_sd) { - sc_start(&m_sd->bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)); - clif->specialeffect(&m_sd->bl,408,AREA); + if (!we_baby_parents) { + clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + map->freeblock_unlock(); + return 0; } + else status->change_start(bl,SC_STUN,10000,skill_lv,0,0,0,skill->get_time2(skill_id,skill_lv),8); } break; |