diff options
author | dastgirpojee <dastgirpojee@rocketmail.com> | 2013-10-11 10:46:32 -0700 |
---|---|---|
committer | dastgirpojee <dastgirpojee@rocketmail.com> | 2013-10-11 10:46:32 -0700 |
commit | d3d3fcdb60a03749aa927c4d9b8bf1e710e3d3b6 (patch) | |
tree | 7a50cf8fcc99e189c856dbf4c2ef1403e93f0711 /src/map/skill.c | |
parent | e105044ee8c1c625b886e2306c22a3f8a68f5bf5 (diff) | |
parent | 231f7a4f31b27611af7006e3adc2d3c046356fd3 (diff) | |
download | hercules-d3d3fcdb60a03749aa927c4d9b8bf1e710e3d3b6.tar.gz hercules-d3d3fcdb60a03749aa927c4d9b8bf1e710e3d3b6.tar.bz2 hercules-d3d3fcdb60a03749aa927c4d9b8bf1e710e3d3b6.tar.xz hercules-d3d3fcdb60a03749aa927c4d9b8bf1e710e3d3b6.zip |
Merge pull request #3 from HerculesWS/master
Herc Merge
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 248e19e77..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; @@ -7516,7 +7518,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case AM_REST: if (sd) { - if (homun->vaporize(sd,1)) + if (homun->vaporize(sd,HOM_ST_REST)) clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); else clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); |