Jump to content

[patch][6948] Unattackable NPC pets


Guest False.Genesis

Recommended Posts

- this fixes "blue" and unattackable NPC pets: only player pets should have the flag UNIT_FLAG_PVP_ATTACKABLE set.

- for rev 6944

- as far as i know there was no bug report yet

- patch be me (False.Genesis / ProjectEden)

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 56d86dc..03eaf5f 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4184,7 +4184,10 @@ void Spell::EffectSummonPet(uint32 i)
    // this enables pet details window (Shift+P)

    // this enables popup window (pet dismiss, cancel), hunter pet additional flags set later
-    NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE);
+    if(m_caster->GetTypeId() == TYPEID_PLAYER)
+    {
+        NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE);
+    }

    NewSummon->InitStatsForLevel(petlevel);
    NewSummon->InitPetCreateSpells();

Link to comment
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