summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-18 19:30:22 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-18 19:30:22 +0000
commitc84d6f0062cefc26af7a4d55336bc06c68a15ac3 (patch)
treee7294df5fa57a22e78a2905025100ab438627d78 /src/map/mercenary.c
parent80342514a6d3370029d6017428afdacce220fc17 (diff)
downloadhercules-c84d6f0062cefc26af7a4d55336bc06c68a15ac3.tar.gz
hercules-c84d6f0062cefc26af7a4d55336bc06c68a15ac3.tar.bz2
hercules-c84d6f0062cefc26af7a4d55336bc06c68a15ac3.tar.xz
hercules-c84d6f0062cefc26af7a4d55336bc06c68a15ac3.zip
- Modified the Storm Gust freeze counter code. It now takes into consideration the ID of the skill before increasing the counter, which should effectively yield the closest aproximation to official (even though the counter will reset if you step out of a SG and into another one, we do not know yet what should happen in such a case).
- Added @homshuffle. It recalculates the homunculus stats, as if the homunc was sent back to level 1, and then releveled. This command is mean to help fix those previously created Homunculus that are much stronger than they should be. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9671 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 3d82e7f99..61df02132 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -730,6 +730,26 @@ void merc_hom_revive(struct homun_data *hd, unsigned int hp, unsigned int sp)
clif_homskillinfoblock(sd);
}
+void merc_reset_stats(struct homun_data *hd)
+{ //Resets a homunc stats back to zero (but doesn't touches hunger or intimacy)
+ struct homunculus_db *db;
+ struct s_homunculus *hom;
+ hom = &hd->homunculus;
+ db = hd->homunculusDB;
+ hom->level = 1;
+ hom->hp = 10;
+ hom->max_hp = db->basemaxHP;
+ hom->max_sp = db->basemaxSP;
+ hom->str = db->baseSTR*10;
+ hom->agi = db->baseAGI*10;
+ hom->vit = db->baseVIT*10;
+ hom->int_= db->baseINT*10;
+ hom->dex = db->baseDEX*10;
+ hom->luk = db->baseLUK*10;
+ hom->exp = 0;
+ hd->exp_next = hexptbl[0];
+}
+
int read_homunculusdb(void)
{
FILE *fp;