Core/SpellScript: Pass vector to ValidateSpellInfo by reference

This commit is contained in:
ariel- authored and Aokromes committed 2017-02-01 01:18:25 +01:00
1 parent f5822c589b
commit 44426e76ea
2 files changed
+5 -2

No files matched your search

+4 -1
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;
}