Jump to content

Fix applying of pet_spell_auras to non-combat pets


Recommended Posts

* What bug does the patch fix? What features does the patch add?

Entries from pet_spell_auras (hunter ferocious inspiration, kindred spirits, etc) are applied to non-combat pets also.

* For which repository revision was the patch created?

11959

* Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

don't know

* Who has been writing this patch? Please include either forum user names or email addresses.

me

http://paste2.org/p/1978245

Index: C:/wr-core_temp/test-zone/code/src/game/Pet.cpp
===================================================================
--- C:/wr-core_temp/test-zone/code/src/game/Pet.cpp	(revision 6371)
+++ C:/wr-core_temp/test-zone/code/src/game/Pet.cpp	(revision 6372)
@@ -2074,6 +2074,9 @@
    if(!owner || owner->GetTypeId()!=TYPEID_PLAYER)
        return;

+    if (getPetType() != HUNTER_PET && getPetType() != SUMMON_PET)
+        return;
+
    for(PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end()
    {
        PetAura const* pa = *itr;
@@ -2092,6 +2095,9 @@
    if(!auraId)
        return;

+    if (getPetType() != HUNTER_PET && getPetType() != SUMMON_PET)
+        return;
+
    switch(auraId)
    {
        case 35696:         // Demonic Knowledge

Link to post
Share on other sites

CastPetAuras is called when creating pet by it's owner.

CastPetAura is called from last function and on applying related dummy aura to owner.

We are interested in in first only, because minipets, guardian pets, protector pets are 'Pet' too.

thats the wrong place, maybe we should cancel all spells on mini pet in Spell:CheckTarget-function

I have never looked at related code - but will this have impact (desired, undesired) onto

* warlocks?

* ghools?

* some exotic "pets" like shaman wolfes?

warlock's pets are SUMMON_PET's, they currently have no HUNTER_PET's so no effect

hunter's pets are HUNTER_PET's, they currently have no SUMMON_PET's so no effect

dk pets are GUARDIAN_PET and SUMMON_PET, but db table spell_pet_auras is not used currently with dks and there is no appropriate dk talents for this.

shaman pets are GUARDIAN_PET and also shaman doesn't have any talents to be suitable for table spell_pet_auras

my opinion:

thats the wrong place, maybe we should cancel all spells on mini pet in Spell:CheckTarget-function

there auras are casted by pets on oneselves, so the only way is check like in my patch or add collumn to spell_pet_auras with desired pet type
Link to post
Share on other sites
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use