Moved condition related to mage casting on self
Moved condition related to prevention of casting on self. Will check the other cores to see if this needs to be applied to them too. It does need to be applied to One.
This commit is contained in:
parent
3864a18249
commit
603e4a7dc5
@ -4242,6 +4242,11 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->IsInWorld())
|
||||
{
|
||||
// Arcane Missile self cast forbidden
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
|
||||
m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000800))
|
||||
{ return SPELL_FAILED_BAD_TARGETS; }
|
||||
|
||||
// Additional check for some spells
|
||||
// If 0 spell effect empty - client not send target data (need use selection)
|
||||
// TODO: check it on next client version
|
||||
@ -4252,12 +4257,6 @@ 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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user