mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/SpellScript: Pass vector to ValidateSpellInfo by reference
This commit is contained in:
@@ -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