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

Private Member Functions

 PrepareSpellScript (spell_blood_council_summon_shadow_resonance)
 
void SetDest (SpellDestination &dest)
 
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

◆ PrepareSpellScript()

spell_blood_council_summon_shadow_resonance::PrepareSpellScript ( spell_blood_council_summon_shadow_resonance  )
private

◆ Register()

void spell_blood_council_summon_shadow_resonance::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1713 {
1715 }
@ EFFECT_0
Definition SharedDefines.h:31
@ TARGET_DEST_CASTER_RANDOM
Definition SharedDefines.h:1480
#define SpellDestinationTargetSelectFn(F, I, N)
Definition SpellScript.h:364
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Definition SpellScript.h:363
void SetDest(SpellDestination &dest)
Definition boss_blood_prince_council.cpp:1682

References EFFECT_0, SpellScript::OnDestinationTargetSelect, SetDest(), SpellDestinationTargetSelectFn, and TARGET_DEST_CASTER_RANDOM.

◆ SetDest()

void spell_blood_council_summon_shadow_resonance::SetDest ( SpellDestination &  dest)
inlineprivate
1683 {
1684 Unit* summoner = GetCaster();
1685 float x = dest._position.GetPositionX();
1686 float y = dest._position.GetPositionY();
1687 float angle = summoner->GetAngle(x, y);
1688 if (dest._position.GetExactDist2d(summoner) > 35.0f && x > 4585.0f && y > 2716.0f && y < 2822.0f)
1689 return;
1690
1691 for (uint8 a = 0; a < 2; ++a)
1692 for (uint8 i = 6; i > 0; --i)
1693 {
1694 float destX = summoner->GetPositionX() + cos(angle + a * M_PI) * i * 10.0f;
1695 float destY = summoner->GetPositionY() + std::sin(angle + a * M_PI) * i * 10.0f;
1696 if (summoner->GetMap()->isInLineOfSight(summoner->GetPositionX(), summoner->GetPositionY(), summoner->GetPositionZ() + 10.0f, destX, destY,
1698 destX > 4585.0f && destY > 2716.0f && destY < 2822.0f)
1699 {
1700 float destZ = summoner->GetMapHeight(destX, destY, summoner->GetPositionZ());
1701 if (std::fabs(destZ - summoner->GetPositionZ()) < 10.0f) // valid z found
1702 {
1703 dest._position.Relocate(destX, destY, destZ);
1704 return;
1705 }
1706 }
1707 }
1708
1709 dest._position.Relocate(summoner->GetPositionX(), summoner->GetPositionY(), summoner->GetPositionZ());
1710 }
std::uint8_t uint8
Definition Define.h:109
@ LINEOFSIGHT_ALL_CHECKS
Definition Map.h:115
bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks, VMAP::ModelIgnoreFlags ignoreFlags) const
Definition Map.cpp:1567
Unit * GetCaster()
Definition SpellScript.cpp:401
Definition Unit.h:665
uint32 GetPhaseMask() const
Definition Object.h:523
Map * GetMap() const
Definition Object.h:637
float GetMapHeight(float x, float y, float z, bool vmap=true, float distanceToSearch=50.0f) const
Definition Object.cpp:3145
float GetAngle(Position const *pos) const
Definition Position.cpp:85
float GetExactDist2d(const float x, const float y) const
Definition Position.h:170
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
void Relocate(float x, float y)
Definition Position.h:77
WorldLocation _position
Definition Spell.h:115

References SpellDestination::_position, Position::GetAngle(), SpellScript::GetCaster(), Position::GetExactDist2d(), WorldObject::GetMap(), WorldObject::GetMapHeight(), WorldObject::GetPhaseMask(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Map::isInLineOfSight(), LINEOFSIGHT_ALL_CHECKS, VMAP::Nothing, and Position::Relocate().

Referenced by Register().


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