From 05ad9437527e018fb28cb540c8f74d5f66744d3c Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Sun, 5 Apr 2020 19:12:26 +0200 Subject: Remove (pd->petDB != NULL) check from pet_data_init() --- src/map/pet.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/map/pet.c b/src/map/pet.c index 4d7a2366b..be29d2647 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -494,17 +494,15 @@ static int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) pd->last_thinktime = timer->gettick(); pd->state.skillbonus = 0; - if (pd->petDB != NULL) { - if (pd->petDB->pet_script != NULL && battle_config.pet_status_support == 1) - script->run_pet(pd->petDB->pet_script, 0, sd->bl.id, 0); + if (pd->petDB->pet_script != NULL && battle_config.pet_status_support == 1) + script->run_pet(pd->petDB->pet_script, 0, sd->bl.id, 0); - if (pd->petDB->equip_script != NULL) - status_calc_pc(sd, SCO_NONE); + if (pd->petDB->equip_script != NULL) + status_calc_pc(sd, SCO_NONE); - if (pd->petDB->hungry_delay > 0) { - int interval = pd->petDB->hungry_delay * battle_config.pet_hungry_delay_rate / 100; - pd->pet_hungry_timer = timer->add(timer->gettick() + max(interval, 1), pet->hungry, sd->bl.id, 0); - } + if (pd->petDB->hungry_delay > 0) { + int interval = pd->petDB->hungry_delay * battle_config.pet_hungry_delay_rate / 100; + pd->pet_hungry_timer = timer->add(timer->gettick() + max(interval, 1), pet->hungry, sd->bl.id, 0); } return 0; -- cgit v1.2.3-70-g09d2