Core/Items: implement some helper methods for easier readability

Port From (https://github.com/TrinityCore/TrinityCore/commit/9124fd1f1fafea19b118eb69c6a35f94376fc7e8)
This commit is contained in:
hondacrx
2022-01-06 10:57:06 -05:00
parent 8f8cd4a7d4
commit 6e0becd106
23 changed files with 105 additions and 100 deletions
+1 -1
View File
@@ -1321,7 +1321,7 @@ namespace Game.Entities
UpdateDamagePhysical(WeaponAttackType.BaseAttack);
Item offhand = GetWeaponForAttack(WeaponAttackType.OffAttack, true);
if (offhand)
if (CanDualWield() || offhand.GetTemplate().GetFlags3().HasAnyFlag(ItemFlags3.AlwaysAllowDualWield))
if (CanDualWield() || offhand.GetTemplate().HasFlag(ItemFlags3.AlwaysAllowDualWield))
UpdateDamagePhysical(WeaponAttackType.OffAttack);
if (HasAuraType(AuraType.OverrideSpellPowerByApPct))