Core/Spells: Really move spec changing InBattleground check to its correct location

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-10-16 17:53:33 +03:00
parent c2295e86be
commit e38e590ec8
2 changed files with 6 additions and 8 deletions
+6
View File
@@ -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;
}
-8
View File
@@ -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;