[Combat] Fix Frenzy vs opponents immune to non-magic (#2095)

* [Combat] Fix Frenzy vs opponents immune to non-magic

* Fix naming.

* Use snake case for variable
This commit is contained in:
Paul Coene 2022-05-02 23:08:08 -04:00 committed by GitHub
parent 0c12ca8370
commit c4f05c3864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -340,6 +340,11 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk)
ReuseTime = FrenzyReuseTime - 1 - skill_reduction;
ReuseTime = (ReuseTime * HasteMod) / 100;
auto primary_in_use = GetInv().GetItem(EQ::invslot::slotPrimary);
if (primary_in_use && GetWeaponDamage(GetTarget(), primary_in_use) <= 0) {
max_dmg = DMG_INVULNERABLE;
}
while (AtkRounds > 0) {
if (GetTarget())
DoSpecialAttackDamage(GetTarget(), EQ::skills::SkillFrenzy, max_dmg, 0, max_dmg, ReuseTime);