summaryrefslogtreecommitdiff
path: root/src/emap/pc.c
diff options
context:
space:
mode:
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();
}