summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-09 22:17:09 +0000
committertoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-09 22:17:09 +0000
commit7586b8e83201e23930b99e5a84986d66f093dc89 (patch)
tree9cfeae746df94895846f64d6ed6914601baa724a /src
parentda078045d5191ae94477dab8ac31600bf833c95f (diff)
downloadhercules-7586b8e83201e23930b99e5a84986d66f093dc89.tar.gz
hercules-7586b8e83201e23930b99e5a84986d66f093dc89.tar.bz2
hercules-7586b8e83201e23930b99e5a84986d66f093dc89.tar.xz
hercules-7586b8e83201e23930b99e5a84986d66f093dc89.zip
Fixed homunc skill up bug
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8215 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/mercenary.h1
3 files changed, 5 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index d1a0f49af..ada55e050 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1531,7 +1531,7 @@ int clif_homskillinfoblock(struct map_session_data *sd) { //[orn]
WFIFOW(fd,len+8) = skill_get_sp(id,sd->homunculus.hskill[j].lv) ;
WFIFOW(fd,len+10)= skill_get_range2(&sd->hd->bl, id,sd->homunculus.hskill[j].lv) ;
strncpy(WFIFOP(fd,len+12), skill_get_name(id), NAME_LENGTH) ;
- WFIFOB(fd,len+36) = 1;//0;
+ WFIFOB(fd,len+36) = (sd->homunculus.hskill[j].lv < merc_skill_tree_get_max(id, sd->homunculus.class_))?1:0;
len+=37;
c++;
}
@@ -1546,10 +1546,10 @@ void clif_homskillup(struct map_session_data *sd, int skill_num) { //[orn]
int range,fd,skillid;
nullpo_retv(sd);
- skillid = skill_num - HM_SKILLBASE ;
+ skillid = skill_num - HM_SKILLBASE - 1;
fd=sd->fd;
- WFIFOW(fd,0) = 0x10e;
+ WFIFOW(fd,0) = 0x239;
WFIFOW(fd,2) = skill_num;
WFIFOW(fd,4) = sd->homunculus.hskill[skillid].lv;
WFIFOW(fd,6) = skill_get_sp(skill_num,sd->homunculus.hskill[skillid].lv);
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index f8083455f..47c2ca686 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -186,7 +186,7 @@ int merc_hom_checkskill(struct map_session_data *sd,int skill_id)
return 0;
}
-static int merc_skill_tree_get_max(int id, int b_class){
+int merc_skill_tree_get_max(int id, int b_class){
int i, skillid;
for(i=0;(skillid=hskill_tree[b_class-6001][i].id)>0;i++)
if (id == skillid) return hskill_tree[b_class-6001][i].max;
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 41f5540de..2fee6a0c9 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -78,3 +78,4 @@ int merc_natural_heal_timer_delete(struct homun_data *hd);
int read_homunculusdb(void);
int merc_hom_increase_intimacy(struct homun_data * hd, unsigned int value);
int merc_hom_decrease_intimacy(struct homun_data * hd, unsigned int value);
+int merc_skill_tree_get_max(int id, int b_class); \ No newline at end of file