diff options
author | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-19 21:04:17 +0000 |
---|---|---|
committer | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-19 21:04:17 +0000 |
commit | 4e8b55b30bdfd9c3a71ef3c21b40fd22f11320e6 (patch) | |
tree | 234fe50fe3a00c626057b8bba8c7e43b59f70520 /src/map/skill.c | |
parent | a49f930a9b8e423d2a87c3472950863dcc523b88 (diff) | |
download | hercules-4e8b55b30bdfd9c3a71ef3c21b40fd22f11320e6.tar.gz hercules-4e8b55b30bdfd9c3a71ef3c21b40fd22f11320e6.tar.bz2 hercules-4e8b55b30bdfd9c3a71ef3c21b40fd22f11320e6.tar.xz hercules-4e8b55b30bdfd9c3a71ef3c21b40fd22f11320e6.zip |
- Fixed @homlvup bug
- Fixed AM_REST & AM_RESU consumming SP if they fail
- Fixed homunc spawning bug
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8375 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index beaa78e08..feaa6b026 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8349,6 +8349,20 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t if (sd->status.hom_id) //Don't delete items when hom is already out. checkitem_flag = delitem_flag = 0; break; + case AM_REST: //Can't vapo homun if you don't have an active homunc or it's hp is < 80% + if (!merc_is_hom_active(sd->hd) || sd->hd->battle_status.hp < (sd->hd->battle_status.max_hp*80/100)) + { + clif_skill_fail(sd,skill,0,0); + return 0; + } + break; + case AM_RESURRECTHOMUN: // Can't resurrect homun if you don't have a dead homun + if (!sd->status.hom_id || sd->homunculus.vaporize || !sd->hd || sd->hd->battle_status.hp) + { + clif_skill_fail(sd,skill,0,0); + return 0; + } + break; } if(!(type&2)){ |