summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-02-18 03:01:55 +0100
committerHaru <haru@dotalux.com>2020-04-05 21:29:52 +0200
commitc1598fe112a6d28619c0db8f03c0346a196fd486 (patch)
tree774f436a1f9fb6af804763382dc76cf9bfb44ef7
parentcda98f714176fad04ff1f311d274c5f0c42c988c (diff)
downloadhercules-c1598fe112a6d28619c0db8f03c0346a196fd486.tar.gz
hercules-c1598fe112a6d28619c0db8f03c0346a196fd486.tar.bz2
hercules-c1598fe112a6d28619c0db8f03c0346a196fd486.tar.xz
hercules-c1598fe112a6d28619c0db8f03c0346a196fd486.zip
Apply code style to pet related part of status_calc_pc_() function
-rw-r--r--src/map/status.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index d290eb0e6..d3e85e5be 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2579,12 +2579,16 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o
status->calc_pc_additional(sd, opt);
- if( sd->pd ) { // Pet Bonus
+ if (sd->pd != NULL) { // Pet bonus.
struct pet_data *pd = sd->pd;
- if (pd != NULL && pd->petDB != NULL && pd->petDB->equip_script != NULL)
- script->run(pd->petDB->equip_script,0,sd->bl.id,0);
- if (pd && pd->pet.intimate > PET_INTIMACY_NONE && (!battle_config.pet_equip_required || pd->pet.equip > 0) && pd->state.skillbonus == 1 && pd->bonus)
- pc->bonus(sd,pd->bonus->type, pd->bonus->val);
+
+ if (pd->petDB != NULL && pd->petDB->equip_script != NULL)
+ script->run(pd->petDB->equip_script, 0, sd->bl.id, 0);
+
+ if (pd->pet.intimate > PET_INTIMACY_NONE && pd->state.skillbonus == 1 && pd->bonus != NULL
+ && (battle_config.pet_equip_required == 0 || pd->pet.equip > 0)) {
+ pc->bonus(sd, pd->bonus->type, pd->bonus->val);
+ }
}
//param_bonus now holds card bonuses.