summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-20 08:14:40 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-20 08:14:40 +0000
commit8f1cae217b2ddf1d893ab4dd7456f8c7f4f5dcac (patch)
treede6ff214d370dd184eb07386393ca1dc19ca8e2e /src/map/atcommand.c
parentce4bf096296c2e96d506901a6273a3a47071f74c (diff)
downloadhercules-8f1cae217b2ddf1d893ab4dd7456f8c7f4f5dcac.tar.gz
hercules-8f1cae217b2ddf1d893ab4dd7456f8c7f4f5dcac.tar.bz2
hercules-8f1cae217b2ddf1d893ab4dd7456f8c7f4f5dcac.tar.xz
hercules-8f1cae217b2ddf1d893ab4dd7456f8c7f4f5dcac.zip
- Updated merc_reset_stats to handle resetting skill tree and points as well.
- Updated @homshuffle so that the skill tree and current skill points are not messed up. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9678 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index f4be3b421..4f821d3f1 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -10012,8 +10012,9 @@ int atcommand_homshuffle(
const char* command, const char* message)
{
struct homun_data *hd;
- int lv, i;
+ int lv, i, skillpts;
unsigned int exp;
+ struct skill b_skill;
TBL_PC* tsd = sd;
nullpo_retr(-1, sd);
@@ -10042,6 +10043,8 @@ int atcommand_homshuffle(
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
@@ -10050,6 +10053,8 @@ int atcommand_homshuffle(
merc_hom_levelup(hd);
}
hd->homunculus.exp = exp;
+ memcpy(&hd->homunculus.hskill, &b_skill, sizeof(b_skill));
+ hd->homunculus.skillpts = skillpts;
status_calc_homunculus(hd,0);
status_percent_heal(&hd->bl, 100, 100);
clif_misceffect2(&hd->bl,568);