Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-16-2007, 07:17 PM
cbodmer
Fire Beetle
 
Join Date: Oct 2006
Posts: 24
Default Pet Aggro Fix

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:

Code:
--- 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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:11 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3