Skip to content

Commit

Permalink
Implement SPELL_ATTR_EX4_CAN_CAST_WHILE_CASTING
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife authored and Fabian committed Aug 14, 2016
1 parent a1291ba commit b978174
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/game/SharedDefines.h
Expand Up @@ -409,7 +409,7 @@ enum SpellAttributesEx4
SPELL_ATTR_EX4_UNK4 = 0x00000010,// 4 This will no longer cause guards to attack on use??
SPELL_ATTR_EX4_UNK5 = 0x00000020,// 5
SPELL_ATTR_EX4_NOT_STEALABLE = 0x00000040,// 6 although such auras might be dispellable, they cannot be stolen
SPELL_ATTR_EX4_UNK7 = 0x00000080,// 7
SPELL_ATTR_EX4_CAN_CAST_WHILE_CASTING = 0x00000080,// 7 In theory, can use this spell while another is channeled/cast/autocast
SPELL_ATTR_EX4_STACK_DOT_MODIFIER = 0x00000100,// 8 no effect on non DoTs?
SPELL_ATTR_EX4_UNK9 = 0x00000200,// 9
SPELL_ATTR_EX4_SPELL_VS_EXTEND_COST = 0x00000400,// 10 Rogue Shiv have this flag
Expand Down
4 changes: 2 additions & 2 deletions src/game/Spell.cpp
Expand Up @@ -3080,7 +3080,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
SpellCastResult Spell::PreCastCheck(Aura* triggeredByAura /*= nullptr*/)
{
// Prevent casting at cast another spell (ServerSide check)
if (m_caster->IsNonMeleeSpellCasted(false, true, true) && m_cast_count)
if (m_caster->IsNonMeleeSpellCasted(false, true, true) && m_cast_count && !m_spellInfo->HasAttribute(SPELL_ATTR_EX4_CAN_CAST_WHILE_CASTING))
return SPELL_FAILED_SPELL_IN_PROGRESS;

SpellCastResult result = CheckCast(true);
Expand Down Expand Up @@ -6481,7 +6481,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
if (!m_caster->isAlive())
return SPELL_FAILED_CASTER_DEAD;

if (m_caster->IsNonMeleeSpellCasted(false)) // prevent spellcast interruption by another spellcast
if (m_caster->IsNonMeleeSpellCasted(false) && !m_spellInfo->HasAttribute(SPELL_ATTR_EX4_CAN_CAST_WHILE_CASTING)) // prevent spellcast interruption by another spellcast
return SPELL_FAILED_SPELL_IN_PROGRESS;
if (m_caster->isInCombat() && IsNonCombatSpell(m_spellInfo))
return SPELL_FAILED_AFFECTING_COMBAT;
Expand Down

0 comments on commit b978174

Please sign in to comment.