diff options
author | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-12 00:06:25 +0000 |
---|---|---|
committer | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-12 00:06:25 +0000 |
commit | ae57ff81700dbe6714ef107b34510457e9c9c5b6 (patch) | |
tree | e624b5ac4214e5ac9e00aee596055ce19ff95be5 /src/map/homunculus.c | |
parent | 20e444cce123f97b5e2d60cfb4c134c08479fb41 (diff) | |
download | hercules-ae57ff81700dbe6714ef107b34510457e9c9c5b6.tar.gz hercules-ae57ff81700dbe6714ef107b34510457e9c9c5b6.tar.bz2 hercules-ae57ff81700dbe6714ef107b34510457e9c9c5b6.tar.xz hercules-ae57ff81700dbe6714ef107b34510457e9c9c5b6.zip |
-Add Homon-S skills, 1st implementation (all done except Eleanors)
--Upd Skill conf to set land-limit for homonculus by default (ground skill limit)
--Mv MH_HEILIGE_STANGE and MH_ANGRIFFS_MODUS skill from Eleanor to Bayeri
-Enforce all zeny transaction to use pc_payzeny and pc_getzeny handlers, (auto log and clif)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16914 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/homunculus.c')
-rw-r--r-- | src/map/homunculus.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 081e7078e..0bb41ebe4 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -81,6 +81,46 @@ int hom_class2mapid(int hom_class) } } +int hom_addspiritball(TBL_HOM *hd, int max) { + nullpo_ret(hd); + + if (max > MAX_SKILL_LEVEL) + max = MAX_SKILL_LEVEL; + if (hd->spiritball < 0) + hd->spiritball = 0; + + if (hd->spiritball && hd->spiritball >= max) { + hd->spiritball = max; + } + else + hd->spiritball++; + + clif_spiritball(&hd->bl); + + return 0; +} + +int hom_delspiritball(TBL_HOM *hd, int count, int type) { + nullpo_ret(hd); + + if (hd->spiritball <= 0) { + hd->spiritball = 0; + return 0; + } + if (count <= 0) + return 0; + if (count > MAX_SKILL_LEVEL) + count = MAX_SKILL_LEVEL; + if (count > hd->spiritball) + count = hd->spiritball; + + hd->spiritball -= count; + if (!type) + clif_spiritball(&hd->bl); + + return 0; +} + void merc_damage(struct homun_data *hd) { clif_hominfo(hd->master,hd,0); } |