diff options
author | Shauren <shauren.trinity@gmail.com> | 2021-05-27 15:51:58 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-03-10 21:29:07 +0100 |
commit | 86e77891602797be24c30fe7dfad7ed484a4fcf0 (patch) | |
tree | fb629918bb1881f5f0db3bd81f85dcfe3a2455e8 /src | |
parent | b5d46ec5adb615994e9bdff9455189e7ffcd72da (diff) |
Core/Scripts: Allow spell script ValidateSpellInfo to work with any container type
(cherry picked from commit f2f0aeb562dfc1a78b04d13a14e3c37a58367619)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/SpellScript.cpp | 1 | ||||
-rw-r--r-- | src/server/game/Spells/SpellScript.h | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 65adc36a019..25d1f6ffcb7 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -48,6 +48,7 @@ bool _SpellScript::_ValidateSpellInfo(uint32 spellId) TC_LOG_ERROR("scripts.spells", "_SpellScript::ValidateSpellInfo: Spell %u does not exist.", spellId); return false; } + return true; } diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 04809e46d4e..b415be64c24 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -178,16 +178,16 @@ class TC_GAME_API _SpellScript } private: - template <class InputIt> - static bool _ValidateSpellInfo(InputIt first, InputIt last) + template<typename Iterator> + static bool _ValidateSpellInfo(Iterator begin, Iterator end) { bool allValid = true; - while (first != last) + while (begin != end) { - if (!_ValidateSpellInfo(*first)) + if (!_ValidateSpellInfo(*begin)) allValid = false; - ++first; + ++begin; } return allValid; } |