From 8ffbb46fafe1f2d1597b4295b9e5fcec822d1181 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 21 Jan 2021 20:49:49 +0100 Subject: [PATCH] Revert "feat(Core/Spell): Implement ValidateSpellInfo" This reverts commit 7690f02b49c82c65de3e92307063211a2e9941f5. --- src/server/game/Spells/SpellScript.cpp | 16 ---------------- src/server/game/Spells/SpellScript.h | 14 -------------- 2 files changed, 30 deletions(-) diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 65588300f0..42128ee611 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -20,22 +20,6 @@ bool _SpellScript::_Validate(SpellInfo const* entry) return true; } -bool _SpellScript::_ValidateSpellInfo(uint32 const* begin, uint32 const* end) -{ - bool allValid = true; - while (begin != end) - { - if (!sSpellMgr->GetSpellInfo(*begin)) - { - sLog->outError("_SpellScript::ValidateSpellInfo: Spell %u does not exist.", *begin); - allValid = false; - } - - ++begin; - } - return allValid; -} - void _SpellScript::_Register() { m_currentScriptState = SPELL_SCRIPT_STATE_REGISTRATION; diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index b856578eab..74245592e1 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -110,20 +110,6 @@ public: // Function called when script is destroyed // use for: deallocating memory allocated by script virtual void Unload() {} - // Helpers - static bool ValidateSpellInfo(std::initializer_list spellIds) - { - return _ValidateSpellInfo(spellIds.begin(), spellIds.end()); - } - - template - 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