Core/Spells: Really move spec changing InBattleground check to its correct location
--HG-- branch : trunk
This commit is contained in:
@@ -5392,6 +5392,12 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELL_EFFECT_TALENT_SPEC_SELECT:
|
||||
// can't change during already started arena/battleground
|
||||
if (Battleground const* bg = m_caster->ToPlayer()->GetBattleground())
|
||||
if (bg->GetStatus() == STATUS_IN_PROGRESS)
|
||||
return SPELL_FAILED_NOT_IN_BATTLEGROUND;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6933,14 +6933,6 @@ void Spell::EffectSpecCount(SpellEffIndex /*effIndex*/)
|
||||
|
||||
void Spell::EffectActivateSpec(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
// can't change during already started arena/battleground
|
||||
if (Battleground const* bg = m_caster->ToPlayer()->GetBattleground())
|
||||
if (bg->GetStatus() == STATUS_IN_PROGRESS)
|
||||
{
|
||||
SendCastResult(SPELL_FAILED_NOT_IN_BATTLEGROUND);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user