From fce1f5b014c1e2e3b0b85062898f56837111f66a Mon Sep 17 00:00:00 2001 From: QAston Date: Sun, 25 Jul 2010 16:23:57 +0200 Subject: *Extend API of SpellScript by Dest and Damage/Heal setters and getters. *Make some SpellScript function names shorter. --HG-- branch : trunk --- src/server/scripts/Examples/example_spell.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/scripts/Examples') diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index 90655127aa9..1622c087468 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -36,7 +36,7 @@ class spell_ex_49375SpellScript : public SpellScript sLog.outError("WE ARE HANDLING DUMMY!"); sLog.outError(localVariable.c_str()); // make caster cast a spell on a unit target of effect - if (Unit * target = GetEffectUnitTarget()) + if (Unit * target = GetHitUnit()) GetCaster()->CastSpell(target, 70522, true); }; void Register() @@ -70,7 +70,7 @@ class spell_ex_49375SpellScript : public SpellScript // script will be immediately removed from the spell // for example - we don't want this script to be executed on a creature // if (GetCaster()->GetTypeID() != TYPEID_PLAYER) - // return false + // return false; } // function called just before script delete // we free allocated memory @@ -95,7 +95,7 @@ class spell_ex_SpellScript : public SpellScript //EffectHandlers += EffectHandlerFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_EFFECT_ANY); } - //bool Load(){return true} + //bool Load(){return true;} //void Unload(){} //bool Validate(SpellEntry const * spellEntry){return true;} }; -- cgit v1.2.3