refactor(Core): use the WeaponAttackType enum (#23457)

This commit is contained in:
Tereneckla
2025-11-01 18:26:18 +00:00
committed by GitHub
parent 97543ba50f
commit e35a5ae049
7 changed files with 24 additions and 22 deletions

View File

@@ -8179,7 +8179,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (triggeredByAura->GetBase() && castItem->GetGUID() != triggeredByAura->GetBase()->GetCastItemGUID())
return false;
WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
WeaponAttackType attType = player->GetAttackBySlot(castItem->GetSlot());
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
@@ -8370,7 +8370,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (!IsPlayer() || !victim || !victim->IsAlive() || !castItem || !castItem->IsEquipped())
return false;
WeaponAttackType attType = WeaponAttackType(Player::GetAttackBySlot(castItem->GetSlot()));
WeaponAttackType attType = Player::GetAttackBySlot(castItem->GetSlot());
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))