Jump to content

[patch] Add Positive Spell Check Before Call Attackstart In Onspellhit()


Guest megamage

Recommended Posts

Now when bosses cast channel spells on some invisible trigger creature, the trigger will start to attack boss. There should be a positive spell check. I think players sometimes may also need to cast non-negative spells on netrual creature (some quests)

Index: Spell.cpp
===================================================================
--- Spell.cpp        (revision 6354)
+++ Spell.cpp        (working copy)
@@ -947,10 +947,7 @@
        {
                if( !m_caster->IsFriendlyTo(unit) )
                {
-                        // exclude Arcane Missiles Dummy Aura aura for now (attack on hit)
-                        // TODO: find way to not need this?
-                        if(!(m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
-                                m_spellInfo->SpellFamilyFlags & 0x800LL))
+                        if(!IsPositiveSpell(m_spellInfo->Id))
                        {
                                unit->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);

Link to comment
Share on other sites

  • 3 years later...
×
×
  • 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