Quellcode durchsuchen

Fixed AM_RESURRECTION, thanks to RockmanEXE for %HP values

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8409 54d463be-8e91-2dee-dedb-b68131a5f0ec
toms vor 19 Jahren
Ursprung
Commit
9788569dae
4 geänderte Dateien mit 13 neuen und 4 gelöschten Zeilen
  1. 1 0
      Changelog-Trunk.txt
  2. 1 1
      db/skill_db.txt
  3. 3 1
      src/map/mercenary.c
  4. 8 2
      src/map/skill.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/08/21
+	* Fixed AM_RESURRECTION, thanks to RockmanEXE for %HP values [Toms]
 	* Fixed HAMI_CASTLE, HAMI_DEFENCE & HLIF_AVOID [Toms]
 	* Adjusted Glittering's success rate to 20+10*lv% [Skotlex]
 	* Corrected isequipped() so that cards will not be tagged as "used up"

+ 1 - 1
db/skill_db.txt

@@ -270,7 +270,7 @@
 244,0,0,4,0,1,0,1,0,no,0,0,0,none,0	//AM_REST#Peaceful Rest#
 //245,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//AM_DRILLMASTER#Drillmaster#
 //246,9,0,0,0,0,0,10,0,no,0,0,0,none,0	//AM_HEALHOMUN#Heal Homunculus#
-247,9,6,4,0,1,0,5,0,no,0,0,0,none,0	//AM_RESURRECTHOMUN#Ressurect Homunculus#
+247,9,6,4,0,1,1,5,0,no,0,0,0,none,0	//AM_RESURRECTHOMUN#Ressurect Homunculus#
 248,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//CR_TRUST#Faith#
 249,0,6,4,0,1,0,10,1,no,0,0,0,weapon,0	//CR_AUTOGUARD#Guard#
 250,3,6,1,0,0,0,5,1,no,0,0,0,weapon,5:6:7:8:9	//CR_SHIELDCHARGE#Smite#

+ 3 - 1
src/map/mercenary.c

@@ -820,7 +820,9 @@ int merc_revive_homunculus(struct map_session_data *sd, unsigned char per, short
 		map_addblock(&sd->hd->bl);
 		clif_spawn(&sd->hd->bl);
 	}
-	return status_revive(&hd->bl, per, 0);
+	status_revive(&hd->bl, per, 0);
+	sd->homunculus.hp = hd->battle_status.hp;
+	return 1;
 }
 
 void merc_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp)

+ 8 - 2
src/map/skill.c

@@ -6287,8 +6287,14 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
 	case AM_RESURRECTHOMUN:	//[orn]
 		if (sd)
 		{
+			int p;
+			// If skilllv = 1, range = 1~4%, lv 2 : 5~25%, lv 3 : 25~45%, ...
+			if (skilllv == 1)
+				p = 1 + rand() % 4;
+			else
+				p = 5 + 20 * (skilllv - 2) + rand() % 21;
 			if (map_flag_gvg(src->m) || //No reviving in WoE grounds!
-				!merc_revive_homunculus(sd, 10*skilllv, x, y))
+				!merc_revive_homunculus(sd, p, x, y))
 			{
 				clif_skill_fail(sd,skillid,0,0);
 				break;
@@ -8350,7 +8356,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
 		}
 		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)
+		if (!sd->status.hom_id || sd->homunculus.hp)
 		{
 			clif_skill_fail(sd,skill,0,0);
 			return 0;