summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-09 20:28:19 -0200
committershennetsind <ind@henn.et>2013-12-09 20:28:19 -0200
commitb4136dd3d4779d80df18f84929c576c8080cd7b8 (patch)
treed38885e73698210ea2411093db594f8f2ebd42ea /src/map/pet.c
parent4727cc95528be094cd2c1c3fbb3c92b7873c809b (diff)
downloadhercules-b4136dd3d4779d80df18f84929c576c8080cd7b8.tar.gz
hercules-b4136dd3d4779d80df18f84929c576c8080cd7b8.tar.bz2
hercules-b4136dd3d4779d80df18f84929c576c8080cd7b8.tar.xz
hercules-b4136dd3d4779d80df18f84929c576c8080cd7b8.zip
Fixed some logic errors
Special Thanks to Haru Signed-off-by: shennetsind <ind@henn.et>
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);