mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
feat(Core/Spell): Implement ValidateSpellInfo (#4323)
* feat(Core/Spell): Implement ValidateSpellInfo * cherry-pick from2b5d7eef3a&a0a158b5b8* sLog->outError * cleanup * convert to ValidateSpellInfo * fix error log * improve sLog->outError * remove non related spells stuff from Validate * remove the last * build * build x2
This commit is contained in:
@@ -110,6 +110,20 @@ public:
|
||||
// Function called when script is destroyed
|
||||
// use for: deallocating memory allocated by script
|
||||
virtual void Unload() {}
|
||||
// Helpers
|
||||
static bool ValidateSpellInfo(std::initializer_list<uint32> spellIds)
|
||||
{
|
||||
return _ValidateSpellInfo(spellIds.begin(), spellIds.end());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static bool ValidateSpellInfo(T const& spellIds)
|
||||
{
|
||||
return _ValidateSpellInfo(std::begin(spellIds), std::end(spellIds));
|
||||
}
|
||||
|
||||
private:
|
||||
static bool _ValidateSpellInfo(uint32 const* begin, uint32 const* end);
|
||||
};
|
||||
|
||||
// SpellScript interface - enum used for runtime checks of script function calls
|
||||
|
||||
Reference in New Issue
Block a user