summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-03 21:47:47 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-03 21:47:47 +0000
commit9aff15a57af029d3ec66fa9a038cdb4ba265ce3e (patch)
treef044ec66c090d7397703498a5aff3d13507da5ad /src/map/atcommand.c
parentb61a1f62f63da6ff26f8913bc58573e480ac436b (diff)
downloadhercules-9aff15a57af029d3ec66fa9a038cdb4ba265ce3e.tar.gz
hercules-9aff15a57af029d3ec66fa9a038cdb4ba265ce3e.tar.bz2
hercules-9aff15a57af029d3ec66fa9a038cdb4ba265ce3e.tar.xz
hercules-9aff15a57af029d3ec66fa9a038cdb4ba265ce3e.zip
* Moved the homunculus shuffle code to mercenary.c, fixing the bug in the atcommand not using the bonus evolution stats for homunculus.
* Added a new script command "homshuffle" to reset the homunculus stats using NPC. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11350 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index da70bbd06..d72342e0a 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8137,7 +8137,7 @@ static int atshowmobs_sub(struct block_list *bl,va_list ap)
md = (struct mob_data *)bl;
- if(md->special_state.ai || md->master_id)
+ if(md->special_state.ai || md->master_id)
return 0; //Hide slaves and player summoned mobs. [Skotlex]
if(fd && (mob_id==-1 || (md->class_==mob_id))){
@@ -8466,9 +8466,6 @@ int atcommand_homstats(const int fd, struct map_session_data* sd, const char* co
int atcommand_homshuffle(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
struct homun_data *hd;
- int lv, i, skillpts;
- unsigned int exp;
- struct skill b_skill[MAX_HOMUNSKILL];
TBL_PC* tsd = sd;
nullpo_retr(-1, sd);
@@ -8492,28 +8489,10 @@ int atcommand_homshuffle(const int fd, struct map_session_data* sd, const char*
}
hd = tsd->hd;
- if(!merc_is_hom_active(hd))
+
+ if(!merc_hom_shuffle(hd))
return -1;
-
- lv = hd->homunculus.level;
- exp = hd->homunculus.exp;
- memcpy(&b_skill, &hd->homunculus.hskill, sizeof(b_skill));
- skillpts = hd->homunculus.skillpts;
- //Reset values to level 1.
- merc_reset_stats(hd);
- //Level it back up
- for (i = 1; i < lv && hd->exp_next; i++){
- hd->homunculus.exp += hd->exp_next;
- merc_hom_levelup(hd);
- }
- hd->homunculus.exp = exp;
- memcpy(&hd->homunculus.hskill, &b_skill, sizeof(b_skill));
- hd->homunculus.skillpts = skillpts;
- clif_homskillinfoblock(hd->master);
- status_calc_homunculus(hd,0);
- status_percent_heal(&hd->bl, 100, 100);
- clif_misceffect2(&hd->bl,568);
- clif_displaymessage(fd, "Homunculus stats altered");
+
//Print out the new stats
//This will send the commands to the invoker since they all use this fd regardless of sd value.
atcommand_homstats(fd, tsd, command, message);