From 7665177e2ac8ed8fd15a21156f04e5532a712329 Mon Sep 17 00:00:00 2001 From: H0zen Date: Tue, 19 Jan 2016 23:24:28 +0200 Subject: [PATCH] Fix Arcane Missile self cast bug. - Fixes issue [987](https://www.getmangos.eu/issue.php?issueid=987) --- src/game/WorldHandlers/Spell.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game/WorldHandlers/Spell.cpp b/src/game/WorldHandlers/Spell.cpp index 3327cbc6..763e8c0b 100644 --- a/src/game/WorldHandlers/Spell.cpp +++ b/src/game/WorldHandlers/Spell.cpp @@ -4252,12 +4252,17 @@ SpellCastResult Spell::CheckCast(bool strict) if (!target) { return SPELL_FAILED_BAD_TARGETS; } + // Arcane Missile self cast forbidden + if (m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && + m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000800) && + m_caster == target) + { return SPELL_FAILED_BAD_TARGETS; } + m_targets.setUnitTarget(target); } } // Some special spells with non-caster only mode - // Fire Shield if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellIconID == 16)