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
 
UnitGetCaster ()
 
UnitGetOriginalCaster ()
 
SpellInfo const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObjectGetExplTargetWorldObject ()
 
UnitGetExplTargetUnit ()
 
GameObjectGetExplTargetGObj ()
 
ItemGetExplTargetItem ()
 
UnitGetHitUnit ()
 
CreatureGetHitCreature ()
 
PlayerGetHitPlayer ()
 
ItemGetHitItem ()
 
GameObjectGetHitGObj ()
 
WorldLocationGetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
SpellGetSpell ()
 
AuraGetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
ItemGetCastItem ()
 
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 void Register ()=0
 
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< CastHandlerBeforeCast
 
HookList< CastHandlerOnCast
 
HookList< CastHandlerAfterCast
 
HookList< CheckCastHandlerOnCheckCast
 
HookList< EffectHandlerOnEffectLaunch
 
HookList< EffectHandlerOnEffectLaunchTarget
 
HookList< EffectHandlerOnEffectHit
 
HookList< EffectHandlerOnEffectHitTarget
 
HookList< BeforeHitHandlerBeforeHit
 
HookList< HitHandlerOnHit
 
HookList< HitHandlerAfterHit
 
HookList< ObjectAreaTargetSelectHandlerOnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandlerOnObjectTargetSelect
 
HookList< DestinationTargetSelectHandlerOnDestinationTargetSelect
 
virtual bool _Validate (SpellInfo const *entry)
 
- 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
2367 {
2369 SpellInfo const* si = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[0].TriggerSpell);
2370 if (!si)
2371 return;
2372 SpellCastTargets targets;
2374 targets.SetDst(dest);
2375 CustomSpellValues values;
2376 int32 damage = si->Effects[0].CalcValue() + _energyLeft * _energyLeft * 8;
2377 values.AddSpellMod(SPELLVALUE_BASE_POINT0, damage);
2378 values.AddSpellMod(SPELLVALUE_BASE_POINT1, damage);
2379 values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage);
2380 GetCaster()->CastSpell(targets, si, &values, TRIGGERED_FULL_MASK);
2381 //SetEffectValue(GetEffectValue() + _energyLeft * _energyLeft * 8);
2382 }
std::int32_t int32
Definition: Define.h:103
@ EFFECT_0
Definition: SharedDefines.h:31
@ SPELLVALUE_BASE_POINT1
Definition: SpellDefines.h:114
@ SPELLVALUE_BASE_POINT2
Definition: SpellDefines.h:115
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:113
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition: SpellDefines.h:150
#define sSpellMgr
Definition: SpellMgr.h:825
Definition: Position.h:27
void GetPosition(float &x, float &y) const
Definition: Position.h:121
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:1167
Definition: Spell.h:111
void SetDst(float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
Definition: Spell.cpp:406
Definition: SpellDefines.h:165
void AddSpellMod(SpellValueMod mod, int32 value)
Definition: SpellDefines.h:167
Definition: SpellInfo.h:316
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition: SpellInfo.h:393
WorldLocation const * GetExplTargetDest()
Definition: SpellScript.cpp:416
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:411
void PreventHitEffect(SpellEffIndex effIndex)
Definition: SpellScript.cpp:579
Unit * GetCaster()
Definition: SpellScript.cpp:401
uint32 _energyLeft
Definition: boss_icecrown_gunship_battle.cpp:2392

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.

2385 {
2389 }
@ SPELL_EFFECT_TRIGGER_MISSILE
Definition: SharedDefines.h:810
#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:2361
void CalculateDamage(SpellEffIndex)
Definition: boss_icecrown_gunship_battle.cpp:2366
void StoreEnergy()
Definition: boss_icecrown_gunship_battle.cpp:2356

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
2362 {
2364 }
@ POWER_ENERGY
Definition: SharedDefines.h:272
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool fromRegenerate=false)
Definition: Unit.cpp:15566

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

Referenced by Register().

◆ StoreEnergy()

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

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().