diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-04-05 19:12:26 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2020-04-05 21:29:52 +0200 |
commit | 05ad9437527e018fb28cb540c8f74d5f66744d3c (patch) | |
tree | 55770bbe757363b2c8271be65af39bcdceae1b04 /src/map/pet.c | |
parent | f50acd072b4c221983b8ecc85e7f6c92c8472bef (diff) | |
download | hercules-05ad9437527e018fb28cb540c8f74d5f66744d3c.tar.gz hercules-05ad9437527e018fb28cb540c8f74d5f66744d3c.tar.bz2 hercules-05ad9437527e018fb28cb540c8f74d5f66744d3c.tar.xz hercules-05ad9437527e018fb28cb540c8f74d5f66744d3c.zip |
Remove (pd->petDB != NULL) check from pet_data_init()
Diffstat (limited to 'src/map/pet.c')
-rw-r--r-- | src/map/pet.c | 16 |
1 files changed, 7 insertions, 9 deletions
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; |