Jump to content

[bug] Pet auto cast speels


Recommended Posts

Posted

When one of the spells (the first one, when the combat starts) sets GCD, all other spells are not casted, and when GCD fades off, the new auto cast cycle starts from the very same spell (the first one), as before.

diff -urN mangos/src/game/PetAI.cpp mangos_/src/game/PetAI.cpp
--- mangos/src/game/PetAI.cpp    2010-05-24 08:10:24.000000000 +1100
+++ mangos_/src/game/PetAI.cpp    2010-05-24 08:43:05.710969109 +1100
@@ -200,7 +200,7 @@
    }

    // Autocast (casted only in combat or persistent spells in any state)
-    if (m_creature->GetGlobalCooldown() == 0 && !m_creature->IsNonMeleeSpellCasted(false))
+    if (!m_creature->IsNonMeleeSpellCasted(false))
    {
        typedef std::vector<std::Pair<Unit*, Spell*> > TargetSpellList;
        TargetSpellList targetSpellStore;
@@ -214,7 +214,8 @@
            SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellID);
            if (!spellInfo)
                continue;
-
+            if (m_creature->HasSpellCooldown(spellID))
+                continue;
            // ignore some combinations of combat state and combat/noncombat spells
            if (!inCombat)
            {

Removed GCD check, but check spell CD instead.

×
×
  • 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