refactor(Core): use the WeaponAttackType enum (#23457)
This commit is contained in:
parent
97543ba50f
commit
e35a5ae049
7 changed files with 24 additions and 22 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue