Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2009, 09:25 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default Pet Affinity Fix (maybe)

Well, the description says it works on summoned pets, not charmed. I also asked someone on the PEQ server that played an enc on live and he said he didn't think it worked on charmed but he wasn't 100% sure because he mostly soloed. I also can't test these changes because at school I don't have access to a computer that I could host a computer on :P.

So in the file zone/groups.cpp

on line 634

change it from (lines 633-636)
Code:
#ifdef GROUP_BUFF_PETS
			if(caster->GetPet() && caster->GetAA(aaPetAffinity))
				caster->BardPulse(spell_id, caster->GetPet());
#endif
to

Code:
#ifdef GROUP_BUFF_PETS
			if(caster->GetPet() && caster->GetAA(aaPetAffinity) && !Charmed())
				caster->BardPulse(spell_id, caster->GetPet());
#endif
and on line 644

change from (lines 643-646)
Code:
#ifdef GROUP_BUFF_PETS
				if(members[z]->GetPet() && members[z]->GetAA(aaPetAffinity))
					members[z]->GetPet()->BardPulse(spell_id, caster);
#endif
to

Code:
#ifdef GROUP_BUFF_PETS
				if(members[z]->GetPet() && members[z]->GetAA(aaPetAffinity) && !Charmed())
					members[z]->GetPet()->BardPulse(spell_id, caster);
#endif
I'm not 100% if this will work :S so it would be nice if someone could check that would be great, only really thing I can think that might not be right is if Pet Affinity works on charmed pets, which I've been told is not the case, or if !Charmed() needs to do something else :S

but the main reason I'm doing this is because if an enc has Pet Affinity and a charmed pet and a bard in their group playing a resist buff song then the pet will break the charm every tick (pretty much) since it checks every tick to see if it can break the charm based on it's MR[I think])
Reply With Quote
  #2  
Old 02-25-2009, 01:29 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

My research agrees, charmed pets should not be effected by Pet Affinity. So, this is a good fix and I'll get it into SVN after my current batch of testing.
Reply With Quote
  #3  
Old 02-25-2009, 05:29 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

well these changes don't work right, need to do some more testing, but I don't have a server to test these on at my disposal right now :( so ignore this until I can get around to getting it to work :P, plus there are a few other lines I found that I'd need to change
Reply With Quote
  #4  
Old 02-25-2009, 06:30 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

The one thing I did change was !Charmed() should be !caster->GetPet()->Charmed(), substituting caster with members[z] where necessary. Haven't had time to test yet, though. I also added it to a couple of missed lines.

Last edited by cavedude; 02-26-2009 at 02:34 AM..
Reply With Quote
  #5  
Old 02-25-2009, 07:34 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Quote:
Originally Posted by cavedude View Post
The one thing I did change was !Charmed() should be !caster->GetPet()->Charmed(), substituting caster with members[z] where necessary. Haven't had time to test yet, though. I also added it to a couple of missed lines.
Alright that's what I was going to do, some how I missed the lines in spells.cpp my first time, but yeah that's what I was going to try when I went home for spring break
Reply With Quote
  #6  
Old 02-25-2009, 11:10 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

even though I'm sure CD found them all, I'll just post everything fixed:

zones/groups.cpp

lines 594-597

Code:
#ifdef GROUP_BUFF_PETS
			if(caster->GetPet() && caster->GetAA(aaPetAffinity))
				caster->SpellOnTarget(spell_id, caster->GetPet());
#endif
change to

Code:
#ifdef GROUP_BUFF_PETS
			if(caster->GetPet() && caster->GetAA(aaPetAffinity) && !caster->GetPet()->Charmed())
				caster->SpellOnTarget(spell_id, caster->GetPet());
#endif
lines 604 - 607

Code:
#ifdef GROUP_BUFF_PETS
				if(members[z]->GetPet() && members[z]->GetAA(aaPetAffinity))
					caster->SpellOnTarget(spell_id, members[z]->GetPet());
#endif
change to

Code:
#ifdef GROUP_BUFF_PETS
				if(members[z]->GetPet() && members[z]->GetAA(aaPetAffinity) && !members[z]->GetPet()->Charmed())
					caster->SpellOnTarget(spell_id, members[z]->GetPet());
#endif
lines 633-636

Code:
#ifdef GROUP_BUFF_PETS
			if(caster->GetPet() && caster->GetAA(aaPetAffinity))
				caster->BardPulse(spell_id, caster->GetPet());
#endif
change to

Code:
#ifdef GROUP_BUFF_PETS
			if(caster->GetPet() && caster->GetAA(aaPetAffinity) && !caster->GetPet()->Charmed())
				caster->BardPulse(spell_id, caster->GetPet());
#endif
well I think you get the idea, but here is the rest of the line numbers

in zones/groups.cpp on line 644

in zones/raids.cpp on lines 413, 424, 592, 603

in zones/spells.cpp on lines 1561 and 1569

the rest in groups and raids are the same (it's the same two statements), for spells it's a little different, for line 1561 change

Code:
if (GetPet() && GetAA(aaPetAffinity))
to

Code:
if (GetPet() && GetAA(aaPetAffinity) && !GetPet()->Charmed())
and on 1569

Code:
if (spell_target->GetPet() && GetAA(aaPetAffinity))
to

Code:
if (spell_target->GetPet() && GetAA(aaPetAffinity) && !spell_target->GetPet()->Charmed())
these should be all correct, but I don't have a means to test them
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:03 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