summaryrefslogtreecommitdiff
path: root/src/emap/pc.c
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-14 23:09:39 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-14 23:09:39 -0300
commit3aa19aa6a5fb9a5e99a4777530709fbab9b12f8d (patch)
treed79850fe6dac0ae4ddb65e7e8ffc255476f454e1 /src/emap/pc.c
parentf554952460098ddbe8efe55c5fed082dd0fb80aa (diff)
downloadevol-hercules-3aa19aa6a5fb9a5e99a4777530709fbab9b12f8d.tar.gz
evol-hercules-3aa19aa6a5fb9a5e99a4777530709fbab9b12f8d.tar.bz2
evol-hercules-3aa19aa6a5fb9a5e99a4777530709fbab9b12f8d.tar.xz
evol-hercules-3aa19aa6a5fb9a5e99a4777530709fbab9b12f8d.zip
Diffstat (limited to 'src/emap/pc.c')
-rw-r--r--src/emap/pc.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/emap/pc.c b/src/emap/pc.c
index 92f0f27..7cf35e1 100644
--- a/src/emap/pc.c
+++ b/src/emap/pc.c
@@ -1108,28 +1108,30 @@ int epc_bonus_preHook(struct map_session_data **sd, int *type, int *val)
// int bHomunculusAtk = -1;
if (*type == bHomunculusAtkID) {
- struct s_homunculus_atk *data;
+ struct s_homunculus_atk *hdatk;
- if ((data = getFromMSD(*sd, 0)) == NULL) { /* don't have, create */
- CREATE(data, struct s_homunculus_atk, 1); /* alloc */
- data->rate = 0; /* default */
- addToMSD(*sd, data, 0, true); /* link to sd */
+ if ((hdatk = getFromMSD(*sd, 0)) == NULL) { /* don't have, create */
+ CREATE(hdatk, struct s_homunculus_atk, 1); /* alloc */
+ hdatk->rate = 0; /* default */
+ addToMSD(*sd, hdatk, 0, true); /* link to sd */
}
- data->rate += *val;
+ hdatk->rate += *val;
+ ShowDebug("ATK Bonus found (%d)\n", hdatk->rate);
hookStop(); /* don't need to run the original */
}
// int bHomunculusDef = -1;
if (*type == bHomunculusDefID) {
- struct s_homunculus_def *data;
+ struct s_homunculus_def *hddef;
- if ((data = getFromMSD(*sd, 0)) == NULL) {
- CREATE(data, struct s_homunculus_def, 1);
- data->rate = 0;
- addToMSD(*sd, data, 0, true);
+ if ((hddef = getFromMSD(*sd, 0)) == NULL) {
+ CREATE(hddef, struct s_homunculus_def, 1);
+ hddef->rate = 0;
+ addToMSD(*sd, hddef, 0, true);
}
- data->rate += *val;
+ hddef->rate += *val;
+ ShowDebug("DEF Bonus found (%d)\n", hddef->rate);
hookStop();
}
@@ -1144,6 +1146,7 @@ int epc_bonus_preHook(struct map_session_data **sd, int *type, int *val)
addToMSD(*sd, data, 0, true);
}
data->rate += *val;
+ ShowDebug("MHP Bonus found (%d)\n", data->rate);
hookStop();
}