AzerothCore 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
178 : _actor(actor), _actionTarget(actionTarget), _procTarget(procTarget), _typeMask(typeMask), _spellTypeMask(spellTypeMask), _spellPhaseMask(spellPhaseMask),
179 _hitMask(hitMask), _spell(spell), _damageInfo(damageInfo), _healInfo(healInfo), _triggeredByAuraSpell(triggeredByAuraSpell), _procAuraEffectIndex(procAuraEffectIndex)
180{
181 _chance.reset();
182}
DamageInfo * _damageInfo
Definition: Unit.h:431
HealInfo * _healInfo
Definition: Unit.h:432
Spell const * _spell
Definition: Unit.h:430
std::optional< float > _chance
Definition: Unit.h:435
int8 _procAuraEffectIndex
Definition: Unit.h:434
Unit *const _actionTarget
Definition: Unit.h:423
SpellInfo const *const _triggeredByAuraSpell
Definition: Unit.h:433
uint32 _hitMask
Definition: Unit.h:428
uint32 _spellTypeMask
Definition: Unit.h:426
Unit *const _actor
Definition: Unit.h:422
uint32 _typeMask
Definition: Unit.h:425
uint32 _spellPhaseMask
Definition: Unit.h:427
Unit *const _procTarget
Definition: Unit.h:424

References _chance.

Member Function Documentation

◆ GetActionTarget()

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

References _actionTarget.

Referenced by spell_mage_master_of_elements::AfterCheckProc(), SpellMgr::CanSpellTriggerProcOnEvent(), spell_deathbringer_blood_link_aura::CheckProc(), spell_deathbringer_blood_link_blood_beast_aura::CheckProc(), spell_reliquary_of_souls_aura_of_desire_aura::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_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::HandleProc(), spell_deathbringer_blood_link_blood_beast_aura::HandleProc(), spell_reliquary_of_souls_aura_of_desire_aura::HandleProc(), spell_item_trauma::HandleProc(), spell_item_blade_ward_enchant::HandleProc(), spell_item_blood_draining_enchant::HandleProc(), spell_karazhan_temptation::HandleProc(), spell_dk_wandering_plague_aura::HandleProc(), spell_dk_blood_caked_blade::HandleProc(), spell_dk_dancing_rune_weapon::HandleProc(), spell_gen_proc_not_self::HandleProc(), spell_gen_adaptive_warding::HandleProc(), spell_gen_moss_covered_feet::HandleProc(), spell_gen_obsidian_armor::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
439{ return _actor; };

References _actor.

Referenced by spell_mage_master_of_elements::AfterCheckProc(), spell_warl_demonic_pact_aura::AfterCheckProc(), spell_hun_lock_and_load::ApplyMarker(), SpellMgr::CanSpellTriggerProcOnEvent(), spell_deathbringer_blood_link_aura::CheckProc(), spell_deathbringer_blood_link_blood_beast_aura::CheckProc(), spell_reliquary_of_souls_aura_of_desire_aura::CheckProc(), spell_gargolmar_retalliation::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_reduced_above_60::CheckProc(), spell_item_green_whelp_armor::CheckProc(), spell_mage_ignite::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::HandleProc(), spell_deathbringer_blood_link_blood_beast_aura::HandleProc(), spell_reliquary_of_souls_aura_of_desire_aura::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_sha_t8_electrified::HandleProc(), spell_warl_drain_soul::HandleProc(), spell_warl_demonic_pact_aura::HandleProc(), spell_warr_sweeping_strikes::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
449{ return _damageInfo; }

References _damageInfo.

Referenced by Aura::CalcProcChance(), spell_deathbringer_blood_link_aura::CheckProc(), spell_deathbringer_blood_link_blood_beast_aura::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_aura::HandleProc(), spell_black_temple_consuming_strikes_aura::HandleProc(), spell_item_blood_draining_enchant::HandleProc(), spell_mage_ignite::HandleProc(), spell_the_lich_king_dark_hunger_aura::HandleProc(), spell_oculus_temporal_rift_aura::HandleProc(), spell_yogg_saron_grim_reprisal_aura::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_sha_t8_electrified::HandleProc(), spell_warl_seed_of_corruption_aura::HandleProc(), spell_warl_seed_of_corruption_generic_aura::HandleProc(), spell_warr_sweeping_strikes::HandleProc(), spell_dk_hungering_cold::HandleProc(), Aura::IsProcTriggeredOnEvent(), spell_blood_queen_essence_of_the_blood_queen_aura::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
455{ return _chance; }

References _chance.

Referenced by Unit::IsTriggeredAtSpellProcEvent().

◆ GetProcCooldown()

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

References _cooldown.

Referenced by spell_pal_sacred_shield_base::HandleProc(), and spell_warl_demonic_pact_aura::HandleProc().

◆ GetProcSpell()

◆ GetProcTarget()

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

References _procTarget.

Referenced by spell_hun_lock_and_load::ApplyMarker(), spell_sindragosa_permeating_chill_aura::CheckProc(), spell_gargolmar_retalliation::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_ahune_spanky_hands::HandleProc(), 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_sha_t8_electrified::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_aura::TriggerFists(), and spell_flame_warder_meteor_fists_aura::TriggerFists().

◆ GetSchoolMask()

SpellSchoolMask ProcEventInfo::GetSchoolMask ( ) const
inline

◆ GetSpellInfo()

SpellInfo const * ProcEventInfo::GetSpellInfo ( ) const
185{
186 if (_spell)
187 return _spell->GetSpellInfo();
188
189 if (_damageInfo)
190 return _damageInfo->GetSpellInfo();
191
192 if (_healInfo)
193 return _healInfo->GetSpellInfo();
194
195 return nullptr;
196}
SpellInfo const * GetSpellInfo() const
Definition: Unit.h:360
SpellInfo const * GetSpellInfo() const
Definition: Unit.h:415
SpellInfo const * GetSpellInfo() const
Definition: Spell.h:579

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

Referenced by spell_mage_master_of_elements::AfterCheckProc(), spell_hun_lock_and_load::ApplyMarker(), SpellMgr::CanSpellTriggerProcOnEvent(), spell_gyth_chromatic_protection::CheckProc(), spell_deathbringer_blood_link_aura::CheckProc(), spell_deathbringer_blood_link_blood_beast_aura::CheckProc(), spell_botanica_shift_form_aura::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_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::HandleProc(), spell_dk_dancing_rune_weapon::HandleProc(), spell_gen_adaptive_warding::HandleProc(), spell_gen_obsidian_armor::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_sha_t8_electrified::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
443{ return _spellTypeMask; }

References _spellTypeMask.

Referenced by SpellMgr::CanSpellTriggerProcOnEvent().

◆ GetTriggerAuraEffectIndex()

int8 ProcEventInfo::GetTriggerAuraEffectIndex ( ) const
inline

◆ GetTriggerAuraSpell()

◆ GetTypeMask()

◆ ResetProcChance()

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

References _chance.

Referenced by spell_mage_fingers_of_frost_proc_aura::AfterCheckProc().

◆ SetProcChance()

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

References _chance.

Referenced by spell_mage_fingers_of_frost_proc_aura::CheckProc().

◆ SetProcCooldown()

void ProcEventInfo::SetProcCooldown ( uint32  cooldown)
inline
454{ _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().