aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellScript.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-05-28 16:34:44 +0200
committerShauren <shauren.trinity@gmail.com>2017-05-28 16:34:44 +0200
commita0a158b5b851db7e2c16819ec89e913d914a3aba (patch)
treee2170b14fe7bba2bf70c30500eb129c6eadc2c20 /src/server/game/Spells/SpellScript.h
parentd427fed13b49aec1722544b3ca72a0a41160bbe3 (diff)
Core/Scripts: Include cleanup
Diffstat (limited to 'src/server/game/Spells/SpellScript.h')
-rw-r--r--src/server/game/Spells/SpellScript.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 17b512ed052..ee1a058f543 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -141,7 +141,19 @@ class TC_GAME_API _SpellScript
// use for: deallocating memory allocated by script
virtual void Unload() { }
// Helpers
- static bool ValidateSpellInfo(std::vector<uint32> spellIds);
+ 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