summaryrefslogtreecommitdiff
path: root/src/map/charcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-30 04:39:59 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-30 04:39:59 +0000
commit8ec06e1832af8a2f68bd8d79b7ade09d861a2dea (patch)
tree825a318c8d4496eafa5af8edb785700fee0babbc /src/map/charcommand.c
parentd35ff1c213b7d77cc45c037e950a180c08279cd6 (diff)
downloadhercules-8ec06e1832af8a2f68bd8d79b7ade09d861a2dea.tar.gz
hercules-8ec06e1832af8a2f68bd8d79b7ade09d861a2dea.tar.bz2
hercules-8ec06e1832af8a2f68bd8d79b7ade09d861a2dea.tar.xz
hercules-8ec06e1832af8a2f68bd8d79b7ade09d861a2dea.zip
- Cleaned up a bit the homunculus evolution code, and fixed homevolution allowing the homunc to 're-evolve' even though it was already evolved.
- Optimized a bit the skillheal code in regards to Apple of Idun and Sanctuary git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11090 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charcommand.c')
-rw-r--r--src/map/charcommand.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index 9154048ac..505bf3d37 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -3755,24 +3755,20 @@ int charcommand_homevolution(const int fd, struct map_session_data* sd, const ch
return -1;
}
- if (pl_sd->hd)
- {
- if (pl_sd->hd->homunculusDB->evo_class)
- {
- merc_hom_evolution(pl_sd->hd);
- clif_displaymessage(pl_sd->fd, "Homunculus evolution initiated.");
- if (pl_sd->fd != fd)
- clif_displaymessage(fd, "Homunculus evolution initiated.");
- return 0;
- }
- clif_displaymessage(fd, "Target homunculus cannot evolve.");
+ if ( !merc_is_hom_active(pl_sd->hd) ) {
+ clif_displaymessage(fd, "Target player does not have a homunculus.");
return -1;
}
- else
- {
- clif_displaymessage(fd, "Target player does not have a homunculus.");
+
+ if ( !merc_hom_evolution(pl_sd->hd) ) {
+ clif_displaymessage(fd, "Target homunculus cannot evolve.");
+ return -1;
}
- return -1;
+
+ clif_displaymessage(pl_sd->fd, "Homunculus evolution initiated.");
+ if (pl_sd->fd != fd)
+ clif_displaymessage(fd, "Homunculus evolution initiated.");
+ return 0;
}
/*==========================================