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
2365 {
2367 SpellInfo const* si = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[0].TriggerSpell);
2368 if (!si)
2369 return;
2370 SpellCastTargets targets;
2372 targets.SetDst(dest);
2373 CustomSpellValues values;
2374 int32 damage = si->Effects[0].CalcValue() + _energyLeft * _energyLeft * 8;
2375 values.AddSpellMod(SPELLVALUE_BASE_POINT0, damage);
2376 values.AddSpellMod(SPELLVALUE_BASE_POINT1, damage);
2377 values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage);
2378 GetCaster()->CastSpell(targets, si, &values, TRIGGERED_FULL_MASK);
2379 //SetEffectValue(GetEffectValue() + _energyLeft * _energyLeft * 8);
2380 }
std::int32_t int32
Definition: Define.h:103
@ SPELLVALUE_BASE_POINT1
Definition: SpellDefines.h:115
@ SPELLVALUE_BASE_POINT2
Definition: SpellDefines.h:116
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:114
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition: SpellDefines.h:148
#define sSpellMgr
Definition: SpellMgr.h:825
@ EFFECT_0
Definition: SharedDefines.h:31
Definition: Position.h:28
void GetPosition(float &x, float &y) const
Definition: Position.h:122
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:1168
Definition: Spell.h:109
void SetDst(float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
Definition: Spell.cpp:407
Definition: SpellDefines.h:163
void AddSpellMod(SpellValueMod mod, int32 value)
Definition: SpellDefines.h:165
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:2390

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.

2383 {
2387 }
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:337
#define SpellCastFn(F)
Definition: SpellScript.h:324
@ SPELL_EFFECT_TRIGGER_MISSILE
Definition: SharedDefines.h:810
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:2359
void CalculateDamage(SpellEffIndex)
Definition: boss_icecrown_gunship_battle.cpp:2364
void StoreEnergy()
Definition: boss_icecrown_gunship_battle.cpp:2354

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

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

Referenced by Register().

◆ StoreEnergy()

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

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