mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 00:06:11 +00:00
feat(Core/Script): Allow spell script ValidateSpellInfo to work with any container type (#6078)
* Cherry-pick f2f0aeb562
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -123,7 +123,23 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
static bool _ValidateSpellInfo(uint32 const* begin, uint32 const* end);
|
||||
template<typename Iterator>
|
||||
static bool _ValidateSpellInfo(Iterator begin, Iterator end)
|
||||
{
|
||||
bool allValid = true;
|
||||
while (begin != end)
|
||||
{
|
||||
if (!_ValidateSpellInfo(*begin))
|
||||
{
|
||||
allValid = false;
|
||||
}
|
||||
|
||||
++begin;
|
||||
}
|
||||
return allValid;
|
||||
}
|
||||
|
||||
static bool _ValidateSpellInfo(uint32 spellId);
|
||||
};
|
||||
|
||||
// SpellScript interface - enum used for runtime checks of script function calls
|
||||
|
||||
Reference in New Issue
Block a user