Core/ScriptSystem: Add compile time type check of function assigned to hooks - prevents incorrect function calls. Since this rev you have to put PrepareSpellScript(<yourscriptclassnamehere>) at the beginning of every spell script. Yes, i know it's unhandy, but unfortunately C++ preprocessor is very limited, so you have to do that extra work each time you write a script:(.
--HG-- branch : trunk
This commit is contained in:
1 parent
e5e53498ce
commit
1760e42e2c
23 files changed
+120
-15
No files matched your search
@@ -40,6 +40,7 @@ public:
|
||||
|
||||
class spell_sha_fire_nova_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_sha_fire_nova_SpellScript)
|
||||
bool Validate(SpellEntry const * spellEntry)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SHAMAN_SPELL_FIRE_NOVA_R1))
|
||||
@@ -89,6 +90,7 @@ public:
|
||||
|
||||
class spell_sha_mana_tide_totem_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_sha_mana_tide_totem_SpellScript)
|
||||
bool Validate(SpellEntry const * /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE))
|
||||
|
||||
Reference in new issue
Block a user