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:
QAston
2010-10-08 21:33:44 +02:00
parent e5e53498ce
commit 1760e42e2c
23 changed files with 120 additions and 15 deletions
+3
View File
@@ -40,6 +40,7 @@ public:
class spell_dk_corpse_explosion_SpellScript : public SpellScript
{
PrepareSpellScript(spell_dk_corpse_explosion_SpellScript)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(DK_SPELL_CORPSE_EXPLOSION_TRIGGERED))
@@ -86,6 +87,7 @@ public:
class spell_dk_runic_power_feed_SpellScript : public SpellScript
{
PrepareSpellScript(spell_dk_runic_power_feed_SpellScript)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(DK_SPELL_SUMMON_GARGOYLE))
@@ -125,6 +127,7 @@ public:
class spell_dk_scourge_strike_SpellScript : public SpellScript
{
PrepareSpellScript(spell_dk_scourge_strike_SpellScript)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(DK_SPELL_SCOURGE_STRIKE_TRIGGERED))