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

Private Member Functions

 PrepareSpellScript (spell_igb_incinerating_blast_SpellScript)
 
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::spell_igb_incinerating_blast_SpellScript::CalculateDamage ( SpellEffIndex  )
inlineprivate
2427 {
2429 SpellInfo const* si = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[0].TriggerSpell);
2430 if (!si)
2431 return;
2432 SpellCastTargets targets;
2434 targets.SetDst(dest);
2435 CustomSpellValues values;
2436 int32 damage = si->Effects[0].CalcValue() + _energyLeft * _energyLeft * 8;
2437 values.AddSpellMod(SPELLVALUE_BASE_POINT0, damage);
2438 values.AddSpellMod(SPELLVALUE_BASE_POINT1, damage);
2439 values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage);
2440 GetCaster()->CastSpell(targets, si, &values, TRIGGERED_FULL_MASK);
2441 //SetEffectValue(GetEffectValue() + _energyLeft * _energyLeft * 8);
2442 }
std::int32_t int32
Definition: Define.h:104
@ 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:818
@ EFFECT_0
Definition: SharedDefines.h:30
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:1169
Definition: Spell.h:109
void SetDst(float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
Definition: Spell.cpp:400
Definition: SpellDefines.h:162
void AddSpellMod(SpellValueMod mod, int32 value)
Definition: SpellDefines.h:164
Definition: SpellInfo.h:314
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition: SpellInfo.h:391
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:2451

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::spell_igb_incinerating_blast_SpellScript::PrepareSpellScript ( spell_igb_incinerating_blast_SpellScript  )
private

◆ Register()

void spell_igb_incinerating_blast::spell_igb_incinerating_blast_SpellScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2445 {
2449 }
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:337
#define SpellCastFn(F)
Definition: SpellScript.h:324
@ SPELL_EFFECT_TRIGGER_MISSILE
Definition: SharedDefines.h:782
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:2421
void StoreEnergy()
Definition: boss_icecrown_gunship_battle.cpp:2416
void CalculateDamage(SpellEffIndex)
Definition: boss_icecrown_gunship_battle.cpp:2426

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::spell_igb_incinerating_blast_SpellScript::RemoveEnergy ( )
inlineprivate
2422 {
2424 }
@ POWER_ENERGY
Definition: SharedDefines.h:244
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool fromRegenerate=false)
Definition: Unit.cpp:15458

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

Referenced by Register().

◆ StoreEnergy()

void spell_igb_incinerating_blast::spell_igb_incinerating_blast_SpellScript::StoreEnergy ( )
inlineprivate
2417 {
2419 }
uint32 GetPower(Powers power) const
Definition: Unit.h:1461

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

Referenced by Register().

Member Data Documentation

◆ _energyLeft

uint32 spell_igb_incinerating_blast::spell_igb_incinerating_blast_SpellScript::_energyLeft
private

Referenced by CalculateDamage(), and StoreEnergy().