From fefc60d0a202e489ebc0d999f13a0abcc638518a Mon Sep 17 00:00:00 2001 From: ultramage Date: Wed, 14 Nov 2007 09:31:47 +0000 Subject: 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 --- src/map/mercenary.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/mercenary.c') 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] -- cgit v1.2.3-70-g09d2