mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 23:11:56 -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:
@@ -38,6 +38,7 @@ class spell_pri_mana_burn : public SpellScriptLoader
|
||||
|
||||
class spell_pri_mana_burn_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_mana_burn_SpellScript)
|
||||
bool Validate(SpellEntry const * /*spellEntry*/)
|
||||
{
|
||||
return true;
|
||||
@@ -72,6 +73,7 @@ class spell_pri_pain_and_suffering_proc : public SpellScriptLoader
|
||||
// 47948 Pain and Suffering (proc)
|
||||
class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_pain_and_suffering_proc_SpellScript)
|
||||
void HandleEffectScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
// Refresh Shadow Word: Pain on target
|
||||
@@ -99,6 +101,7 @@ class spell_pri_penance : public SpellScriptLoader
|
||||
|
||||
class spell_pri_penance_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_penance_SpellScript)
|
||||
bool Validate(SpellEntry const * spellEntry)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(PRIEST_SPELL_PENANCE_R1))
|
||||
|
||||
Reference in New Issue
Block a user