summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/skill.c14
5 files changed, 20 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 68c3f5780..79ecba624 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,9 @@ 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/19
+ * Fixed @homlvup bug [Toms]
+ * Fixed AM_REST & AM_RESU consumming SP if they fail [Toms]
+ * Fixed homunc spawning bug (they was spawned after an AM_REST + master warp for example)[Toms]
* Fixed GS_GROUNDDRIFT [Skotlex]
* Increased chance of GS_DESPERADO connecting to 20% [Skotlex]
* Fixed battle_calc_base_damage being called for the left hand even for
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 00bc9dd39..5c9983700 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9783,7 +9783,7 @@ int atcommand_homlevel(
if (!message || !*message)
return -1;
- if ( sd->status.hom_id == 0 || !sd->homunculus.hp || sd->homunculus.vaporize )
+ if ( !merc_is_hom_active(sd->hd) )
return 1 ;
level = atoi(message);
diff --git a/src/map/clif.c b/src/map/clif.c
index 4537deb26..bbf7370ce 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8289,7 +8289,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
}
//homunculus [blackhole89]
- if(sd->hd && sd->hd->battle_status.hp) {
+ if(merc_is_hom_active(sd->hd)) {
map_addblock(&sd->hd->bl);
clif_spawn(&sd->hd->bl);
// clif_homunack(sd);
diff --git a/src/map/pc.c b/src/map/pc.c
index 6dc4ad33a..a241f8c9e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3368,7 +3368,7 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
sd->pd->ud.dir = sd->ud.dir;
}
- if(sd->status.hom_id > 0 && sd->hd ) { //orn
+ if(sd->status.hom_id > 0 && merc_is_hom_active(sd->hd)) { //orn
sd->hd->bl.m = m;
sd->hd->bl.x = sd->hd->ud.to_x = x;
sd->hd->bl.y = sd->hd->ud.to_y = y;
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)){