summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--doc/mob_db_mode_list.txt1
-rw-r--r--src/map/status.c10
3 files changed, 14 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 42a3c35e8..d6d27173c 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,5 +1,9 @@
Date Added
+2010/11/28
+ * Fixed pets derived from immobile monsters not being able to walk (bugreport:3377, since r13789). [Ai4rei]
+ - 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.
2010/11/27
* Fixed a crash uncovered with r14501, caused by outdated local variables when a script is about to suspend or terminate (bugreport:4577). [Ai4rei]
* Fixed a crash when using food status bonuses with cash food status bonuses (bugreport:4582, since r14437). [Ai4rei]
diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt
index 73f0b2e3a..9fa403f1d 100644
--- a/doc/mob_db_mode_list.txt
+++ b/doc/mob_db_mode_list.txt
@@ -104,6 +104,7 @@ Aegis/eA (description)
19: 0x3095 (aggro, change-target melee/chase, cast sensor idle)
20: 0x3295 (aggro, change-target melee/chase, cast sensor idle/chase)
21: 0x3695 (aggro, change-target melee/chase, cast sensor idle/chase, chase-change target)
+25: 0x0001 (passive, can't attack) [Pet]
26: 0xB695 (aggro, change-target melee/chase, cast sensor idle/chase, chase-change target, random target)
27: 0x8084 (aggro, immobile, random target)
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