AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
spell_yogg_saron_lunatic_gaze Class Reference
Inheritance diagram for spell_yogg_saron_lunatic_gaze:
SpellScript _SpellScript

Private Member Functions

 PrepareSpellScript (spell_yogg_saron_lunatic_gaze)
 
void FilterTargets (std::list< WorldObject * > &targets)
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from SpellScript
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Spell *spell)
 
void _InitHit ()
 
bool _IsEffectPrevented (SpellEffIndex effIndex)
 
bool _IsDefaultEffectPrevented (SpellEffIndex effIndex)
 
void _PrepareScriptCall (SpellScriptHookType hookType)
 
void _FinishScriptCall ()
 
bool IsInCheckCastHook () const
 
bool IsInTargetHook () const
 
bool IsInHitPhase () const
 
bool IsInEffectHook () const
 
Unit * GetCaster ()
 
GameObject * GetGObjCaster ()
 
Unit * GetOriginalCaster ()
 
SpellInfo const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObject * GetExplTargetWorldObject ()
 
Unit * GetExplTargetUnit ()
 
GameObject * GetExplTargetGObj ()
 
Item * GetExplTargetItem ()
 
Unit * GetHitUnit ()
 
Creature * GetHitCreature ()
 
Player * GetHitPlayer ()
 
Item * GetHitItem ()
 
GameObject * GetHitGObj ()
 
WorldLocation * GetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
Spell * GetSpell ()
 
Aura * GetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
Item * GetCastItem ()
 
void CreateItem (uint32 effIndex, uint32 itemId)
 
SpellInfo const * GetTriggeringSpell ()
 
void FinishCast (SpellCastResult result)
 
void Cancel ()
 
void SetCustomCastResultMessage (SpellCustomErrors result)
 
- 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 bool Load ()
 
virtual void Unload ()
 
- Static Public Member Functions inherited from _SpellScript
static bool ValidateSpellInfo (std::initializer_list< uint32 > spellIds)
 
template<class T >
static bool ValidateSpellInfo (T const &spellIds)
 
- Public Attributes inherited from SpellScript
HookList< CastHandler > BeforeCast
 
HookList< CastHandler > OnCast
 
HookList< CastHandler > AfterCast
 
HookList< CheckCastHandler > OnCheckCast
 
HookList< EffectHandler > OnEffectLaunch
 
HookList< EffectHandler > OnEffectLaunchTarget
 
HookList< EffectHandler > OnEffectHit
 
HookList< EffectHandler > OnEffectHitTarget
 
HookList< BeforeHitHandler > BeforeHit
 
HookList< HitHandler > OnHit
 
HookList< HitHandler > AfterHit
 
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
 
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ FilterTargets()

void spell_yogg_saron_lunatic_gaze::FilterTargets ( std::list< WorldObject * > &  targets)
inlineprivate
2620 {
2621 Unit* caster = GetCaster();
2622 // 64168 inherits SPELL_ATTR2_IGNORE_LINE_OF_SIGHT from the aura triggering it, so the illusion room walls have to be checked here
2624
2625 targets.remove_if([caster, ignoreLos](WorldObject* target)
2626 {
2627 if (!target->HasInArc(M_PI, caster))
2628 return true;
2629
2630 return !ignoreLos && !caster->IsWithinLOSInMap(target, VMAP::ModelIgnoreFlags::M2);
2631 });
2632 }
@ SPELL_ATTR2_IGNORE_LINE_OF_SIGHT
Definition SharedDefines.h:446
bool HasAttribute(SpellAttr0 attribute) const
Definition SpellInfo.h:441
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:416
Unit * GetCaster()
Definition SpellScript.cpp:401
Definition Unit.h:665
Definition Object.h:482
bool IsWithinLOSInMap(WorldObject const *obj, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, Optional< float > collisionHeight={ }, Optional< float > combatReach={ }) const
Definition Object.cpp:1412
bool HasInArc(float arcangle, Position const *pos, float targetRadius=0.0f) const
Definition Position.cpp:148

References SpellScript::GetCaster(), SpellScript::GetSpellInfo(), SpellInfo::HasAttribute(), Position::HasInArc(), WorldObject::IsWithinLOSInMap(), VMAP::M2, and SPELL_ATTR2_IGNORE_LINE_OF_SIGHT.

Referenced by Register().

◆ PrepareSpellScript()

spell_yogg_saron_lunatic_gaze::PrepareSpellScript ( spell_yogg_saron_lunatic_gaze  )
private

◆ Register()

void spell_yogg_saron_lunatic_gaze::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2635 {
2637 }
@ TARGET_UNIT_SRC_AREA_ENEMY
Definition SharedDefines.h:1424
#define EFFECT_ALL
Definition SharedDefines.h:38
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition SpellScript.h:354
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition SpellScript.h:353
void FilterTargets(std::list< WorldObject * > &targets)
Definition boss_yoggsaron.cpp:2619

References EFFECT_ALL, FilterTargets(), SpellScript::OnObjectAreaTargetSelect, SpellObjectAreaTargetSelectFn, and TARGET_UNIT_SRC_AREA_ENEMY.


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