TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
spell_alexstrasza_gift_beam_visual::spell_alexstrasza_gift_beam_visual_AuraScript Class Reference

Public Member Functions

 spell_alexstrasza_gift_beam_visual_AuraScript ()
 
- Public Member Functions inherited from AuraScript
 AuraScript ()
 
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Aura *aura)
 
void _PrepareScriptCall (AuraScriptHookType hookType, AuraApplication const *aurApp=NULL)
 
void _FinishScriptCall ()
 
bool _IsDefaultActionPrevented ()
 
void PreventDefaultAction ()
 
SpellInfo constGetSpellInfo () const
 
uint32 GetId () const
 
ObjectGuid GetCasterGUID () const
 
UnitGetCaster () const
 
WorldObjectGetOwner () const
 
UnitGetUnitOwner () const
 
DynamicObjectGetDynobjOwner () const
 
void Remove (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
AuraGetAura () const
 
AuraObjectType GetType () const
 
int32 GetDuration () const
 
void SetDuration (int32 duration, bool withMods=false)
 
void RefreshDuration ()
 
time_t GetApplyTime () const
 
int32 GetMaxDuration () const
 
void SetMaxDuration (int32 duration)
 
int32 CalcMaxDuration () const
 
bool IsExpired () const
 
bool IsPermanent () const
 
uint8 GetCharges () const
 
void SetCharges (uint8 charges)
 
uint8 CalcMaxCharges () const
 
bool ModCharges (int8 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool DropCharge (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
uint8 GetStackAmount () const
 
void SetStackAmount (uint8 num)
 
bool ModStackAmount (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool IsPassive () const
 
bool IsDeathPersistent () const
 
bool HasEffect (uint8 effIndex) const
 
AuraEffectGetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
UnitGetTarget () const
 
AuraApplication constGetTargetApplication () const
 
- Public Member Functions inherited from _SpellScript
 _SpellScript ()
 
virtual ~_SpellScript ()
 
virtual void _Register ()
 
virtual void _Unload ()
 
virtual void _Init (std::string const *scriptname, uint32 spellId)
 
std::string const_GetScriptName () const
 
virtual bool Validate (SpellInfo const *)
 
virtual void Unload ()
 

Private Member Functions

 PrepareAuraScript (spell_alexstrasza_gift_beam_visual_AuraScript)
 
bool Load () override
 
void OnApply (AuraEffect const *, AuraEffectHandleModes)
 
void OnRemove (AuraEffect const *, AuraEffectHandleModes)
 
void Register () override
 

Private Attributes

GameObject_alexstraszaGift
 

Additional Inherited Members

- Public Attributes inherited from AuraScript
HookList< CheckAreaTargetHandlerDoCheckAreaTarget
 
HookList< AuraDispelHandlerOnDispel
 
HookList< AuraDispelHandlerAfterDispel
 
HookList< EffectApplyHandlerOnEffectApply
 
HookList< EffectApplyHandlerAfterEffectApply
 
HookList< EffectApplyHandlerOnEffectRemove
 
HookList< EffectApplyHandlerAfterEffectRemove
 
HookList< EffectPeriodicHandlerOnEffectPeriodic
 
HookList
< EffectUpdatePeriodicHandler
OnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandlerDoEffectCalcAmount
 
HookList
< EffectCalcPeriodicHandler
DoEffectCalcPeriodic
 
HookList
< EffectCalcSpellModHandler
DoEffectCalcSpellMod
 
HookList< EffectAbsorbHandlerOnEffectAbsorb
 
HookList< EffectAbsorbHandlerAfterEffectAbsorb
 
HookList< EffectManaShieldHandlerOnEffectManaShield
 
HookList< EffectManaShieldHandlerAfterEffectManaShield
 
HookList< EffectSplitHandlerOnEffectSplit
 
HookList< CheckProcHandlerDoCheckProc
 
HookList< AuraProcHandlerDoPrepareProc
 
HookList< AuraProcHandlerOnProc
 
HookList< AuraProcHandlerAfterProc
 
HookList< EffectProcHandlerOnEffectProc
 
HookList< EffectProcHandlerAfterEffectProc
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string constm_scriptName
 
uint32 m_scriptSpellId
 

Constructor & Destructor Documentation

spell_alexstrasza_gift_beam_visual::spell_alexstrasza_gift_beam_visual_AuraScript::spell_alexstrasza_gift_beam_visual_AuraScript ( )
inline
2425  {
2426  _alexstraszaGift = nullptr;
2427  }

Member Function Documentation

bool spell_alexstrasza_gift_beam_visual::spell_alexstrasza_gift_beam_visual_AuraScript::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

2431  {
2432  return GetCaster()->GetTypeId() == TYPEID_UNIT;
2433  }
Definition: ObjectGuid.h:32
TypeID GetTypeId() const
Definition: Object.h:113
Unit * GetCaster() const
Definition: SpellScript.cpp:1006

+ Here is the call graph for this function:

void spell_alexstrasza_gift_beam_visual::spell_alexstrasza_gift_beam_visual_AuraScript::OnApply ( AuraEffect const ,
AuraEffectHandleModes   
)
inlineprivate
2436  {
2437  if (Creature* target = GetTarget()->ToCreature())
2438  {
2439  if (target->GetMap()->GetDifficultyID() == DIFFICULTY_10_N)
2440  _alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_10, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0);
2441  else if (target->GetMap()->GetDifficultyID() == DIFFICULTY_25_N)
2442  _alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_25, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0);
2443  }
2444  }
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime)
Definition: Object.cpp:2372
Definition: DBCEnums.h:407
Definition: eye_of_eternity.h:67
Definition: Creature.h:467
Definition: eye_of_eternity.h:66
Unit * GetTarget() const
Definition: SpellScript.cpp:1151
Definition: DBCEnums.h:408

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void spell_alexstrasza_gift_beam_visual::spell_alexstrasza_gift_beam_visual_AuraScript::OnRemove ( AuraEffect const ,
AuraEffectHandleModes   
)
inlineprivate
2447  {
2448  if (Creature* target = GetTarget()->ToCreature())
2449  if (InstanceScript* instance = GetCaster()->GetInstanceScript())
2450  {
2452  if (GameObject* heartMagic = target->GetMap()->GetGameObject(instance->GetGuidData(DATA_HEART_OF_MAGIC_GUID)))
2453  {
2454  heartMagic->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
2455  // TO DO: This is hack, core doesn't have support for these flags,
2456  // remove line below if it ever gets supported otherwise object won't be accessible.
2457  heartMagic->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
2458  }
2459  }
2460  }
Map * GetMap() const
Definition: Object.h:543
Definition: SharedDefines.h:2125
Definition: SharedDefines.h:2123
Definition: Creature.h:467
Unit * GetTarget() const
Definition: SpellScript.cpp:1151
Definition: GameObject.h:880
Definition: eye_of_eternity.h:39
Definition: UpdateFields.h:319
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Unit * GetCaster() const
Definition: SpellScript.cpp:1006
Definition: InstanceScript.h:141
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

spell_alexstrasza_gift_beam_visual::spell_alexstrasza_gift_beam_visual_AuraScript::PrepareAuraScript ( spell_alexstrasza_gift_beam_visual_AuraScript  )
private
void spell_alexstrasza_gift_beam_visual::spell_alexstrasza_gift_beam_visual_AuraScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2463  {
2466  }
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
Definition: boss_malygos.cpp:2446
Definition: SharedDefines.h:28
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:704
void OnApply(AuraEffect const *, AuraEffectHandleModes)
Definition: boss_malygos.cpp:2435
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:703
Definition: SpellAuraDefines.h:39
HookList< EffectApplyHandler > OnEffectApply
Definition: SpellScript.h:688
Definition: SpellAuraDefines.h:64
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:693

+ Here is the call graph for this function:

Member Data Documentation

GameObject* spell_alexstrasza_gift_beam_visual::spell_alexstrasza_gift_beam_visual_AuraScript::_alexstraszaGift
private

The documentation for this class was generated from the following file: