summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-23 18:15:21 +0000
committermomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-23 18:15:21 +0000
commitefbd5d0dd7dbf038333d65d59d0becad59e6e2a4 (patch)
treed5b149d3025ef79222eeaa6c34eb976799649b02
parent7298dd6e6f12729de1571628781c3945ae86f31e (diff)
downloadhercules-efbd5d0dd7dbf038333d65d59d0becad59e6e2a4.tar.gz
hercules-efbd5d0dd7dbf038333d65d59d0becad59e6e2a4.tar.bz2
hercules-efbd5d0dd7dbf038333d65d59d0becad59e6e2a4.tar.xz
hercules-efbd5d0dd7dbf038333d65d59d0becad59e6e2a4.zip
Partial fix for bugreport:4337.
A new field was added to homun_skill_tree.txt containing the minimum level of intimacy to unlock a skill. This is used in some skills where the homunculus has to reach a amount of 910 of intimacy. The default value is 0 and it should only affect evolved homunculus. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16954 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--db/homun_skill_tree.txt167
-rw-r--r--src/map/clif.c3
-rw-r--r--src/map/homunculus.c15
-rw-r--r--src/map/homunculus.h14
-rw-r--r--src/map/status.c2
5 files changed, 111 insertions, 90 deletions
diff --git a/db/homun_skill_tree.txt b/db/homun_skill_tree.txt
index 1b21a39ba..a64768490 100644
--- a/db/homun_skill_tree.txt
+++ b/db/homun_skill_tree.txt
@@ -1,7 +1,7 @@
// Homunculus Skill Tree Database
//
// Structure of Database:
-// Class,SkillID,MaxLv[,JobLevel],Prerequisite SkillID1,Prerequisite SkillLv1,PrereqSkillID2,PrereqSkillLv2,PrereqSkillID3,PrereqSkillLv3,PrereqSkillID4,PrereqSkillLv4,PrereqSkillID5,PrereqSkillLv5 //SKILLNAME#Skill Name#
+// Class,SkillID,MaxLv[,JobLevel],Prerequisite SkillID1,Prerequisite SkillLv1,PrereqSkillID2,PrereqSkillLv2,PrereqSkillID3,PrereqSkillLv3,PrereqSkillID4,PrereqSkillLv4,PrereqSkillID5,PrereqSkillLv5,IntimacyLvReq //SKILLNAME#Skill Name#
//
// 01. Class Homunculus ID.
// 02. SkillID Skill ID of the homunuculus skill.
@@ -10,109 +10,110 @@
// 05. Prerequisite SkillID Homunculus skill required for the skill to become available.
// 06. Prerequisite SkillLv Level of the required homunculus skill.
// ...
+// 15. IntimacyLvReq Minimum level of intimacy to unlock skill.
//
// NOTE: MAX_PC_SKILL_REQUIRE (typically 5) ID/Lv pairs must be specified.
//Lif
-6001,8001,5,0,0,0,0,0,0,0,0,0,0 //HLIF_HEAL
-6001,8002,5,8001,3,0,0,0,0,0,0,0,0 //HLIF_AVOID
-6001,8003,5,8001,5,0,0,0,0,0,0,0,0 //HLIF_BRAIN
+6001,8001,5,0,0,0,0,0,0,0,0,0,0,0 //HLIF_HEAL
+6001,8002,5,8001,3,0,0,0,0,0,0,0,0,0 //HLIF_AVOID
+6001,8003,5,8001,5,0,0,0,0,0,0,0,0,0 //HLIF_BRAIN
//Amistr
-6002,8005,5,0,0,0,0,0,0,0,0,0,0 //HAMI_CASTLE
-6002,8006,5,8005,5,0,0,0,0,0,0,0,0 //HAMI_DEFENCE
-6002,8007,5,8006,3,0,0,0,0,0,0,0,0 //HAMI_SKIN
+6002,8005,5,0,0,0,0,0,0,0,0,0,0,0 //HAMI_CASTLE
+6002,8006,5,8005,5,0,0,0,0,0,0,0,0,0 //HAMI_DEFENCE
+6002,8007,5,8006,3,0,0,0,0,0,0,0,0,0 //HAMI_SKIN
//Filir
-6003,8009,5,0,0,0,0,0,0,0,0,0,0 //HFLI_MOON
-6003,8010,5,8009,3,0,0,0,0,0,0,0,0 //HFLI_FLEET
-6003,8011,5,8010,3,0,0,0,0,0,0,0,0 //HFLI_SPEED
+6003,8009,5,0,0,0,0,0,0,0,0,0,0,0 //HFLI_MOON
+6003,8010,5,8009,3,0,0,0,0,0,0,0,0,0 //HFLI_FLEET
+6003,8011,5,8010,3,0,0,0,0,0,0,0,0,0 //HFLI_SPEED
//Vanilmirth
-6004,8013,5,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
-6004,8014,5,8013,3,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
-6004,8015,5,8013,5,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
+6004,8013,5,0,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
+6004,8014,5,8013,3,0,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
+6004,8015,5,8013,5,0,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
//Lif2
-6005,8001,5,0,0,0,0,0,0,0,0,0,0 //HLIF_HEAL
-6005,8002,5,8001,3,0,0,0,0,0,0,0,0 //HLIF_AVOID
-6005,8003,5,8001,5,0,0,0,0,0,0,0,0 //HLIF_BRAIN
+6005,8001,5,0,0,0,0,0,0,0,0,0,0,0 //HLIF_HEAL
+6005,8002,5,8001,3,0,0,0,0,0,0,0,0,0 //HLIF_AVOID
+6005,8003,5,8001,5,0,0,0,0,0,0,0,0,0 //HLIF_BRAIN
//Amistr2
-6006,8005,5,0,0,0,0,0,0,0,0,0,0 //HAMI_CASTLE
-6006,8006,5,8005,5,0,0,0,0,0,0,0,0 //HAMI_DEFENCE
-6006,8007,5,8006,3,0,0,0,0,0,0,0,0 //HAMI_SKIN
+6006,8005,5,0,0,0,0,0,0,0,0,0,0,0 //HAMI_CASTLE
+6006,8006,5,8005,5,0,0,0,0,0,0,0,0,0 //HAMI_DEFENCE
+6006,8007,5,8006,3,0,0,0,0,0,0,0,0,0 //HAMI_SKIN
//Filir2
-6007,8009,5,0,0,0,0,0,0,0,0,0,0 //HFLI_MOON
-6007,8010,5,8009,3,0,0,0,0,0,0,0,0 //HFLI_FLEET
-6007,8011,5,8010,3,0,0,0,0,0,0,0,0 //HFLI_SPEED
+6007,8009,5,0,0,0,0,0,0,0,0,0,0,0 //HFLI_MOON
+6007,8010,5,8009,3,0,0,0,0,0,0,0,0,0 //HFLI_FLEET
+6007,8011,5,8010,3,0,0,0,0,0,0,0,0,0 //HFLI_SPEED
//Vanilmirth2
-6008,8013,5,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
-6008,8014,5,8013,3,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
-6008,8015,5,8013,5,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
+6008,8013,5,0,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
+6008,8014,5,8013,3,0,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
+6008,8015,5,8013,5,0,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
//Lif_H
-6009,8001,5,0,0,0,0,0,0,0,0,0,0 //HLIF_HEAL
-6009,8002,5,8001,3,0,0,0,0,0,0,0,0 //HLIF_AVOID
-6009,8003,5,8001,5,0,0,0,0,0,0,0,0 //HLIF_BRAIN
-6009,8004,3,0,0,0,0,0,0,0,0,0,0 //HLIF_CHANGE
+6009,8001,5,0,0,0,0,0,0,0,0,0,0,0 //HLIF_HEAL
+6009,8002,5,8001,3,0,0,0,0,0,0,0,0,0 //HLIF_AVOID
+6009,8003,5,8001,5,0,0,0,0,0,0,0,0,0 //HLIF_BRAIN
+6009,8004,3,0,0,0,0,0,0,0,0,0,0,910 //HLIF_CHANGE
//Amistr_H
-6010,8005,5,0,0,0,0,0,0,0,0,0,0 //HAMI_CASTLE
-6010,8006,5,8005,5,0,0,0,0,0,0,0,0 //HAMI_DEFENCE
-6010,8007,5,8006,3,0,0,0,0,0,0,0,0 //HAMI_SKIN
-6010,8008,3,0,0,0,0,0,0,0,0,0,0 //HAMI_BLOODLUST
+6010,8005,5,0,0,0,0,0,0,0,0,0,0,0 //HAMI_CASTLE
+6010,8006,5,8005,5,0,0,0,0,0,0,0,0,0 //HAMI_DEFENCE
+6010,8007,5,8006,3,0,0,0,0,0,0,0,0,0 //HAMI_SKIN
+6010,8008,3,0,0,0,0,0,0,0,0,0,0,910 //HAMI_BLOODLUST
//Filir_H
-6011,8009,5,0,0,0,0,0,0,0,0,0,0 //HFLI_MOON
-6011,8010,5,8009,3,0,0,0,0,0,0,0,0 //HFLI_FLEET
-6011,8011,5,8010,3,0,0,0,0,0,0,0,0 //HFLI_SPEED
-6011,8012,3,0,0,0,0,0,0,0,0,0,0 //HFLI_SBR44
+6011,8009,5,0,0,0,0,0,0,0,0,0,0,0 //HFLI_MOON
+6011,8010,5,8009,3,0,0,0,0,0,0,0,0,0 //HFLI_FLEET
+6011,8011,5,8010,3,0,0,0,0,0,0,0,0,0 //HFLI_SPEED
+6011,8012,3,0,0,0,0,0,0,0,0,0,0,910 //HFLI_SBR44
//Vanilmirth_H
-6012,8013,5,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
-6012,8014,5,8013,3,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
-6012,8015,5,8013,5,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
-6012,8016,3,0,0,0,0,0,0,0,0,0,0 //HVAN_EXPLOSION
+6012,8013,5,0,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
+6012,8014,5,8013,3,0,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
+6012,8015,5,8013,5,0,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
+6012,8016,3,0,0,0,0,0,0,0,0,0,0,910 //HVAN_EXPLOSION
//Lif2_H
-6013,8001,5,0,0,0,0,0,0,0,0,0,0 //HLIF_HEAL
-6013,8002,5,8001,3,0,0,0,0,0,0,0,0 //HLIF_AVOID
-6013,8003,5,8001,5,0,0,0,0,0,0,0,0 //HLIF_BRAIN
-6013,8004,3,0,0,0,0,0,0,0,0,0,0 //HLIF_CHANGE
+6013,8001,5,0,0,0,0,0,0,0,0,0,0,0 //HLIF_HEAL
+6013,8002,5,8001,3,0,0,0,0,0,0,0,0,0 //HLIF_AVOID
+6013,8003,5,8001,5,0,0,0,0,0,0,0,0,0 //HLIF_BRAIN
+6013,8004,3,0,0,0,0,0,0,0,0,0,0,910 //HLIF_CHANGE
//Amistr2_H
-6014,8005,5,0,0,0,0,0,0,0,0,0,0 //HAMI_CASTLE
-6014,8006,5,8005,5,0,0,0,0,0,0,0,0 //HAMI_DEFENCE
-6014,8007,5,8006,3,0,0,0,0,0,0,0,0 //HAMI_SKIN
-6014,8008,3,0,0,0,0,0,0,0,0,0,0 //HAMI_BLOODLUST
+6014,8005,5,0,0,0,0,0,0,0,0,0,0,0 //HAMI_CASTLE
+6014,8006,5,8005,5,0,0,0,0,0,0,0,0,0 //HAMI_DEFENCE
+6014,8007,5,8006,3,0,0,0,0,0,0,0,0,0 //HAMI_SKIN
+6014,8008,3,0,0,0,0,0,0,0,0,0,0,910 //HAMI_BLOODLUST
//Filir2_H
-6015,8009,5,0,0,0,0,0,0,0,0,0,0 //HFLI_MOON
-6015,8010,5,8009,3,0,0,0,0,0,0,0,0 //HFLI_FLEET
-6015,8011,5,8010,3,0,0,0,0,0,0,0,0 //HFLI_SPEED
-6015,8012,3,0,0,0,0,0,0,0,0,0,0 //HFLI_SBR44
+6015,8009,5,0,0,0,0,0,0,0,0,0,0,0 //HFLI_MOON
+6015,8010,5,8009,3,0,0,0,0,0,0,0,0,0 //HFLI_FLEET
+6015,8011,5,8010,3,0,0,0,0,0,0,0,0,0 //HFLI_SPEED
+6015,8012,3,0,0,0,0,0,0,0,0,0,0,910 //HFLI_SBR44
//Vanilmirth2_H
-6016,8013,5,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
-6016,8014,5,8013,3,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
-6016,8015,5,8013,5,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
-6016,8016,3,0,0,0,0,0,0,0,0,0,0 //HVAN_EXPLOSION
+6016,8013,5,0,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
+6016,8014,5,8013,3,0,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
+6016,8015,5,8013,5,0,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
+6016,8016,3,0,0,0,0,0,0,0,0,0,0,910 //HVAN_EXPLOSION
//Eira
-6048,8022,5,0,0,0,0,0,0,0,0,0,0 //MH_LIGHT_OF_REGENE
-6048,8023,5,0,0,0,0,0,0,0,0,0,0 //MH_OVERED_BOOST
-6048,8024,5,0,0,0,0,0,0,0,0,0,0 //MH_ERASER_CUTTER
-6048,8025,5,0,0,0,0,0,0,0,0,0,0 //MH_XENO_SLASHER
-6048,8026,5,0,0,0,0,0,0,0,0,0,0 //MH_SILENT_BREEZE
+6048,8022,5,0,0,0,0,0,0,0,0,0,0,0 //MH_LIGHT_OF_REGENE
+6048,8023,5,0,0,0,0,0,0,0,0,0,0,0 //MH_OVERED_BOOST
+6048,8024,5,0,0,0,0,0,0,0,0,0,0,0 //MH_ERASER_CUTTER
+6048,8025,5,0,0,0,0,0,0,0,0,0,0,0 //MH_XENO_SLASHER
+6048,8026,5,0,0,0,0,0,0,0,0,0,0,0 //MH_SILENT_BREEZE
//Bayeri
-6049,8031,5,0,0,0,0,0,0,0,0,0,0 //MH_STAHL_HORN
-6049,8032,5,0,0,0,0,0,0,0,0,0,0 //MH_GOLDENE_FERSE
-6049,8033,5,0,0,0,0,0,0,0,0,0,0 //MH_STEINWAND
-6049,8034,5,0,0,0,0,0,0,0,0,0,0 //MH_HEILIGE_STANGE
-6049,8035,5,0,0,0,0,0,0,0,0,0,0 //MH_ANGRIFFS_MODUS
+6049,8031,5,0,0,0,0,0,0,0,0,0,0,0 //MH_STAHL_HORN
+6049,8032,5,0,0,0,0,0,0,0,0,0,0,0 //MH_GOLDENE_FERSE
+6049,8033,5,0,0,0,0,0,0,0,0,0,0,0 //MH_STEINWAND
+6049,8034,5,0,0,0,0,0,0,0,0,0,0,0 //MH_HEILIGE_STANGE
+6049,8035,5,0,0,0,0,0,0,0,0,0,0,0 //MH_ANGRIFFS_MODUS
//Sera
-6050,8018,5,0,0,0,0,0,0,0,0,0,0 //MH_SUMMON_LEGION
-6050,8019,5,0,0,0,0,0,0,0,0,0,0 //MH_NEEDLE_OF_PARALYZE
-6050,8020,5,0,0,0,0,0,0,0,0,0,0 //MH_POISON_MIST
-6050,8021,5,0,0,0,0,0,0,0,0,0,0 //MH_PAIN_KILLER
+6050,8018,5,0,0,0,0,0,0,0,0,0,0,0 //MH_SUMMON_LEGION
+6050,8019,5,0,0,0,0,0,0,0,0,0,0,0 //MH_NEEDLE_OF_PARALYZE
+6050,8020,5,0,0,0,0,0,0,0,0,0,0,0 //MH_POISON_MIST
+6050,8021,5,0,0,0,0,0,0,0,0,0,0,0 //MH_PAIN_KILLER
//Dieter
-6051,8039,5,0,0,0,0,0,0,0,0,0,0 //MH_MAGMA_FLOW
-6051,8040,5,0,0,0,0,0,0,0,0,0,0 //MH_GRANITIC_ARMOR
-6051,8041,5,0,0,0,0,0,0,0,0,0,0 //MH_LAVA_SLIDE
-6051,8042,5,0,0,0,0,0,0,0,0,0,0 //MH_PYROCLASTIC
-6051,8043,5,0,0,0,0,0,0,0,0,0,0 //MH_VOLCANIC_ASH
+6051,8039,5,0,0,0,0,0,0,0,0,0,0,0 //MH_MAGMA_FLOW
+6051,8040,5,0,0,0,0,0,0,0,0,0,0,0 //MH_GRANITIC_ARMOR
+6051,8041,5,0,0,0,0,0,0,0,0,0,0,0 //MH_LAVA_SLIDE
+6051,8042,5,0,0,0,0,0,0,0,0,0,0,0 //MH_PYROCLASTIC
+6051,8043,5,0,0,0,0,0,0,0,0,0,0,0 //MH_VOLCANIC_ASH
//Elanor
-6052,8027,1,0,0,0,0,0,0,0,0,0,0 //MH_STYLE_CHANGE
-6052,8028,5,0,0,0,0,0,0,0,0,0,0 //MH_SONIC_CRAW
-6052,8029,5,0,0,0,0,0,0,0,0,0,0 //MH_SILVERVEIN_RUSH
-6052,8030,5,0,0,0,0,0,0,0,0,0,0 //MH_MIDNIGHT_FRENZY
-6052,8036,5,0,0,0,0,0,0,0,0,0,0 //MH_TINDER_BREAKER
-6052,8037,5,0,0,0,0,0,0,0,0,0,0 //MH_CBC
-6052,8038,5,0,0,0,0,0,0,0,0,0,0 //MH_EQC \ No newline at end of file
+6052,8027,1,0,0,0,0,0,0,0,0,0,0,0 //MH_STYLE_CHANGE
+6052,8028,5,0,0,0,0,0,0,0,0,0,0,0 //MH_SONIC_CRAW
+6052,8029,5,0,0,0,0,0,0,0,0,0,0,0 //MH_SILVERVEIN_RUSH
+6052,8030,5,0,0,0,0,0,0,0,0,0,0,0 //MH_MIDNIGHT_FRENZY
+6052,8036,5,0,0,0,0,0,0,0,0,0,0,0 //MH_TINDER_BREAKER
+6052,8037,5,0,0,0,0,0,0,0,0,0,0,0 //MH_CBC
+6052,8038,5,0,0,0,0,0,0,0,0,0,0,0 //MH_EQC \ No newline at end of file
diff --git a/src/map/clif.c b/src/map/clif.c
index 75cc51a24..5ed1dc694 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1478,6 +1478,9 @@ void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
void clif_send_homdata(struct map_session_data *sd, int state, int param)
{ //[orn]
int fd = sd->fd;
+
+ if ( (state == SP_INTIMATE) && (param >= 910) && (sd->hd->homunculus.class_ == sd->hd->homunculusDB->evo_class) )
+ merc_hom_calc_skilltree(sd->hd, 0);
WFIFOHEAD(fd, packet_len(0x230));
WFIFOW(fd,0)=0x230;
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 0bb41ebe4..ab3d811b2 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -40,7 +40,7 @@
#include <math.h>
struct s_homunculus_db homunculus_db[MAX_HOMUNCULUS_CLASS]; //[orn]
-struct skill_tree_entry hskill_tree[MAX_HOMUNCULUS_CLASS][MAX_SKILL_TREE];
+struct homun_skill_tree_entry hskill_tree[MAX_HOMUNCULUS_CLASS][MAX_SKILL_TREE];
static int merc_hom_hungry(int tid, unsigned int tick, int id, intptr_t data);
@@ -194,7 +194,7 @@ int merc_hom_delete(struct homun_data *hd, int emote)
return unit_remove_map(&hd->bl,CLR_OUTSIGHT);
}
-int merc_hom_calc_skilltree(struct homun_data *hd)
+int merc_hom_calc_skilltree(struct homun_data *hd, int flag_evolve)
{
int i, id = 0;
int j, f = 1;
@@ -229,6 +229,9 @@ 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 ].id )
continue; //Skill already known.
+ j = ( flag_evolve ) ? 10 : hd->homunculus.intimacy;
+ if( j < hskill_tree[c][i].intimacylv )
+ continue;
if(!battle_config.skillfree) {
for( j = 0; j < MAX_PC_SKILL_REQUIRE; j++ ) {
if( hskill_tree[c][i].need[j].id &&
@@ -368,7 +371,7 @@ int merc_hom_change_class(struct homun_data *hd, short class_)
hd->homunculusDB = &homunculus_db[i];
hd->homunculus.class_ = class_;
status_set_viewdata(&hd->bl, class_);
- merc_hom_calc_skilltree(hd);
+ merc_hom_calc_skilltree(hd, 1);
return 1;
}
@@ -1164,7 +1167,7 @@ int read_homunculusdb(void)
}
static bool read_homunculus_skilldb_sub(char* split[], int columns, int current)
-{// <hom class>,<skill id>,<max level>[,<job level>],<req id1>,<req lv1>,<req id2>,<req lv2>,<req id3>,<req lv3>,<req id4>,<req lv4>,<req id5>,<req lv5>
+{// <hom class>,<skill id>,<max level>[,<job level>],<req id1>,<req lv1>,<req id2>,<req lv2>,<req id3>,<req lv3>,<req id4>,<req lv4>,<req id5>,<req lv5>,<intimacy lv req>
int k, classid;
int j;
int minJobLevelPresent = 0;
@@ -1199,6 +1202,8 @@ static bool read_homunculus_skilldb_sub(char* split[], int columns, int current)
hskill_tree[classid][j].need[k].id = atoi(split[3+k*2+minJobLevelPresent]);
hskill_tree[classid][j].need[k].lv = atoi(split[3+k*2+minJobLevelPresent+1]);
}
+
+ hskill_tree[classid][j].intimacylv = atoi(split[13+minJobLevelPresent]);
return true;
}
@@ -1206,7 +1211,7 @@ static bool read_homunculus_skilldb_sub(char* split[], int columns, int current)
int read_homunculus_skilldb(void)
{
memset(hskill_tree,0,sizeof(hskill_tree));
- sv_readdb(db_path, "homun_skill_tree.txt", ',', 13, 14, -1, &read_homunculus_skilldb_sub);
+ sv_readdb(db_path, "homun_skill_tree.txt", ',', 13, 15, -1, &read_homunculus_skilldb_sub);
return 0;
}
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index fb18d3394..e46420692 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -49,6 +49,18 @@ struct homun_data {
int spiritball; //for homun S [lighta]
};
+#define MAX_HOM_SKILL_REQUIRE 5
+struct homun_skill_tree_entry {
+ short id;
+ unsigned char max;
+ unsigned char joblv;
+ short intimacylv;
+ struct {
+ short id;
+ unsigned char lv;
+ } need[MAX_HOM_SKILL_REQUIRE];
+}; // Celest
+
#define HOM_EVO 0x100 //256
#define HOM_S 0x200 //512
@@ -84,7 +96,7 @@ int hom_class2mapid(int hom_class);
void merc_damage(struct homun_data *hd);
int merc_hom_dead(struct homun_data *hd);
void merc_hom_skillup(struct homun_data *hd,int skillnum);
-int merc_hom_calc_skilltree(struct homun_data *hd);
+int merc_hom_calc_skilltree(struct homun_data *hd, int flag_evolve);
int merc_hom_checkskill(struct homun_data *hd,int skill_id);
int merc_hom_gainexp(struct homun_data *hd,int exp);
int merc_hom_levelup(struct homun_data *hd);
diff --git a/src/map/status.c b/src/map/status.c
index 9b4a58676..3d3062fb3 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3175,7 +3175,7 @@ int status_calc_homunculus_(struct homun_data *hd, bool first)
status->max_hp = hom->max_hp ;
status->max_sp = hom->max_sp ;
- merc_hom_calc_skilltree(hd);
+ merc_hom_calc_skilltree(hd, 0);
if((skill=merc_hom_checkskill(hd,HAMI_SKIN)) > 0)
status->def += skill * 4;