summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-12-30 13:25:19 -0300
committerJesusaves <cpntb1@ymail.com>2021-12-30 13:25:19 -0300
commitb704afa14405e84e6861262d9a70e2e5ced2ffad (patch)
treef5dc4e96ba4a86c823cd8f042cd0e8fbc67539c8
parente06e87aa12ad659db43d069feff5a8225433d885 (diff)
downloadhercules-b704afa14405e84e6861262d9a70e2e5ced2ffad.tar.gz
hercules-b704afa14405e84e6861262d9a70e2e5ced2ffad.tar.bz2
hercules-b704afa14405e84e6861262d9a70e2e5ced2ffad.tar.xz
hercules-b704afa14405e84e6861262d9a70e2e5ced2ffad.zip
[Jesusalva] Add a lot of meaningless comments
-rw-r--r--src/map/homunculus.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 1a7e1d77a..054d1ec1b 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -311,6 +311,7 @@ static void homunculus_skillup(struct homun_data *hd, uint16 skill_id)
if (hd->homunculus.vaporize != HOM_ST_ACTIVE)
return;
+ //ShowDebug("HC Level up requested (skill %d)\n", skill_id);
i = skill_id - HM_SKILLBASE;
Assert_retv(i >= 0 && i < MAX_HOMUNSKILL);
if (hd->homunculus.skillpts > 0 &&
@@ -323,20 +324,33 @@ static void homunculus_skillup(struct homun_data *hd, uint16 skill_id)
// Check if pre-requisites were met
if (!battle_config.skillfree) {
int c = hd->homunculus.class_ - HM_CLASS_BASE;
- if (hd->homunculus.intimacy < homun->dbs->skill_tree[c][i].intimacylv)
+ //ShowDebug("Check for homun %d tree\n", c);
+ //ShowDebug("Class %d Base %d Skill %d (%d - %d)\n", hd->homunculus.class_, HM_CLASS_BASE, i, skill_id, HM_SKILLBASE);
+ if (hd->homunculus.intimacy < homun->dbs->skill_tree[c][i].intimacylv) {
stop = true;
+ //ShowDebug("Insufficient Intimacy: %u < %d\n", hd->homunculus.intimacy, homun->dbs->skill_tree[c][i].intimacylv);
+ }
if (!stop) {
+ //ShowDebug("Don't stop, continue\n");
for (int j = 0; j < MAX_HOM_SKILL_REQUIRE; j++) {
+ //ShowDebug("Cycle though\n");
if (homun->dbs->skill_tree[c][i].need[j].id &&
homun->checkskill(hd, homun->dbs->skill_tree[c][i].need[j].id) < homun->dbs->skill_tree[c][i].need[j].lv) {
+ /*ShowDebug("Skill not match: %d (Lv %d / %d)\n",
+ homun->dbs->skill_tree[c][i].need[j].id,
+ homun->checkskill(hd, homun->dbs->skill_tree[c][i].need[j].id),
+ homun->dbs->skill_tree[c][i].need[j].lv);*/
stop = true;
break;
}
}
+ //ShowDebug("Cycle finished\n");
}
+ //ShowDebug("Checks ended, stop is %d\n", (int)(stop));
}
// Level up skill if requisites were met
if (!stop) {
+ //ShowDebug("Homun skill LvUp OK\n");
hd->homunculus.hskill[i].lv++;
hd->homunculus.skillpts-- ;
status_calc_homunculus(hd, SCO_NONE);
@@ -345,6 +359,8 @@ static void homunculus_skillup(struct homun_data *hd, uint16 skill_id)
clif->hominfo(hd->master, hd, 0);
clif->homskillinfoblock(hd->master);
}
+ } else {
+ ShowDebug("Homun skill LvUp \033[1mFAIL\033[0m for master %d (Illegal request)\n", hd->homunculus.char_id);
}
}
}