*Add AuraScript class for scripting aura objects - scripts are registered same way as SpellScripts, bound to SpellScriptNames table. For more details see example_spell.cpp and SpellScript.h

*Rename SpellHandlerScript to SpellScriptLoader, EffectHandlerFn to SpellEffectFn, HitHandlerFn to SpellHitFn, SpellScript::EffectHandlers to SpellScript::OnEffect, these changes were neccesary to prevent namespace collisions, happily you can solve these by simple find and replace
*Make spells 66244 and 5581 example scripts.

--HG--
branch : trunk
This commit is contained in:
QAston committed 2010-08-24 00:10:49 +02:00
1 parent e581feb551
commit 07a3a1254b
28 files changed
+1075 -291

No files matched your search

+7 -6
View File
@@ -24,6 +24,7 @@
#include "ScriptPCH.h"
enum NPCEntries
{
NPC_DOOMGUARD = 11859,
@@ -31,10 +32,10 @@ enum NPCEntries
NPC_IMP = 416,
};
class spell_gen_remove_flight_auras : public SpellHandlerScript
class spell_gen_remove_flight_auras : public SpellScriptLoader
{
public:
spell_gen_remove_flight_auras() : SpellHandlerScript("spell_gen_remove_flight_auras") {}
spell_gen_remove_flight_auras() : SpellScriptLoader("spell_gen_remove_flight_auras") {}
class spell_gen_remove_flight_auras_SpellScript : public SpellScript
{
@@ -49,7 +50,7 @@ public:
void Register()
{
EffectHandlers += EffectHandlerFn(spell_gen_remove_flight_auras_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffect += SpellEffectFn(spell_gen_remove_flight_auras_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -59,10 +60,10 @@ public:
}
};
class spell_gen_pet_summoned : public SpellHandlerScript
class spell_gen_pet_summoned : public SpellScriptLoader
{
public:
spell_gen_pet_summoned() : SpellHandlerScript("spell_gen_pet_summoned") { }
spell_gen_pet_summoned() : SpellScriptLoader("spell_gen_pet_summoned") { }
class spell_gen_pet_summonedSpellScript : public SpellScript
{
@@ -105,7 +106,7 @@ public:
void Register()
{
EffectHandlers += EffectHandlerFn(spell_gen_pet_summonedSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffect += SpellEffectFn(spell_gen_pet_summonedSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};