Core/SpellScript: Pass vector to ValidateSpellInfo by reference
This commit is contained in:
1 parent
f5822c589b
commit
44426e76ea
2 files changed
+5
-2
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user