diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-28 12:09:29 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-28 12:09:29 +0000 |
commit | f01431ef279c665df0f974e1975baf1f2422398a (patch) | |
tree | 8a60aeb841e8783a948c6621ac1faf53ac2c4554 /src | |
parent | 14fedfe759f6dc32c0556421f4c76bf43ac32c3b (diff) | |
download | hercules-f01431ef279c665df0f974e1975baf1f2422398a.tar.gz hercules-f01431ef279c665df0f974e1975baf1f2422398a.tar.bz2 hercules-f01431ef279c665df0f974e1975baf1f2422398a.tar.xz hercules-f01431ef279c665df0f974e1975baf1f2422398a.zip |
* 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
Diffstat (limited to 'src')
-rw-r--r-- | src/map/status.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 |