AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ProcEventInfo Class Reference

#include "Unit.h"

Public Member Functions

 ProcEventInfo (Unit *actor, Unit *actionTarget, Unit *procTarget, uint32 typeMask, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell const *spell, DamageInfo *damageInfo, HealInfo *healInfo, SpellInfo const *triggeredByAuraSpell=nullptr, int8 procAuraEffectIndex=-1)
 
UnitGetActor ()
 
UnitGetActionTarget () const
 
UnitGetProcTarget () const
 
uint32 GetTypeMask () const
 
uint32 GetSpellTypeMask () const
 
uint32 GetSpellPhaseMask () const
 
uint32 GetHitMask () const
 
SpellInfo const * GetSpellInfo () const
 
SpellSchoolMask GetSchoolMask () const
 
Spell const * GetProcSpell () const
 
DamageInfoGetDamageInfo () const
 
HealInfoGetHealInfo () const
 
SpellInfo const * GetTriggerAuraSpell () const
 
int8 GetTriggerAuraEffectIndex () const
 
uint32 GetProcCooldown () const
 
void SetProcCooldown (uint32 cooldown)
 
std::optional< float > GetProcChance () const
 
void SetProcChance (float chance)
 
void ResetProcChance ()
 

Private Attributes

Unit *const _actor
 
Unit *const _actionTarget
 
Unit *const _procTarget
 
uint32 _typeMask
 
uint32 _spellTypeMask
 
uint32 _spellPhaseMask
 
uint32 _hitMask
 
uint32 _cooldown
 
Spell const * _spell
 
DamageInfo_damageInfo
 
HealInfo_healInfo
 
SpellInfo const *const _triggeredByAuraSpell
 
int8 _procAuraEffectIndex
 
std::optional< float > _chance
 

Detailed Description

Constructor & Destructor Documentation

◆ ProcEventInfo()

ProcEventInfo::ProcEventInfo ( Unit actor,
Unit actionTarget,
Unit procTarget,
uint32  typeMask,
uint32  spellTypeMask,
uint32  spellPhaseMask,
uint32  hitMask,
Spell const *  spell,
DamageInfo damageInfo,
HealInfo healInfo,
SpellInfo const *  triggeredByAuraSpell = nullptr,
int8  procAuraEffectIndex = -1 
)
explicit
180 : _actor(actor), _actionTarget(actionTarget), _procTarget(procTarget), _typeMask(typeMask), _spellTypeMask(spellTypeMask), _spellPhaseMask(spellPhaseMask),
181 _hitMask(hitMask), _spell(spell), _damageInfo(damageInfo), _healInfo(healInfo), _triggeredByAuraSpell(triggeredByAuraSpell), _procAuraEffectIndex(procAuraEffectIndex)
182{
183 _chance.reset();
184}
DamageInfo * _damageInfo
Definition: Unit.h:850
HealInfo * _healInfo
Definition: Unit.h:851
Spell const * _spell
Definition: Unit.h:849
std::optional< float > _chance
Definition: Unit.h:854
int8 _procAuraEffectIndex
Definition: Unit.h:853
Unit *const _actionTarget
Definition: Unit.h:842
SpellInfo const *const _triggeredByAuraSpell
Definition: Unit.h:852
uint32 _hitMask
Definition: Unit.h:847
uint32 _spellTypeMask
Definition: Unit.h:845
Unit *const _actor
Definition: Unit.h:841
uint32 _typeMask
Definition: Unit.h:844
uint32 _spellPhaseMask
Definition: Unit.h:846
Unit *const _procTarget
Definition: Unit.h:843

References _chance.

Member Function Documentation

◆ GetActionTarget()

Unit * ProcEventInfo::GetActionTarget ( ) const
inline
859{ return _actionTarget; }

References _actionTarget.

Referenced by SpellMgr::CanSpellTriggerProcOnEvent(), spell_deathbringer_blood_link_aura::spell_deathbringer_blood_link_AuraScript::CheckProc(), spell_deathbringer_blood_link_blood_beast_aura::spell_deathbringer_blood_link_blood_beast_aura_AuraScript::CheckProc(), spell_reliquary_of_souls_aura_of_desire::spell_reliquary_of_souls_aura_of_desire_AuraScript::CheckProc(), spell_dk_wandering_plague_aura::CheckProc(), spell_dk_blood_caked_blade::CheckProc(), spell_dk_dancing_rune_weapon::CheckProc(), spell_gen_proc_on_self::CheckProc(), spell_gen_proc_not_self::CheckProc(), spell_item_lil_phylactery::CheckProc(), spell_item_trauma::CheckProc(), spell_mage_burning_determination::CheckProc(), spell_mage_molten_armor::CheckProc(), spell_mage_master_of_elements::CheckProc(), spell_pal_seal_of_command_aura::CheckProc(), spell_pri_vampiric_touch::CheckProc(), spell_q10985_light_of_the_naaru::CheckProc(), spell_warr_t3_prot_8p_bonus::CheckProc(), spell_item_unsated_craving::CheckProc(), spell_warr_t3_prot_8p_bonus::HandleEffectProc(), spell_deathbringer_blood_link_aura::spell_deathbringer_blood_link_AuraScript::HandleProc(), spell_deathbringer_blood_link_blood_beast_aura::spell_deathbringer_blood_link_blood_beast_aura_AuraScript::HandleProc(), spell_reliquary_of_souls_aura_of_desire::spell_reliquary_of_souls_aura_of_desire_AuraScript::HandleProc(), spell_item_trauma::HandleProc(), spell_item_blade_ward_enchant::HandleProc(), spell_item_blood_draining_enchant::HandleProc(), spell_dk_wandering_plague_aura::HandleProc(), spell_dk_blood_caked_blade::HandleProc(), spell_dk_dancing_rune_weapon::HandleProc(), spell_gen_moss_covered_feet::HandleProc(), spell_gen_blade_warding::HandleProc(), spell_item_unsated_craving::HandleProc(), spell_pal_seal_of_command_aura::HandleProc(), spell_pal_sacred_shield_base::HandleProc(), Aura::IsProcTriggeredOnEvent(), and Unit::ProcDamageAndSpellFor().

◆ GetActor()

Unit * ProcEventInfo::GetActor ( )
inline
858{ return _actor; };

References _actor.

Referenced by spell_hun_lock_and_load::ApplyMarker(), SpellMgr::CanSpellTriggerProcOnEvent(), spell_deathbringer_blood_link_aura::spell_deathbringer_blood_link_AuraScript::CheckProc(), spell_deathbringer_blood_link_blood_beast_aura::spell_deathbringer_blood_link_blood_beast_aura_AuraScript::CheckProc(), spell_reliquary_of_souls_aura_of_desire::spell_reliquary_of_souls_aura_of_desire_AuraScript::CheckProc(), spell_dk_wandering_plague_aura::CheckProc(), spell_dk_blood_caked_blade::CheckProc(), spell_dk_dancing_rune_weapon::CheckProc(), spell_dru_t10_balance_4p_bonus::CheckProc(), spell_gen_proc_on_self::CheckProc(), spell_gen_proc_not_self::CheckProc(), spell_gen_proc_above_75::CheckProc(), spell_gen_proc_reduced_above_60::CheckProc(), spell_item_green_whelp_armor::CheckProc(), spell_mage_ignite::CheckProc(), spell_mage_master_of_elements::CheckProc(), spell_pal_seal_of_command_aura::CheckProc(), spell_pal_seal_of_light::CheckProc(), spell_rog_blade_flurry::CheckProc(), spell_sha_t10_restoration_4p_bonus::CheckProc(), spell_sha_earthliving_weapon::CheckProc(), spell_warr_improved_spell_reflection::CheckProc(), spell_warr_sweeping_strikes::CheckProc(), spell_warr_retaliation::CheckProc(), spell_item_unsated_craving::CheckProc(), spell_hun_lock_and_load::CheckTrapProc(), spell_deathbringer_blood_link_aura::spell_deathbringer_blood_link_AuraScript::HandleProc(), spell_deathbringer_blood_link_blood_beast_aura::spell_deathbringer_blood_link_blood_beast_aura_AuraScript::HandleProc(), spell_reliquary_of_souls_aura_of_desire::spell_reliquary_of_souls_aura_of_desire_AuraScript::HandleProc(), spell_item_blade_ward_enchant::HandleProc(), spell_item_shadows_fate::HandleProc(), spell_mage_ignite::HandleProc(), spell_dk_wandering_plague_aura::HandleProc(), spell_dk_blood_caked_blade::HandleProc(), spell_dk_dancing_rune_weapon::HandleProc(), spell_gen_blade_warding::HandleProc(), spell_item_unsated_craving::HandleProc(), spell_pal_seal_of_command_aura::HandleProc(), spell_pal_sacred_shield_base::HandleProc(), spell_pri_vampiric_touch::HandleProc(), spell_warl_drain_soul::HandleProc(), spell_hun_lock_and_load::HandleProcs(), Unit::HandleProcTriggerSpell(), Aura::IsProcTriggeredOnEvent(), spell_warr_improved_spell_reflection::OnProc(), and Unit::ProcDamageAndSpellFor().

◆ GetDamageInfo()

DamageInfo * ProcEventInfo::GetDamageInfo ( ) const
inline
868{ return _damageInfo; }

References _damageInfo.

Referenced by Aura::CalcProcChance(), spell_deathbringer_blood_link_aura::spell_deathbringer_blood_link_AuraScript::CheckProc(), spell_deathbringer_blood_link_blood_beast_aura::spell_deathbringer_blood_link_blood_beast_aura_AuraScript::CheckProc(), spell_utgarde_pinnacle_beast_mark::CheckProc(), spell_dk_improved_blood_presence_proc::CheckProc(), spell_dk_wandering_plague_aura::CheckProc(), spell_dk_scent_of_blood_trigger::CheckProc(), spell_item_shadowmourne::CheckProc(), spell_mage_ignite::CheckProc(), spell_pal_sacred_shield_base::CheckProc(), spell_pal_seal_of_righteousness::CheckProc(), spell_warl_siphon_life::CheckProc(), spell_warl_fel_synergy::CheckProc(), spell_mage_fingers_of_frost_proc_aura::HandleOnEffectProc(), spell_reliquary_of_souls_aura_of_desire::spell_reliquary_of_souls_aura_of_desire_AuraScript::HandleProc(), spell_black_temple_consuming_strikes::spell_black_temple_consuming_strikes_AuraScript::HandleProc(), spell_item_blood_draining_enchant::HandleProc(), spell_mage_ignite::HandleProc(), spell_the_lich_king_dark_hunger::spell_the_lich_king_dark_hunger_AuraScript::HandleProc(), spell_oculus_temporal_rift::spell_oculus_temporal_rift_AuraScript::HandleProc(), spell_yogg_saron_grim_reprisal::spell_yogg_saron_grim_reprisal_AuraScript::HandleProc(), spell_dk_wandering_plague_aura::HandleProc(), spell_dk_dancing_rune_weapon::HandleProc(), spell_dk_blood_gorged::HandleProc(), spell_dru_t10_balance_4p_bonus::HandleProc(), spell_item_necrotic_touch::HandleProc(), spell_rog_blade_flurry::HandleProc(), spell_warr_sweeping_strikes::HandleProc(), spell_dk_hungering_cold::HandleProc(), Aura::IsProcTriggeredOnEvent(), spell_blood_queen_essence_of_the_blood_queen::spell_blood_queen_essence_of_the_blood_queen_AuraScript::OnProc(), spell_pal_eye_for_an_eye::OnProc(), spell_warl_siphon_life::OnProc(), and spell_warl_fel_synergy::OnProc().

◆ GetHealInfo()

◆ GetHitMask()

◆ GetProcChance()

std::optional< float > ProcEventInfo::GetProcChance ( ) const
inline
874{ return _chance; }

References _chance.

Referenced by Unit::IsTriggeredAtSpellProcEvent().

◆ GetProcCooldown()

uint32 ProcEventInfo::GetProcCooldown ( ) const
inline
872{ return _cooldown; }
uint32 _cooldown
Definition: Unit.h:848

References _cooldown.

Referenced by spell_pal_sacred_shield_base::HandleProc().

◆ GetProcSpell()

◆ GetProcTarget()

Unit * ProcEventInfo::GetProcTarget ( ) const
inline
860{ return _procTarget; }

References _procTarget.

Referenced by spell_hun_lock_and_load::ApplyMarker(), spell_sindragosa_permeating_chill::spell_sindragosa_permeating_chill_AuraScript::CheckProc(), spell_dru_t10_balance_4p_bonus::CheckProc(), spell_hun_glyph_of_arcane_shot::CheckProc(), spell_item_blessing_of_ancient_kings::CheckProc(), spell_item_necrotic_touch::CheckProc(), spell_mage_ignite::CheckProc(), spell_pal_seal_of_light::CheckProc(), spell_pal_seal_of_righteousness::CheckProc(), spell_pri_divine_aegis::CheckProc(), spell_rog_blade_flurry::CheckProc(), spell_sha_t10_restoration_4p_bonus::CheckProc(), spell_sha_earthliving_weapon::CheckProc(), spell_warl_drain_soul::CheckProc(), spell_warr_sweeping_strikes::CheckProc(), spell_warr_retaliation::CheckProc(), spell_hun_lock_and_load::CheckTrapProc(), spell_warr_retaliation::HandleEffectProc(), spell_mage_ignite::HandleProc(), spell_dru_t10_balance_4p_bonus::HandleProc(), spell_dru_living_seed::HandleProc(), spell_item_blessing_of_ancient_kings::HandleProc(), spell_item_necrotic_touch::HandleProc(), spell_item_shadowmourne::HandleProc(), spell_pal_seal_of_righteousness::HandleProc(), spell_pri_divine_aegis::HandleProc(), spell_pri_glyph_of_prayer_of_healing::HandleProc(), spell_sha_t10_restoration_4p_bonus::HandleProc(), spell_sha_item_lightning_shield::HandleProc(), spell_warl_glyph_of_shadowflame::HandleProc(), AuraEffect::HandleProcTriggerDamageAuraProc(), AuraEffect::HandleProcTriggerSpellAuraProc(), AuraEffect::HandleProcTriggerSpellWithValueAuraProc(), spell_pal_eye_for_an_eye::OnProc(), spell_warr_damage_shield::OnProc(), Unit::ProcDamageAndSpellFor(), spell_koralon_meteor_fists::spell_koralon_meteor_fists_AuraScript::TriggerFists(), and spell_flame_warder_meteor_fists::spell_flame_warder_meteor_fists_AuraScript::TriggerFists().

◆ GetSchoolMask()

◆ GetSpellInfo()

SpellInfo const * ProcEventInfo::GetSpellInfo ( ) const
187{
188 if (_spell)
189 return _spell->GetSpellInfo();
190
191 if (_damageInfo)
192 return _damageInfo->GetSpellInfo();
193
194 if (_healInfo)
195 return _healInfo->GetSpellInfo();
196
197 return nullptr;
198}
SpellInfo const * GetSpellInfo() const
Definition: Unit.h:791
SpellInfo const * GetSpellInfo() const
Definition: Unit.h:834
SpellInfo const * GetSpellInfo() const
Definition: Spell.h:574

References _damageInfo, _healInfo, _spell, DamageInfo::GetSpellInfo(), HealInfo::GetSpellInfo(), and Spell::GetSpellInfo().

Referenced by spell_hun_lock_and_load::ApplyMarker(), SpellMgr::CanSpellTriggerProcOnEvent(), spell_gyth_chromatic_protection::CheckProc(), spell_deathbringer_blood_link_aura::spell_deathbringer_blood_link_AuraScript::CheckProc(), spell_deathbringer_blood_link_blood_beast_aura::spell_deathbringer_blood_link_blood_beast_aura_AuraScript::CheckProc(), spell_sindragosa_unchained_magic::spell_sindragosa_unchained_magic_AuraScript::CheckProc(), spell_botanica_shift_form::spell_botanica_shift_form_AuraScript::CheckProc(), spell_dk_wandering_plague_aura::CheckProc(), spell_dk_dancing_rune_weapon::CheckProc(), spell_dru_omen_of_clarity::CheckProc(), spell_dru_moonkin_form_passive_proc::CheckProc(), spell_gen_allow_proc_from_spells_with_cost::CheckProc(), spell_gen_black_magic_enchant::CheckProc(), spell_gen_proc_from_direct_damage::CheckProc(), spell_gen_adaptive_warding::CheckProc(), spell_gen_obsidian_armor::CheckProc(), spell_hun_intimidation::CheckProc(), spell_item_essence_of_life::CheckProc(), spell_item_shadowmourne::CheckProc(), spell_mage_burning_determination::CheckProc(), spell_mage_molten_armor::CheckProc(), spell_mage_burnout::CheckProc(), spell_mage_brain_freeze::CheckProc(), spell_mage_ignite::CheckProc(), spell_mage_master_of_elements::CheckProc(), spell_pal_seal_of_command_aura::CheckProc(), spell_pal_seal_of_light::CheckProc(), spell_pri_vampiric_touch::CheckProc(), spell_sha_earthliving_weapon::CheckProc(), spell_sha_item_mana_surge::CheckProc(), spell_sha_flurry_proc::CheckProc(), spell_warr_improved_spell_reflection::CheckProc(), spell_warr_sweeping_strikes::CheckProc(), spell_hun_ascpect_of_the_viper::CheckProc(), spell_hun_lock_and_load::CheckTrapProc(), spell_gyth_chromatic_protection::HandleProc(), spell_deathbringer_blood_link_aura::spell_deathbringer_blood_link_AuraScript::HandleProc(), spell_dk_dancing_rune_weapon::HandleProc(), spell_hun_glyph_of_arcane_shot::HandleProc(), spell_mage_burnout::HandleProc(), spell_pal_seal_of_command_aura::HandleProc(), spell_sha_item_mana_surge::HandleProc(), spell_dk_bone_shield::HandleProc(), spell_dk_hungering_cold::HandleProc(), spell_hun_lock_and_load::HandleProcs(), SpellMgr::IsSpellProcEventCanTriggeredBy(), Unit::IsTriggeredAtSpellProcEvent(), and Aura::PrepareProcToTrigger().

◆ GetSpellPhaseMask()

◆ GetSpellTypeMask()

uint32 ProcEventInfo::GetSpellTypeMask ( ) const
inline
862{ return _spellTypeMask; }

References _spellTypeMask.

Referenced by SpellMgr::CanSpellTriggerProcOnEvent().

◆ GetTriggerAuraEffectIndex()

int8 ProcEventInfo::GetTriggerAuraEffectIndex ( ) const
inline

◆ GetTriggerAuraSpell()

SpellInfo const * ProcEventInfo::GetTriggerAuraSpell ( ) const
inline

◆ GetTypeMask()

◆ ResetProcChance()

void ProcEventInfo::ResetProcChance ( )
inline
876{ _chance.reset(); }

References _chance.

Referenced by spell_mage_fingers_of_frost_proc_aura::CheckAfterProc().

◆ SetProcChance()

void ProcEventInfo::SetProcChance ( float  chance)
inline
875{ _chance = chance; }

References _chance.

Referenced by spell_mage_fingers_of_frost_proc_aura::CheckProc().

◆ SetProcCooldown()

void ProcEventInfo::SetProcCooldown ( uint32  cooldown)
inline
873{ _cooldown = cooldown; }

References _cooldown.

Referenced by Unit::ProcDamageAndSpellFor().

Member Data Documentation

◆ _actionTarget

Unit* const ProcEventInfo::_actionTarget
private

Referenced by GetActionTarget().

◆ _actor

Unit* const ProcEventInfo::_actor
private

Referenced by GetActor().

◆ _chance

std::optional<float> ProcEventInfo::_chance
private

◆ _cooldown

uint32 ProcEventInfo::_cooldown
private

Referenced by GetProcCooldown(), and SetProcCooldown().

◆ _damageInfo

DamageInfo* ProcEventInfo::_damageInfo
private

Referenced by GetDamageInfo(), and GetSpellInfo().

◆ _healInfo

HealInfo* ProcEventInfo::_healInfo
private

Referenced by GetHealInfo(), and GetSpellInfo().

◆ _hitMask

uint32 ProcEventInfo::_hitMask
private

Referenced by GetHitMask().

◆ _procAuraEffectIndex

int8 ProcEventInfo::_procAuraEffectIndex
private

◆ _procTarget

Unit* const ProcEventInfo::_procTarget
private

Referenced by GetProcTarget().

◆ _spell

Spell const* ProcEventInfo::_spell
private

Referenced by GetProcSpell(), and GetSpellInfo().

◆ _spellPhaseMask

uint32 ProcEventInfo::_spellPhaseMask
private

Referenced by GetSpellPhaseMask().

◆ _spellTypeMask

uint32 ProcEventInfo::_spellTypeMask
private

Referenced by GetSpellTypeMask().

◆ _triggeredByAuraSpell

SpellInfo const* const ProcEventInfo::_triggeredByAuraSpell
private

Referenced by GetTriggerAuraSpell().

◆ _typeMask

uint32 ProcEventInfo::_typeMask
private

Referenced by GetTypeMask().