summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-14 09:31:47 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-14 09:31:47 +0000
commitfefc60d0a202e489ebc0d999f13a0abcc638518a (patch)
treefba77837fbe8e56d7f71cd3a83716a231ba993b6 /src/map/mercenary.c
parente932e59a70601716c75daffa6cc43cbfcf0e2334 (diff)
downloadhercules-fefc60d0a202e489ebc0d999f13a0abcc638518a.tar.gz
hercules-fefc60d0a202e489ebc0d999f13a0abcc638518a.tar.bz2
hercules-fefc60d0a202e489ebc0d999f13a0abcc638518a.tar.xz
hercules-fefc60d0a202e489ebc0d999f13a0abcc638518a.zip
Fixed some homunculus skill offset calculation mistakes (bugreport:363)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11731 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index ad30afa2c..f0cca5182 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -143,7 +143,7 @@ int merc_hom_calc_skilltree(struct homun_data *hd)
for(i=0;i < MAX_SKILL_TREE && (id = hskill_tree[c][i].id) > 0;i++)
{
- if(hd->homunculus.hskill[id-HM_SKILLBASE-1].id)
+ if(hd->homunculus.hskill[id-HM_SKILLBASE].id)
continue; //Skill already known.
if(!battle_config.skillfree)
{
@@ -158,14 +158,14 @@ int merc_hom_calc_skilltree(struct homun_data *hd)
}
}
if (f)
- hd->homunculus.hskill[id-HM_SKILLBASE-1].id = id ;
+ hd->homunculus.hskill[id-HM_SKILLBASE].id = id ;
}
return 0;
}
int merc_hom_checkskill(struct homun_data *hd,int skill_id)
{
- int i = skill_id - HM_SKILLBASE - 1;
+ int i = skill_id - HM_SKILLBASE;
if(!hd)
return 0;
@@ -192,7 +192,7 @@ void merc_hom_skillup(struct homun_data *hd,int skillnum)
if(hd->homunculus.vaporize)
return;
- i = skillnum - HM_SKILLBASE - 1;
+ i = skillnum - HM_SKILLBASE;
if(hd->homunculus.skillpts > 0 &&
hd->homunculus.hskill[i].id &&
hd->homunculus.hskill[i].flag == 0 && //Don't allow raising while you have granted skills. [Skotlex]