mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Scripts: Include cleanup
This commit is contained in:
@@ -34,15 +34,19 @@ bool _SpellScript::_Validate(SpellInfo const* entry)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool _SpellScript::ValidateSpellInfo(std::vector<uint32> spellIds)
|
||||
bool _SpellScript::_ValidateSpellInfo(uint32 const* begin, uint32 const* end)
|
||||
{
|
||||
for (uint32 spellId : spellIds)
|
||||
if (!sSpellMgr->GetSpellInfo(spellId))
|
||||
bool allValid = true;
|
||||
while (begin != end)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(*begin))
|
||||
{
|
||||
TC_LOG_ERROR("scripts.spells", "_SpellScript::ValidateSpellInfo: Spell %u does not exist.", spellId);
|
||||
return false;
|
||||
TC_LOG_ERROR("scripts.spells", "_SpellScript::ValidateSpellInfo: Spell %u does not exist.", *begin);
|
||||
allValid = false;
|
||||
}
|
||||
return true;
|
||||
++begin;
|
||||
}
|
||||
return allValid;
|
||||
}
|
||||
|
||||
void _SpellScript::_Register()
|
||||
|
||||
Reference in New Issue
Block a user