|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|

02-26-2009, 04:05 PM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
I played with this last night and it's not working. To be truthful, I'm stumped. We're checking if the player has a pet, making sure the pet isn't charmed, and checking to make sure they have the AA. If they all check out we cast the spell on the pet... But charmed pets are still getting hit by buffs/songs. I can find no other place in the code where this AA is specified.
|

02-26-2009, 04:17 PM
|
|
Demi-God
|
|
Join Date: Apr 2008
Location: MA
Posts: 1,164
|
|
Quote:
Originally Posted by cavedude
I played with this last night and it's not working. To be truthful, I'm stumped. We're checking if the player has a pet, making sure the pet isn't charmed, and checking to make sure they have the AA. If they all check out we cast the spell on the pet... But charmed pets are still getting hit by buffs/songs. I can find no other place in the code where this AA is specified.
|
!caster->GetPet()->Charmed() must not be check if the pet is charmed :P, I guess I'd have to look into each function better, but I'd assume Charmed() would check if current thing is charmed (the caster's pet in this case), so I guess when I get home and can compile I'll mess around with this some more, unless someone beats me to it :P
|

02-26-2009, 04:56 PM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
Charmed() by itself is a null pointer and will create a zone crash. There is no current entity, that's why caster-> is specified. The server will basically say is what not charmed, and then crash.  But, caster->GetPet()->Charmed() is the correct code to find it the caster's pet has a charm spell on them. I've used it in the past, and it wouldn't compile if it wasn't valid.
Last edited by cavedude; 02-27-2009 at 12:58 AM..
|

02-26-2009, 05:03 PM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
I'll fiddle with GetPetType and a couple of other things.
|

02-26-2009, 05:18 PM
|
|
Demi-God
|
|
Join Date: Apr 2008
Location: MA
Posts: 1,164
|
|
Quote:
Originally Posted by cavedude
I'll fiddle with GetPetType and a couple of other things.
|
try caster->GetPetType != petCharmed
|

02-26-2009, 06:12 PM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
Alright, this now works with group spells just fine. The problem is bard songs still hit. Looking at spells.cpp, it looks like Bard spells hit all pets no matter what, it doesn't even check for Pet Affinity. Is this correct? If not, I'll add the check for charmed pets and Pet Affinity. This was also the trouble testing last night, !caster->GetPet()->Charmed() probably did work, since I was only testing with Bard songs not group spells. :I
|

02-26-2009, 06:51 PM
|
|
Demi-God
|
|
Join Date: Apr 2008
Location: MA
Posts: 1,164
|
|
Quote:
Originally Posted by cavedude
Alright, this now works with group spells just fine. The problem is bard songs still hit. Looking at spells.cpp, it looks like Bard spells hit all pets no matter what, it doesn't even check for Pet Affinity. Is this correct? If not, I'll add the check for charmed pets and Pet Affinity. This was also the trouble testing last night, !caster->GetPet()->Charmed() probably did work, since I was only testing with Bard songs not group spells. :I
|
Did you change the lines in zones/groups.cpp? From what I recall the comments say they have to do with bard songs, and I don't recall the songs hitting peoples pets that didn't have pet affinity, well besides the chorus ones
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:48 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |