Skip to content

Instantly share code, notes, and snippets.

@tobmaps
Created November 3, 2011 09:40
Show Gist options
  • Save tobmaps/1336145 to your computer and use it in GitHub Desktop.
Save tobmaps/1336145 to your computer and use it in GitHub Desktop.
spell interrupt fix
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index bbfe565..4523397 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -44,8 +44,8 @@ enum SpellInterruptFlags
{
SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, // why need this for instant?
SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, // push back
- SPELL_INTERRUPT_FLAG_INTERRUPT = 0x04, // interrupt
- SPELL_INTERRUPT_FLAG_AUTOATTACK = 0x08, // enter combat
+ SPELL_INTERRUPT_FLAG_UNK3 = 0x04, // any info?
+ SPELL_INTERRUPT_FLAG_INTERRUPT = 0x08, // interrupt
SPELL_INTERRUPT_FLAG_ABORT_ON_DMG = 0x10, // _complete_ interrupt on direct damage
//SPELL_INTERRUPT_UNK = 0x20 // unk, 564 of 727 spells having this spell start with "Glyph"
};
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index f7f185a..a62a379 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -6419,7 +6419,8 @@ bool Spell::IsNextMeleeSwingSpell() const
bool Spell::IsAutoActionResetSpell() const
{
- return !IsTriggered() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK);
+ // TODO: changed SPELL_INTERRUPT_FLAG_AUTOATTACK -> SPELL_INTERRUPT_FLAG_INTERRUPT to fix compile - is this check correct at all?
+ return !IsTriggered() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT);
}
bool Spell::IsNeedSendToClient() const
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment