summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index a2695d3b0..8cdc78e16 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -364,15 +364,20 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
pd->last_thinktime = timer->gettick();
pd->state.skillbonus = 0;
+
if( battle_config.pet_status_support )
script->run(pet->db[i].pet_script,0,sd->bl.id,0);
- if( pd->petDB && pd->petDB->equip_script )
- status_calc_pc(sd,SCO_NONE);
+
+ if( pd->petDB ) {
+ if( pd->petDB->equip_script )
+ status_calc_pc(sd,SCO_NONE);
- if( battle_config.pet_hungry_delay_rate != 100 )
- interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100;
- else
- interval = pd->petDB->hungry_delay;
+ if( battle_config.pet_hungry_delay_rate != 100 )
+ interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100;
+ else
+ interval = pd->petDB->hungry_delay;
+ }
+
if( interval <= 0 )
interval = 1;
pd->pet_hungry_timer = timer->add(timer->gettick() + interval, pet->hungry, sd->bl.id, 0);