Core/Scripts: Include cleanup

This commit is contained in:
Shauren
2017-05-28 16:34:44 +02:00
parent d427fed13b
commit a0a158b5b8
621 changed files with 4064 additions and 3178 deletions

View File

@@ -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()