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

Private Member Functions

 PrepareSpellScript (spell_igb_incinerating_blast)
 
void StoreEnergy ()
 
void RemoveEnergy ()
 
void CalculateDamage (SpellEffIndex)
 
void Register () override
 

Private Attributes

uint32 _energyLeft
 

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

◆ CalculateDamage()

void spell_igb_incinerating_blast::CalculateDamage ( SpellEffIndex  )
inlineprivate
2369 {
2371 SpellInfo const* si = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[0].TriggerSpell);
2372 if (!si)
2373 return;
2374 SpellCastTargets targets;
2376 targets.SetDst(dest);
2377 CustomSpellValues values;
2378 int32 damage = si->Effects[0].CalcValue() + _energyLeft * _energyLeft * 8;
2379 values.AddSpellMod(SPELLVALUE_BASE_POINT0, damage);
2380 values.AddSpellMod(SPELLVALUE_BASE_POINT1, damage);
2381 values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage);
2382 GetCaster()->CastSpell(targets, si, &values, TRIGGERED_FULL_MASK);
2383 //SetEffectValue(GetEffectValue() + _energyLeft * _energyLeft * 8);
2384 }
std::int32_t int32
Definition Define.h:103
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELLVALUE_BASE_POINT1
Definition SpellDefines.h:122
@ SPELLVALUE_BASE_POINT2
Definition SpellDefines.h:123
@ SPELLVALUE_BASE_POINT0
Definition SpellDefines.h:121
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition SpellDefines.h:158
#define sSpellMgr
Definition SpellMgr.h:847
Definition SpellDefines.h:173
void AddSpellMod(SpellValueMod mod, int32 value)
Definition SpellDefines.h:175
Definition Spell.h:121
void SetDst(float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
Definition Spell.cpp:443
Definition SpellInfo.h:340
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition SpellInfo.h:417
WorldLocation const * GetExplTargetDest()
Definition SpellScript.cpp:421
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:416
void PreventHitEffect(SpellEffIndex effIndex)
Definition SpellScript.cpp:584
Unit * GetCaster()
Definition SpellScript.cpp:401
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1372
uint32 _energyLeft
Definition boss_icecrown_gunship_battle.cpp:2394
Definition Position.h:27
void GetPosition(float &x, float &y) const
Definition Position.h:126

References _energyLeft, CustomSpellValues::AddSpellMod(), Unit::CastSpell(), EFFECT_0, SpellInfo::Effects, SpellScript::GetCaster(), SpellScript::GetExplTargetDest(), Position::GetPosition(), SpellScript::GetSpellInfo(), SpellScript::PreventHitEffect(), SpellCastTargets::SetDst(), SPELLVALUE_BASE_POINT0, SPELLVALUE_BASE_POINT1, SPELLVALUE_BASE_POINT2, sSpellMgr, and TRIGGERED_FULL_MASK.

Referenced by Register().

◆ PrepareSpellScript()

spell_igb_incinerating_blast::PrepareSpellScript ( spell_igb_incinerating_blast  )
private

◆ Register()

void spell_igb_incinerating_blast::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2387 {
2391 }
@ SPELL_EFFECT_TRIGGER_MISSILE
Definition SharedDefines.h:798
#define SpellEffectFn(F, I, N)
Definition SpellScript.h:337
#define SpellCastFn(F)
Definition SpellScript.h:324
HookList< CastHandler > AfterCast
Definition SpellScript.h:323
HookList< EffectHandler > OnEffectHit
Definition SpellScript.h:335
HookList< CastHandler > OnCast
Definition SpellScript.h:321
void RemoveEnergy()
Definition boss_icecrown_gunship_battle.cpp:2363
void CalculateDamage(SpellEffIndex)
Definition boss_icecrown_gunship_battle.cpp:2368
void StoreEnergy()
Definition boss_icecrown_gunship_battle.cpp:2358

References SpellScript::AfterCast, CalculateDamage(), EFFECT_0, SpellScript::OnCast, SpellScript::OnEffectHit, RemoveEnergy(), SPELL_EFFECT_TRIGGER_MISSILE, SpellCastFn, SpellEffectFn, and StoreEnergy().

◆ RemoveEnergy()

void spell_igb_incinerating_blast::RemoveEnergy ( )
inlineprivate
2364 {
2366 }
@ POWER_ENERGY
Definition SharedDefines.h:260
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool fromRegenerate=false)
Definition Unit.cpp:12038

References SpellScript::GetCaster(), POWER_ENERGY, and Unit::SetPower().

Referenced by Register().

◆ StoreEnergy()

void spell_igb_incinerating_blast::StoreEnergy ( )
inlineprivate
2359 {
2361 }
uint32 GetPower(Powers power) const
Definition Unit.h:1141

References _energyLeft, SpellScript::GetCaster(), Unit::GetPower(), and POWER_ENERGY.

Referenced by Register().

Member Data Documentation

◆ _energyLeft

uint32 spell_igb_incinerating_blast::_energyLeft
private

Referenced by CalculateDamage(), and StoreEnergy().


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