![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
Tests for smart proc trigger target resolution. More...
Go to the source code of this file.
Classes | |
| class | SpellProcTargetResolutionTest |
Functions | |
| static Unit * | ResolveProcTriggerTarget (Unit *triggerCaster, ProcEventInfo &eventInfo) |
| Applies the smart targeting expression from SpellAuraEffects.cpp. | |
| TEST_F (SpellProcTargetResolutionTest, ActorSide_HitPhase_TargetsEnemy) | |
| TEST_F (SpellProcTargetResolutionTest, ActorSide_FinishPhase_ReturnsNullptr) | |
| TEST_F (SpellProcTargetResolutionTest, ActorSide_CastPhase_TargetsEnemy) | |
| TEST_F (SpellProcTargetResolutionTest, VictimSide_HitPhase_TargetsAttacker) | |
| TEST_F (SpellProcTargetResolutionTest, ActorSide_NullActionTarget_ReturnsNullptr) | |
| TEST_F (SpellProcTargetResolutionTest, VictimSide_NullActionTarget_StillReturnsActor) | |
| TEST_F (SpellProcTargetResolutionTest, SelfProc_ActorIsActionTarget) | |
Tests for smart proc trigger target resolution.
Verifies the targeting expression used in HandleProcTriggerSpellAuraProc and HandleProcTriggerSpellWithValueAuraProc:
triggerTarget = (triggerCaster == actor) ? actionTarget : actor
This expression correctly resolves targets for all proc scenarios:
Definition in file SpellProcTargetResolutionTest.cpp.
|
static |
Applies the smart targeting expression from SpellAuraEffects.cpp.
This mirrors the logic in HandleProcTriggerSpellAuraProc: Unit* triggerCaster = aurApp->GetTarget(); // the aura owner Unit* triggerTarget = triggerCaster == eventInfo.GetActor() ? eventInfo.GetActionTarget() : eventInfo.GetActor();
References ProcEventInfo::GetActionTarget(), and ProcEventInfo::GetActor().
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| TEST_F | ( | SpellProcTargetResolutionTest | , |
| ActorSide_CastPhase_TargetsEnemy | |||
| ) |
References ProcEventInfoBuilder::Build(), PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG, PROC_SPELL_PHASE_CAST, ResolveProcTriggerTarget(), ProcEventInfoBuilder::WithActionTarget(), ProcEventInfoBuilder::WithActor(), ProcEventInfoBuilder::WithSpellPhaseMask(), and ProcEventInfoBuilder::WithTypeMask().
| TEST_F | ( | SpellProcTargetResolutionTest | , |
| ActorSide_FinishPhase_ReturnsNullptr | |||
| ) |
References ProcEventInfoBuilder::Build(), PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS, PROC_HIT_NORMAL, PROC_SPELL_PHASE_FINISH, ResolveProcTriggerTarget(), ProcEventInfoBuilder::WithActionTarget(), ProcEventInfoBuilder::WithActor(), ProcEventInfoBuilder::WithHitMask(), ProcEventInfoBuilder::WithSpellPhaseMask(), and ProcEventInfoBuilder::WithTypeMask().
| TEST_F | ( | SpellProcTargetResolutionTest | , |
| ActorSide_HitPhase_TargetsEnemy | |||
| ) |
References ProcEventInfoBuilder::Build(), PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS, PROC_HIT_NORMAL, PROC_SPELL_PHASE_HIT, ResolveProcTriggerTarget(), ProcEventInfoBuilder::WithActionTarget(), ProcEventInfoBuilder::WithActor(), ProcEventInfoBuilder::WithHitMask(), ProcEventInfoBuilder::WithSpellPhaseMask(), and ProcEventInfoBuilder::WithTypeMask().
| TEST_F | ( | SpellProcTargetResolutionTest | , |
| ActorSide_NullActionTarget_ReturnsNullptr | |||
| ) |
References ProcEventInfoBuilder::Build(), PROC_FLAG_DONE_MELEE_AUTO_ATTACK, PROC_HIT_NORMAL, ResolveProcTriggerTarget(), ProcEventInfoBuilder::WithActionTarget(), ProcEventInfoBuilder::WithActor(), ProcEventInfoBuilder::WithHitMask(), and ProcEventInfoBuilder::WithTypeMask().
| TEST_F | ( | SpellProcTargetResolutionTest | , |
| SelfProc_ActorIsActionTarget | |||
| ) |
References ProcEventInfoBuilder::Build(), PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS, PROC_HIT_NORMAL, PROC_SPELL_PHASE_HIT, ResolveProcTriggerTarget(), ProcEventInfoBuilder::WithActionTarget(), ProcEventInfoBuilder::WithActor(), ProcEventInfoBuilder::WithHitMask(), ProcEventInfoBuilder::WithSpellPhaseMask(), and ProcEventInfoBuilder::WithTypeMask().
| TEST_F | ( | SpellProcTargetResolutionTest | , |
| VictimSide_HitPhase_TargetsAttacker | |||
| ) |
References ProcEventInfoBuilder::Build(), PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK, PROC_HIT_NORMAL, PROC_SPELL_PHASE_HIT, ResolveProcTriggerTarget(), ProcEventInfoBuilder::WithActionTarget(), ProcEventInfoBuilder::WithActor(), ProcEventInfoBuilder::WithHitMask(), ProcEventInfoBuilder::WithSpellPhaseMask(), and ProcEventInfoBuilder::WithTypeMask().
| TEST_F | ( | SpellProcTargetResolutionTest | , |
| VictimSide_NullActionTarget_StillReturnsActor | |||
| ) |
References ProcEventInfoBuilder::Build(), PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK, PROC_HIT_NORMAL, ResolveProcTriggerTarget(), ProcEventInfoBuilder::WithActionTarget(), ProcEventInfoBuilder::WithActor(), ProcEventInfoBuilder::WithHitMask(), and ProcEventInfoBuilder::WithTypeMask().