PDA

View Full Version : Pet Aggro Fix


cbodmer
08-16-2007, 07:17 PM
I've noticed that pet aggro doesn't work right. If a player sends their pet into a camp of social mobs, all the mobs aggro on the player instead of the pet. The pet usually manages to grab the attention from the targetted mob, but the remainder of the mobs go after the pet owner.

This behaviour is not correct. The pet owner needs to be on the aggro list, but with less aggro than the pet.

I've made the following patch to attack.cpp (vs -1030) which fixes the problem for me:


--- EQEmu-0.7.0-1030/zone/attack.cpp 2007-08-11 08:14:57.000000000 +0200
+++ EQEmu-0.7.0-1030-cb/zone/attack.cpp 2007-08-17 08:39:52.000000000 +0200
@@ -1597,17 +1597,23 @@
if (other == myowner)
return;

+ // cb:2007-08-17
+ // first add self
+ hate_list.Add(other, hate, damage, bFrenzy, !iBuffTic);
+
+ // then add pet owner if there's one
if (owner) { // Other is a pet, add him and it
// EverHood 6/12/06
// Can't add a feigned owner to hate list
if(owner->IsClient() && owner->CastToClient()->GetFeigned()) {
//they avoid hate due to feign death...
} else {
- hate_list.Add(owner, 1, damage, false, !iBuffTic);
+ // cb:2007-08-17
+ // owner must get on list, but he's not actually gained any hate yet
+ //hate_list.Add(owner, 1, damage, false, !iBuffTic);
+ hate_list.Add(owner, 0, 0, false, !iBuffTic);
}
- }
-
- hate_list.Add(other, hate, damage, bFrenzy, !iBuffTic);
+ }

if (mypet && (!(GetAA(aaPetDiscipline) && mypet->IsHeld()))) { // I have a pet, add other to it
if(!mypet->IsFamiliar())



Cheers,
Chris

gernblan
08-17-2007, 01:18 PM
If there was also some way to fix the pet weapons no longer proc'ing (they broke I think after build 992) then life with a pet would be almost perfect! =)

Thanks for this!

John Adams
08-18-2007, 02:50 AM
Hey Chris, hadn't seen you in a while. Good to see you're still plugging away. :)

cavedude
08-18-2007, 05:04 AM
If there was also some way to fix the pet weapons no longer proc'ing (they broke I think after build 992) then life with a pet would be almost perfect! =)

It's not just pets, no NPCs proc, the can only cast which of course hurts DPS. I'm not sure of when it broke, but you're right it's about that time.

Angelox
08-27-2007, 10:34 PM
Same here - nothing in the source yet