2010-10-07 15:35:36 +02:00
/*
2011-01-01 15:01:13 +01:00
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
2010-10-07 15:35:36 +02:00
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
2010-07-24 22:41:42 +02:00
*/
2010-07-27 04:31:27 +02:00
#include <string>
2010-07-24 22:41:42 +02:00
#include "Spell.h"
2010-08-19 14:31:31 +02:00
#include "SpellAuras.h"
2010-08-24 16:07:52 +02:00
#include "SpellScript.h"
2011-05-31 20:02:55 +02:00
#include "SpellMgr.h"
2010-07-24 22:41:42 +02:00
2011-04-27 18:58:40 +02:00
bool _SpellScript :: _Validate ( SpellEntry const * entry )
2010-07-24 22:41:42 +02:00
{
if ( ! Validate ( entry ))
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Spell `%u` did not pass Validate() function of script `%s` - script will be not added to the spell" , entry -> Id , m_scriptName -> c_str ());
2010-07-24 22:41:42 +02:00
return false ;
}
return true ;
}
2010-10-04 17:44:49 +02:00
void _SpellScript :: _Register ()
{
m_currentScriptState = SPELL_SCRIPT_STATE_REGISTRATION ;
Register ();
m_currentScriptState = SPELL_SCRIPT_STATE_NONE ;
}
void _SpellScript :: _Unload ()
{
m_currentScriptState = SPELL_SCRIPT_STATE_UNLOADING ;
Unload ();
m_currentScriptState = SPELL_SCRIPT_STATE_NONE ;
}
2011-04-27 18:58:40 +02:00
void _SpellScript :: _Init ( std :: string const * scriptname , uint32 spellId )
2010-10-04 17:44:49 +02:00
{
m_currentScriptState = SPELL_SCRIPT_STATE_NONE ;
m_scriptName = scriptname ;
m_scriptSpellId = spellId ;
}
2010-07-24 22:41:42 +02:00
_SpellScript :: EffectHook :: EffectHook ( uint8 _effIndex )
{
// effect index must be in range <0;2>, allow use of special effindexes
ASSERT ( _effIndex == EFFECT_ALL || _effIndex == EFFECT_FIRST_FOUND || _effIndex < MAX_SPELL_EFFECTS );
effIndex = _effIndex ;
}
2011-04-27 18:58:40 +02:00
uint8 _SpellScript :: EffectHook :: GetAffectedEffectsMask ( SpellEntry const * spellEntry )
2010-07-24 22:41:42 +02:00
{
uint8 mask = 0 ;
if (( effIndex == EFFECT_ALL ) || ( effIndex == EFFECT_FIRST_FOUND ))
{
2011-06-12 02:30:32 +02:00
for ( uint8 i = 0 ; i < MAX_SPELL_EFFECTS ; ++ i )
2010-07-24 22:41:42 +02:00
{
if (( effIndex == EFFECT_FIRST_FOUND ) && mask )
return mask ;
2010-08-22 13:04:10 +06:00
if ( CheckEffect ( spellEntry , i ))
mask |= ( uint8 ) 1 << i ;
2010-07-24 22:41:42 +02:00
}
}
else
{
if ( CheckEffect ( spellEntry , effIndex ))
mask |= ( uint8 ) 1 << effIndex ;
}
return mask ;
}
2011-04-27 18:58:40 +02:00
bool _SpellScript :: EffectHook :: IsEffectAffected ( SpellEntry const * spellEntry , uint8 effIndex )
2010-07-24 22:41:42 +02:00
{
return GetAffectedEffectsMask ( spellEntry ) & 1 << effIndex ;
}
std :: string _SpellScript :: EffectHook :: EffIndexToString ()
{
switch ( effIndex )
{
case EFFECT_ALL :
return "EFFECT_ALL" ;
case EFFECT_FIRST_FOUND :
return "EFFECT_FIRST_FOUND" ;
case EFFECT_0 :
return "EFFECT_0" ;
case EFFECT_1 :
return "EFFECT_1" ;
case EFFECT_2 :
return "EFFECT_2" ;
}
return "Invalid Value" ;
}
2011-04-27 18:58:40 +02:00
bool _SpellScript :: EffectNameCheck :: Check ( SpellEntry const * spellEntry , uint8 effIndex )
2010-07-24 22:41:42 +02:00
{
if ( ! spellEntry -> Effect [ effIndex ] && ! effName )
return true ;
if ( ! spellEntry -> Effect [ effIndex ])
return false ;
return ( effName == SPELL_EFFECT_ANY ) || ( spellEntry -> Effect [ effIndex ] == effName );
}
std :: string _SpellScript :: EffectNameCheck :: ToString ()
{
switch ( effName )
{
case SPELL_EFFECT_ANY :
return "SPELL_EFFECT_ANY" ;
default :
char num [ 10 ];
2011-04-29 20:47:02 +02:00
sprintf ( num , "%u" , effName );
2010-07-24 22:41:42 +02:00
return num ;
}
}
2011-04-27 18:58:40 +02:00
bool _SpellScript :: EffectAuraNameCheck :: Check ( SpellEntry const * spellEntry , uint8 effIndex )
2010-07-24 22:41:42 +02:00
{
if ( ! spellEntry -> EffectApplyAuraName [ effIndex ] && ! effAurName )
return true ;
if ( ! spellEntry -> EffectApplyAuraName [ effIndex ])
return false ;
return ( effAurName == SPELL_EFFECT_ANY ) || ( spellEntry -> EffectApplyAuraName [ effIndex ] == effAurName );
}
std :: string _SpellScript :: EffectAuraNameCheck :: ToString ()
{
switch ( effAurName )
{
case SPELL_AURA_ANY :
return "SPELL_AURA_ANY" ;
default :
char num [ 10 ];
2011-04-29 20:47:02 +02:00
sprintf ( num , "%u" , effAurName );
2010-07-24 22:41:42 +02:00
return num ;
}
}
2011-03-04 21:18:38 +01:00
SpellScript :: CheckCastHandler :: CheckCastHandler ( SpellCheckCastFnType checkCastHandlerScript )
{
_checkCastHandlerScript = checkCastHandlerScript ;
}
SpellCastResult SpellScript :: CheckCastHandler :: Call ( SpellScript * spellScript )
{
return ( spellScript ->* _checkCastHandlerScript )();
}
2011-04-29 20:47:02 +02:00
SpellScript :: EffectHandler :: EffectHandler ( SpellEffectFnType _pEffectHandlerScript , uint8 _effIndex , uint16 _effName )
2010-07-24 22:41:42 +02:00
: _SpellScript :: EffectNameCheck ( _effName ), _SpellScript :: EffectHook ( _effIndex )
{
pEffectHandlerScript = _pEffectHandlerScript ;
}
std :: string SpellScript :: EffectHandler :: ToString ()
{
return "Index: " + EffIndexToString () + " Name: " + _SpellScript :: EffectNameCheck :: ToString ();
}
2011-04-27 18:58:40 +02:00
bool SpellScript :: EffectHandler :: CheckEffect ( SpellEntry const * spellEntry , uint8 effIndex )
2010-07-24 22:41:42 +02:00
{
return _SpellScript :: EffectNameCheck :: Check ( spellEntry , effIndex );
}
2011-04-27 18:58:40 +02:00
void SpellScript :: EffectHandler :: Call ( SpellScript * spellScript , SpellEffIndex effIndex )
2010-07-24 22:41:42 +02:00
{
( spellScript ->* pEffectHandlerScript )( effIndex );
}
2010-10-08 21:33:44 +02:00
SpellScript :: HitHandler :: HitHandler ( SpellHitFnType _pHitHandlerScript )
{
pHitHandlerScript = _pHitHandlerScript ;
}
2011-04-27 18:58:40 +02:00
void SpellScript :: HitHandler :: Call ( SpellScript * spellScript )
2010-10-08 21:33:44 +02:00
{
( spellScript ->* pHitHandlerScript )();
}
2010-07-24 22:41:42 +02:00
2011-01-21 23:42:51 +01:00
SpellScript :: UnitTargetHandler :: UnitTargetHandler ( SpellUnitTargetFnType _pUnitTargetHandlerScript , uint8 _effIndex , uint16 _targetType )
: _SpellScript :: EffectHook ( _effIndex ), targetType ( _targetType )
{
pUnitTargetHandlerScript = _pUnitTargetHandlerScript ;
}
std :: string SpellScript :: UnitTargetHandler :: ToString ()
{
std :: ostringstream oss ;
oss << "Index: " << EffIndexToString () << " Target: " << targetType ;
return oss . str ();
}
2011-04-27 18:58:40 +02:00
bool SpellScript :: UnitTargetHandler :: CheckEffect ( SpellEntry const * spellEntry , uint8 effIndex )
2011-01-21 23:42:51 +01:00
{
if ( ! targetType )
return false ;
2011-05-11 12:32:54 +06:00
return ( effIndex == EFFECT_ALL ) || ( spellEntry -> EffectImplicitTargetA [ effIndex ] == targetType || spellEntry -> EffectImplicitTargetB [ effIndex ] == targetType );
2011-01-21 23:42:51 +01:00
}
2011-04-27 18:58:40 +02:00
void SpellScript :: UnitTargetHandler :: Call ( SpellScript * spellScript , std :: list < Unit *>& unitTargets )
2011-01-21 23:42:51 +01:00
{
( spellScript ->* pUnitTargetHandlerScript )( unitTargets );
}
2011-06-11 22:35:29 +02:00
bool SpellScript :: _Validate ( SpellEntry const * entry )
2010-07-24 22:41:42 +02:00
{
2010-08-24 00:10:49 +02:00
for ( std :: list < EffectHandler >:: iterator itr = OnEffect . begin (); itr != OnEffect . end (); ++ itr )
2010-07-24 22:41:42 +02:00
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffect` of SpellScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2011-01-21 23:42:51 +01:00
for ( std :: list < UnitTargetHandler >:: iterator itr = OnUnitTargetSelect . begin (); itr != OnUnitTargetSelect . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnUnitTargetSelect` of SpellScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2011-01-21 23:42:51 +01:00
2010-10-04 17:44:49 +02:00
return _SpellScript :: _Validate ( entry );
2010-07-24 22:41:42 +02:00
}
2011-04-27 18:58:40 +02:00
bool SpellScript :: _Load ( Spell * spell )
2010-07-24 22:41:42 +02:00
{
m_spell = spell ;
2011-05-26 16:12:33 +02:00
_PrepareScriptCall (( SpellScriptHookType ) SPELL_SCRIPT_STATE_LOADING );
2010-10-04 17:44:49 +02:00
bool load = Load ();
2011-05-26 16:12:33 +02:00
_FinishScriptCall ();
2010-10-04 17:44:49 +02:00
return load ;
2010-07-24 22:41:42 +02:00
}
2010-08-19 14:31:31 +02:00
void SpellScript :: _InitHit ()
{
m_hitPreventEffectMask = 0 ;
m_hitPreventDefaultEffectMask = 0 ;
}
2010-10-05 08:17:10 +02:00
void SpellScript :: _PrepareScriptCall ( SpellScriptHookType hookType )
{
m_currentScriptState = hookType ;
}
void SpellScript :: _FinishScriptCall ()
{
m_currentScriptState = SPELL_SCRIPT_STATE_NONE ;
}
2011-04-27 18:58:40 +02:00
Unit * SpellScript :: GetCaster ()
2010-07-24 22:41:42 +02:00
{
return m_spell -> GetCaster ();
}
2011-04-27 18:58:40 +02:00
Unit * SpellScript :: GetOriginalCaster ()
2010-07-24 22:41:42 +02:00
{
2010-08-08 19:45:53 +02:00
return m_spell -> GetOriginalCaster ();
2010-07-24 22:41:42 +02:00
}
2011-04-27 18:58:40 +02:00
SpellEntry const * SpellScript :: GetSpellInfo ()
2010-07-24 22:41:42 +02:00
{
return m_spell -> GetSpellInfo ();
}
2011-06-23 13:28:52 +02:00
WorldLocation const * SpellScript :: GetTargetDest ()
2010-07-25 16:23:57 +02:00
{
if ( m_spell -> m_targets . HasDst ())
2011-06-23 13:28:52 +02:00
return m_spell -> m_targets . GetDst ();
2010-07-25 16:23:57 +02:00
return NULL ;
}
2011-06-23 13:28:52 +02:00
void SpellScript :: SetTargetDest ( WorldLocation & loc )
{
m_spell -> m_targets . SetDst ( loc );
}
2011-04-27 18:58:40 +02:00
Unit * SpellScript :: GetTargetUnit ()
2010-10-04 20:32:10 +02:00
{
2011-06-23 13:28:52 +02:00
return m_spell -> m_targets . GetUnitTarget ();
2010-10-04 20:32:10 +02:00
}
2011-04-27 18:58:40 +02:00
GameObject * SpellScript :: GetTargetGObj ()
2010-10-04 20:32:10 +02:00
{
2011-06-23 13:28:52 +02:00
return m_spell -> m_targets . GetGOTarget ();
2010-10-04 20:32:10 +02:00
}
2011-04-27 18:58:40 +02:00
Item * SpellScript :: GetTargetItem ()
2010-10-04 20:32:10 +02:00
{
2011-06-23 13:28:52 +02:00
return m_spell -> m_targets . GetItemTarget ();
2010-10-04 20:32:10 +02:00
}
2011-04-27 18:58:40 +02:00
Unit * SpellScript :: GetHitUnit ()
2010-07-24 22:41:42 +02:00
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return NULL ;
}
2010-08-08 19:45:53 +02:00
return m_spell -> unitTarget ;
2010-07-24 22:41:42 +02:00
}
2011-04-27 18:58:40 +02:00
Creature * SpellScript :: GetHitCreature ()
2010-07-24 22:41:42 +02:00
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return NULL ;
}
2010-07-24 22:41:42 +02:00
if ( m_spell -> unitTarget )
return m_spell -> unitTarget -> ToCreature ();
else
return NULL ;
}
2011-04-27 18:58:40 +02:00
Player * SpellScript :: GetHitPlayer ()
2010-07-24 22:41:42 +02:00
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return NULL ;
}
2010-07-24 22:41:42 +02:00
if ( m_spell -> unitTarget )
return m_spell -> unitTarget -> ToPlayer ();
else
return NULL ;
}
2011-04-27 18:58:40 +02:00
Item * SpellScript :: GetHitItem ()
2010-07-24 22:41:42 +02:00
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return NULL ;
}
2010-07-24 22:41:42 +02:00
return m_spell -> itemTarget ;
}
2011-04-27 18:58:40 +02:00
GameObject * SpellScript :: GetHitGObj ()
2010-07-24 22:41:42 +02:00
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return NULL ;
}
2010-07-24 22:41:42 +02:00
return m_spell -> gameObjTarget ;
}
2010-07-25 16:23:57 +02:00
int32 SpellScript :: GetHitDamage ()
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2011-04-23 15:53:48 +02:00
return 0 ;
2010-10-04 19:12:20 +02:00
}
2010-07-25 16:23:57 +02:00
return m_spell -> m_damage ;
}
void SpellScript :: SetHitDamage ( int32 damage )
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return ;
}
2010-07-25 16:23:57 +02:00
m_spell -> m_damage = damage ;
}
int32 SpellScript :: GetHitHeal ()
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2011-04-23 15:53:48 +02:00
return 0 ;
2010-10-04 19:12:20 +02:00
}
2010-07-25 16:23:57 +02:00
return m_spell -> m_healing ;
}
void SpellScript :: SetHitHeal ( int32 heal )
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return ;
}
2010-07-25 16:23:57 +02:00
m_spell -> m_healing = heal ;
}
2010-08-19 14:31:31 +02:00
Aura * SpellScript :: GetHitAura ()
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return NULL ;
}
2010-08-19 14:31:31 +02:00
if ( ! m_spell -> m_spellAura )
return NULL ;
if ( m_spell -> m_spellAura -> IsRemoved ())
return NULL ;
return m_spell -> m_spellAura ;
}
void SpellScript :: PreventHitAura ()
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return ;
}
2010-08-19 14:31:31 +02:00
if ( m_spell -> m_spellAura )
m_spell -> m_spellAura -> Remove ();
}
void SpellScript :: PreventHitEffect ( SpellEffIndex effIndex )
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return ;
}
2010-08-19 14:31:31 +02:00
m_hitPreventEffectMask |= 1 << effIndex ;
PreventHitDefaultEffect ( effIndex );
}
void SpellScript :: PreventHitDefaultEffect ( SpellEffIndex effIndex )
{
2010-10-04 19:12:20 +02:00
if ( ! IsInHitPhase ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return ;
}
2010-08-19 14:31:31 +02:00
m_hitPreventDefaultEffectMask |= 1 << effIndex ;
}
2010-07-24 22:41:42 +02:00
int32 SpellScript :: GetEffectValue ()
{
2010-10-04 19:12:20 +02:00
if ( ! IsInEffectHook ())
{
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 19:12:20 +02:00
return 0 ;
}
2010-07-24 22:41:42 +02:00
return m_spell -> damage ;
}
2010-08-18 00:20:23 +06:00
2011-04-27 18:58:40 +02:00
Item * SpellScript :: GetCastItem ()
2010-08-18 00:20:23 +06:00
{
return m_spell -> m_CastItem ;
}
2010-09-12 01:40:27 +02:00
void SpellScript :: CreateItem ( uint32 effIndex , uint32 itemId )
2010-08-18 00:20:23 +06:00
{
m_spell -> DoCreateItem ( effIndex , itemId );
}
2010-08-24 00:10:49 +02:00
2011-01-22 17:21:24 +01:00
void SpellScript :: FinishCast ( SpellCastResult result )
{
m_spell -> SendCastResult ( result );
m_spell -> finish ( result == SPELL_CAST_OK );
}
2011-03-04 21:18:38 +01:00
void SpellScript :: SetCustomCastResultMessage ( SpellCustomErrors result )
{
if ( ! IsInCheckCastHook ())
{
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!" , m_scriptName -> c_str (), m_scriptSpellId );
return ;
}
m_spell -> m_customError = result ;
}
2011-06-11 22:35:29 +02:00
bool AuraScript :: _Validate ( SpellEntry const * entry )
2010-08-24 00:10:49 +02:00
{
2011-05-31 20:02:55 +02:00
for ( std :: list < CheckAreaTargetHandler >:: iterator itr = DoCheckAreaTarget . begin (); itr != DoCheckAreaTarget . end (); ++ itr )
if ( ! HasAreaAuraEffect ( entry ))
sLog -> outError ( "TSCR: Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed" , entry -> Id , m_scriptName -> c_str ());
2010-08-24 00:10:49 +02:00
for ( std :: list < EffectApplyHandler >:: iterator itr = OnEffectApply . begin (); itr != OnEffectApply . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-08-24 00:10:49 +02:00
for ( std :: list < EffectApplyHandler >:: iterator itr = OnEffectRemove . begin (); itr != OnEffectRemove . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-08-24 00:10:49 +02:00
2011-05-25 17:13:32 +02:00
for ( std :: list < EffectApplyHandler >:: iterator itr = AfterEffectApply . begin (); itr != AfterEffectApply . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2011-05-25 17:13:32 +02:00
for ( std :: list < EffectApplyHandler >:: iterator itr = AfterEffectRemove . begin (); itr != AfterEffectRemove . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2011-05-25 17:13:32 +02:00
2010-08-24 00:10:49 +02:00
for ( std :: list < EffectPeriodicHandler >:: iterator itr = OnEffectPeriodic . begin (); itr != OnEffectPeriodic . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-08-24 00:10:49 +02:00
for ( std :: list < EffectUpdatePeriodicHandler >:: iterator itr = OnEffectUpdatePeriodic . begin (); itr != OnEffectUpdatePeriodic . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-08-24 00:10:49 +02:00
2010-12-27 20:14:54 +01:00
for ( std :: list < EffectCalcAmountHandler >:: iterator itr = DoEffectCalcAmount . begin (); itr != DoEffectCalcAmount . end (); ++ itr )
2010-08-24 00:10:49 +02:00
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-08-24 00:10:49 +02:00
2010-12-27 20:14:54 +01:00
for ( std :: list < EffectCalcPeriodicHandler >:: iterator itr = DoEffectCalcPeriodic . begin (); itr != DoEffectCalcPeriodic . end (); ++ itr )
2010-08-24 00:10:49 +02:00
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-08-24 00:10:49 +02:00
2010-12-27 20:14:54 +01:00
for ( std :: list < EffectCalcSpellModHandler >:: iterator itr = DoEffectCalcSpellMod . begin (); itr != DoEffectCalcSpellMod . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-12-27 20:14:54 +01:00
for ( std :: list < EffectAbsorbHandler >:: iterator itr = OnEffectAbsorb . begin (); itr != OnEffectAbsorb . end (); ++ itr )
2010-08-24 00:10:49 +02:00
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-12-30 02:03:46 +01:00
for ( std :: list < EffectAbsorbHandler >:: iterator itr = AfterEffectAbsorb . begin (); itr != AfterEffectAbsorb . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-08-24 00:10:49 +02:00
2010-12-30 19:05:19 +01:00
for ( std :: list < EffectManaShieldHandler >:: iterator itr = OnEffectManaShield . begin (); itr != OnEffectManaShield . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-12-30 19:05:19 +01:00
for ( std :: list < EffectManaShieldHandler >:: iterator itr = AfterEffectManaShield . begin (); itr != AfterEffectManaShield . end (); ++ itr )
if ( ! ( * itr ). GetAffectedEffectsMask ( entry ))
2011-05-25 18:00:35 +02:00
sLog -> outError ( "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed" , entry -> Id , ( * itr ). ToString (). c_str (), m_scriptName -> c_str ());
2010-12-30 19:05:19 +01:00
2010-10-04 17:44:49 +02:00
return _SpellScript :: _Validate ( entry );
2010-08-24 00:10:49 +02:00
}
2011-05-31 20:02:55 +02:00
AuraScript :: CheckAreaTargetHandler :: CheckAreaTargetHandler ( AuraCheckAreaTargetFnType _pHandlerScript )
{
pHandlerScript = _pHandlerScript ;
}
2011-06-11 22:35:29 +02:00
bool AuraScript :: CheckAreaTargetHandler :: Call ( AuraScript * auraScript , Unit * _target )
2011-05-31 20:02:55 +02:00
{
return ( auraScript ->* pHandlerScript )( _target );
}
2010-08-24 00:10:49 +02:00
AuraScript :: EffectBase :: EffectBase ( uint8 _effIndex , uint16 _effName )
: _SpellScript :: EffectAuraNameCheck ( _effName ), _SpellScript :: EffectHook ( _effIndex )
{
}
2011-04-27 18:58:40 +02:00
bool AuraScript :: EffectBase :: CheckEffect ( SpellEntry const * spellEntry , uint8 effIndex )
2010-08-24 00:10:49 +02:00
{
return _SpellScript :: EffectAuraNameCheck :: Check ( spellEntry , effIndex );
}
std :: string AuraScript :: EffectBase :: ToString ()
{
return "Index: " + EffIndexToString () + " AuraName: " + _SpellScript :: EffectAuraNameCheck :: ToString ();
}
2011-04-29 20:47:02 +02:00
AuraScript :: EffectPeriodicHandler :: EffectPeriodicHandler ( AuraEffectPeriodicFnType _pEffectHandlerScript , uint8 _effIndex , uint16 _effName )
2010-08-24 00:10:49 +02:00
: AuraScript :: EffectBase ( _effIndex , _effName )
{
pEffectHandlerScript = _pEffectHandlerScript ;
}
2011-04-27 18:58:40 +02:00
void AuraScript :: EffectPeriodicHandler :: Call ( AuraScript * auraScript , AuraEffect const * _aurEff )
2010-08-24 00:10:49 +02:00
{
2010-12-27 20:14:54 +01:00
( auraScript ->* pEffectHandlerScript )( _aurEff );
2010-08-24 00:10:49 +02:00
}
2011-04-29 20:47:02 +02:00
AuraScript :: EffectUpdatePeriodicHandler :: EffectUpdatePeriodicHandler ( AuraEffectUpdatePeriodicFnType _pEffectHandlerScript , uint8 _effIndex , uint16 _effName )
2010-08-24 00:10:49 +02:00
: AuraScript :: EffectBase ( _effIndex , _effName )
{
pEffectHandlerScript = _pEffectHandlerScript ;
}
2011-04-27 18:58:40 +02:00
void AuraScript :: EffectUpdatePeriodicHandler :: Call ( AuraScript * auraScript , AuraEffect * aurEff )
2010-08-24 00:10:49 +02:00
{
( auraScript ->* pEffectHandlerScript )( aurEff );
}
2011-04-29 20:47:02 +02:00
AuraScript :: EffectCalcAmountHandler :: EffectCalcAmountHandler ( AuraEffectCalcAmountFnType _pEffectHandlerScript , uint8 _effIndex , uint16 _effName )
2010-08-24 00:10:49 +02:00
: AuraScript :: EffectBase ( _effIndex , _effName )
{
pEffectHandlerScript = _pEffectHandlerScript ;
}
2011-04-27 18:58:40 +02:00
void AuraScript :: EffectCalcAmountHandler :: Call ( AuraScript * auraScript , AuraEffect const * aurEff , int32 & amount , bool & canBeRecalculated )
2010-08-24 00:10:49 +02:00
{
( auraScript ->* pEffectHandlerScript )( aurEff , amount , canBeRecalculated );
}
2011-04-27 18:58:40 +02:00
AuraScript :: EffectCalcPeriodicHandler :: EffectCalcPeriodicHandler ( AuraEffectCalcPeriodicFnType _pEffectHandlerScript , uint8 _effIndex , uint16 _effName )
2010-08-24 00:10:49 +02:00
: AuraScript :: EffectBase ( _effIndex , _effName )
{
pEffectHandlerScript = _pEffectHandlerScript ;
}
2011-04-27 18:58:40 +02:00
void AuraScript :: EffectCalcPeriodicHandler :: Call ( AuraScript * auraScript , AuraEffect const * aurEff , bool & isPeriodic , int32 & periodicTimer )
2010-08-24 00:10:49 +02:00
{
( auraScript ->* pEffectHandlerScript )( aurEff , isPeriodic , periodicTimer );
}
2011-04-27 18:58:40 +02:00
AuraScript :: EffectCalcSpellModHandler :: EffectCalcSpellModHandler ( AuraEffectCalcSpellModFnType _pEffectHandlerScript , uint8 _effIndex , uint16 _effName )
2010-08-24 00:10:49 +02:00
: AuraScript :: EffectBase ( _effIndex , _effName )
{
pEffectHandlerScript = _pEffectHandlerScript ;
}
2011-04-27 18:58:40 +02:00
void AuraScript :: EffectCalcSpellModHandler :: Call ( AuraScript * auraScript , AuraEffect const * aurEff , SpellModifier *& spellMod )
2010-08-24 00:10:49 +02:00
{
( auraScript ->* pEffectHandlerScript )( aurEff , spellMod );
}
2011-04-27 18:58:40 +02:00
AuraScript :: EffectApplyHandler :: EffectApplyHandler ( AuraEffectApplicationModeFnType _pEffectHandlerScript , uint8 _effIndex , uint16 _effName , AuraEffectHandleModes _mode )
2010-08-24 00:10:49 +02:00
: AuraScript :: EffectBase ( _effIndex , _effName )
{
pEffectHandlerScript = _pEffectHandlerScript ;
mode = _mode ;
}
2011-06-11 22:35:29 +02:00
void AuraScript :: EffectApplyHandler :: Call ( AuraScript * auraScript , AuraEffect const * _aurEff , AuraEffectHandleModes _mode )
2010-08-24 00:10:49 +02:00
{
if ( _mode & mode )
2010-12-27 20:14:54 +01:00
( auraScript ->* pEffectHandlerScript )( _aurEff , _mode );
}
2011-04-29 20:47:02 +02:00
AuraScript :: EffectAbsorbHandler :: EffectAbsorbHandler ( AuraEffectAbsorbFnType _pEffectHandlerScript , uint8 _effIndex )
2010-12-27 20:14:54 +01:00
: AuraScript :: EffectBase ( _effIndex , SPELL_AURA_SCHOOL_ABSORB )
{
pEffectHandlerScript = _pEffectHandlerScript ;
}
2011-04-27 18:58:40 +02:00
void AuraScript :: EffectAbsorbHandler :: Call ( AuraScript * auraScript , AuraEffect * aurEff , DamageInfo & dmgInfo , uint32 & absorbAmount )
2010-12-27 20:14:54 +01:00
{
( auraScript ->* pEffectHandlerScript )( aurEff , dmgInfo , absorbAmount );
2010-08-24 00:10:49 +02:00
}
2011-04-27 18:58:40 +02:00
AuraScript :: EffectManaShieldHandler :: EffectManaShieldHandler ( AuraEffectAbsorbFnType _pEffectHandlerScript , uint8 _effIndex )
2010-12-30 19:05:19 +01:00
: AuraScript :: EffectBase ( _effIndex , SPELL_AURA_MANA_SHIELD )
{
pEffectHandlerScript = _pEffectHandlerScript ;
}
2011-04-27 18:58:40 +02:00
void AuraScript :: EffectManaShieldHandler :: Call ( AuraScript * auraScript , AuraEffect * aurEff , DamageInfo & dmgInfo , uint32 & absorbAmount )
2010-12-30 19:05:19 +01:00
{
( auraScript ->* pEffectHandlerScript )( aurEff , dmgInfo , absorbAmount );
}
2011-04-27 18:58:40 +02:00
bool AuraScript :: _Load ( Aura * aura )
2010-08-24 00:10:49 +02:00
{
m_aura = aura ;
2011-05-26 16:12:33 +02:00
_PrepareScriptCall (( AuraScriptHookType ) SPELL_SCRIPT_STATE_LOADING , NULL );
2010-10-04 17:44:49 +02:00
bool load = Load ();
2011-05-26 16:12:33 +02:00
_FinishScriptCall ();
2010-10-04 17:44:49 +02:00
return load ;
}
2011-04-27 18:58:40 +02:00
void AuraScript :: _PrepareScriptCall ( AuraScriptHookType hookType , AuraApplication const * aurApp )
2010-10-04 17:44:49 +02:00
{
2011-05-26 16:12:33 +02:00
m_scriptStates . push ( ScriptStateStore ( m_currentScriptState , m_auraApplication , m_defaultActionPrevented ));
2010-10-04 17:44:49 +02:00
m_currentScriptState = hookType ;
2011-05-26 16:12:33 +02:00
m_defaultActionPrevented = false ;
2010-12-27 20:14:54 +01:00
m_auraApplication = aurApp ;
2010-10-04 17:44:49 +02:00
}
void AuraScript :: _FinishScriptCall ()
{
2011-05-26 16:12:33 +02:00
ScriptStateStore stateStore = m_scriptStates . top ();
m_currentScriptState = stateStore . _currentScriptState ;
m_auraApplication = stateStore . _auraApplication ;
m_defaultActionPrevented = stateStore . _defaultActionPrevented ;
m_scriptStates . pop ();
2010-10-04 17:44:49 +02:00
}
bool AuraScript :: _IsDefaultActionPrevented ()
{
switch ( m_currentScriptState )
{
case AURA_SCRIPT_HOOK_EFFECT_APPLY :
case AURA_SCRIPT_HOOK_EFFECT_REMOVE :
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC :
return m_defaultActionPrevented ;
default :
2011-05-26 16:12:33 +02:00
ASSERT ( false && "AuraScript::_IsDefaultActionPrevented is called in a wrong place" );
2010-10-04 17:44:49 +02:00
return false ;
}
}
2010-10-07 14:00:52 +02:00
void AuraScript :: PreventDefaultAction ()
2010-10-04 17:44:49 +02:00
{
switch ( m_currentScriptState )
{
case AURA_SCRIPT_HOOK_EFFECT_APPLY :
case AURA_SCRIPT_HOOK_EFFECT_REMOVE :
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC :
m_defaultActionPrevented = true ;
break ;
default :
2010-12-23 23:25:44 +01:00
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!" , m_scriptName -> c_str (), m_scriptSpellId );
2010-10-04 17:44:49 +02:00
break ;
}
2010-08-24 00:10:49 +02:00
}
SpellEntry const * AuraScript :: GetSpellProto () const
{
return m_aura -> GetSpellProto ();
}
uint32 AuraScript :: GetId () const
{
return m_aura -> GetId ();
}
uint64 const & AuraScript :: GetCasterGUID () const
{
return m_aura -> GetCasterGUID ();
}
Unit * AuraScript :: GetCaster () const
{
return m_aura -> GetCaster ();
}
WorldObject * AuraScript :: GetOwner () const
{
return m_aura -> GetOwner ();
}
Unit * AuraScript :: GetUnitOwner () const
{
return m_aura -> GetUnitOwner ();
}
DynamicObject * AuraScript :: GetDynobjOwner () const
{
return m_aura -> GetDynobjOwner ();
}
void AuraScript :: Remove ( uint32 removeMode )
{
m_aura -> Remove (( AuraRemoveMode ) removeMode );
}
Aura * AuraScript :: GetAura () const
{
return m_aura ;
}
AuraObjectType AuraScript :: GetType () const
{
return m_aura -> GetType ();
}
int32 AuraScript :: GetDuration () const
{
return m_aura -> GetDuration ();
}
void AuraScript :: SetDuration ( int32 duration , bool withMods )
{
m_aura -> SetDuration ( duration , withMods );
}
void AuraScript :: RefreshDuration ()
{
m_aura -> RefreshDuration ();
}
time_t AuraScript :: GetApplyTime () const
{
return m_aura -> GetApplyTime ();
}
int32 AuraScript :: GetMaxDuration () const
{
return m_aura -> GetMaxDuration ();
}
void AuraScript :: SetMaxDuration ( int32 duration )
{
m_aura -> SetMaxDuration ( duration );
}
2011-06-07 17:25:34 +02:00
int32 AuraScript :: CalcMaxDuration () const
{
return m_aura -> CalcMaxDuration ();
}
2010-08-24 00:10:49 +02:00
bool AuraScript :: IsExpired () const
{
return m_aura -> IsExpired ();
}
bool AuraScript :: IsPermanent () const
{
return m_aura -> IsPermanent ();
}
uint8 AuraScript :: GetCharges () const
{
return m_aura -> GetCharges ();
}
void AuraScript :: SetCharges ( uint8 charges )
{
m_aura -> SetCharges ( charges );
}
2011-06-07 17:25:34 +02:00
uint8 AuraScript :: CalcMaxCharges () const
{
return m_aura -> CalcMaxCharges ();
}
bool AuraScript :: ModCharges ( int8 num , AuraRemoveMode removeMode /*= AURA_REMOVE_BY_DEFAULT*/ )
{
return m_aura -> ModCharges ( num , removeMode );
}
bool AuraScript :: DropCharge ( AuraRemoveMode removeMode )
2010-08-24 00:10:49 +02:00
{
2011-06-07 17:25:34 +02:00
return m_aura -> DropCharge ( removeMode );
2010-08-24 00:10:49 +02:00
}
uint8 AuraScript :: GetStackAmount () const
{
return m_aura -> GetStackAmount ();
}
2011-05-29 13:18:47 +02:00
void AuraScript :: SetStackAmount ( uint8 num )
2010-08-24 00:10:49 +02:00
{
2011-05-29 13:18:47 +02:00
m_aura -> SetStackAmount ( num );
2010-08-24 00:10:49 +02:00
}
2011-06-07 17:25:34 +02:00
bool AuraScript :: ModStackAmount ( int32 num , AuraRemoveMode removeMode )
2010-08-24 00:10:49 +02:00
{
2011-05-29 13:18:47 +02:00
return m_aura -> ModStackAmount ( num , removeMode );
2010-08-24 00:10:49 +02:00
}
bool AuraScript :: IsPassive () const
{
return m_aura -> IsPassive ();
}
bool AuraScript :: IsDeathPersistent () const
{
return m_aura -> IsDeathPersistent ();
}
bool AuraScript :: HasEffect ( uint8 effIndex ) const
{
return m_aura -> HasEffect ( effIndex );
}
AuraEffect * AuraScript :: GetEffect ( uint8 effIndex ) const
{
return m_aura -> GetEffect ( effIndex );
}
bool AuraScript :: HasEffectType ( AuraType type ) const
{
return m_aura -> HasEffectType ( type );
}
2011-04-27 18:58:40 +02:00
Unit * AuraScript :: GetTarget () const
2010-12-27 20:14:54 +01:00
{
2011-05-19 13:22:17 +02:00
switch ( m_currentScriptState )
{
case AURA_SCRIPT_HOOK_EFFECT_APPLY :
case AURA_SCRIPT_HOOK_EFFECT_REMOVE :
2011-05-26 17:44:07 +02:00
case AURA_SCRIPT_HOOK_EFFECT_AFTER_APPLY :
case AURA_SCRIPT_HOOK_EFFECT_AFTER_REMOVE :
2011-05-19 13:22:17 +02:00
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC :
case AURA_SCRIPT_HOOK_EFFECT_ABSORB :
case AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB :
case AURA_SCRIPT_HOOK_EFFECT_MANASHIELD :
case AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD :
return m_auraApplication -> GetTarget ();
default :
sLog -> outError ( "TSCR: Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!" , m_scriptName -> c_str (), m_scriptSpellId );
}
return NULL ;
2010-12-27 20:14:54 +01:00
}
2011-04-27 18:58:40 +02:00
AuraApplication const * AuraScript :: GetTargetApplication () const
2010-12-27 20:14:54 +01:00
{
return m_auraApplication ;
}