Core/SpellScript: Pass vector to ValidateSpellInfo by reference

This commit is contained in:
ariel-
2017-01-24 23:38:46 -03:00
parent 2c20b368bc
commit 6ca9f99aaf
2 changed files with 5 additions and 2 deletions

View File

@@ -33,14 +33,17 @@ bool _SpellScript::_Validate(SpellInfo const* entry)
return true;
}
bool _SpellScript::ValidateSpellInfo(std::vector<uint32> spellIds)
bool _SpellScript::ValidateSpellInfo(std::vector<uint32> const& spellIds)
{
for (uint32 spellId : spellIds)
{
if (!sSpellMgr->GetSpellInfo(spellId))
{
TC_LOG_ERROR("scripts.spells", "_SpellScript::ValidateSpellInfo: Spell %u does not exist.", spellId);
return false;
}
}
return true;
}