From f01431ef279c665df0f974e1975baf1f2422398a Mon Sep 17 00:00:00 2001 From: ai4rei Date: Sun, 28 Nov 2010 12:09:29 +0000 Subject: * Fixed pets derived from immobile monsters not being able to walk (bugreport:3377, since r13789). - This also fixes pets using original monster walk speed, instead of the one defined in pet db. - Fixed pets not being able to attack (pet_attack_support and pet_damage_support) when derived from a monster, which is not able to attack. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14512 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/status.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/status.c b/src/map/status.c index 918874639..a9bf031e1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1546,8 +1546,13 @@ int status_calc_pet_(struct pet_data *pd, bool first) if (first) { memcpy(&pd->status, &pd->db->status, sizeof(struct status_data)); - pd->status.mode|= MD_CANMOVE; //so they can chase their master! + pd->status.mode = MD_CANMOVE; // pets discard all modes, except walking pd->status.speed = pd->petDB->speed; + + if(battle_config.pet_attack_support || battle_config.pet_damage_support) + {// attack support requires the pet to be able to attack + pd->status.mode|= MD_CANATTACK; + } } if (battle_config.pet_lv_rate && pd->msd) @@ -3091,6 +3096,9 @@ void status_calc_bl_(struct block_list* bl, enum scb_flag flag, bool first) } } + if( bl->type == BL_PET ) + return; // pets are not affected by statuses + if( first && bl->type == BL_MOB ) return; // assume there will be no statuses active -- cgit v1.2.3-70-g09d2