From 4e8b55b30bdfd9c3a71ef3c21b40fd22f11320e6 Mon Sep 17 00:00:00 2001 From: toms Date: Sat, 19 Aug 2006 21:04:17 +0000 Subject: - 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 --- src/map/skill.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/map/skill.c') 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)){ -- cgit v1.2.3-70-g09d2