diff options
Diffstat (limited to 'src/map/pet.c')
-rw-r--r-- | src/map/pet.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index 5c7f15151..f64012e69 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -100,8 +100,6 @@ int pet_unlocktarget(struct pet_data *pd) *------------------------------------------*/ int pet_attackskill(struct pet_data *pd, int target_id) { - struct block_list *bl; - if (!battle_config.pet_status_support || !pd->a_skill || (battle_config.pet_equip_required && !pd->pet.equip)) return 0; @@ -112,6 +110,7 @@ int pet_attackskill(struct pet_data *pd, int target_id) if (rnd()%100 < (pd->a_skill->rate +pd->pet.intimate*pd->a_skill->bonusrate/1000)) { //Skotlex: Use pet's skill int inf; + struct block_list *bl; bl=map_id2bl(target_id); if(bl == NULL || pd->bl.m != bl->m || bl->prev == NULL || status_isdead(bl) || @@ -779,13 +778,12 @@ static int pet_food(struct map_session_data *sd, struct pet_data *pd) static int pet_randomwalk(struct pet_data *pd,unsigned int tick) { - const int retrycount=20; - nullpo_ret(pd); Assert((pd->msd == 0) || (pd->msd->pd == pd)); if(DIFF_TICK(pd->next_walktime,tick) < 0 && unit_can_move(&pd->bl)) { + const int retrycount=20; int i,x,y,c,d=12-pd->move_fail_count; if(d<5) d=5; for(i=0;i<retrycount;i++){ |