mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user