Fix Immune Melee Nonmagical logic (#1606)

This commit is contained in:
KayenEQ
2021-10-15 20:46:57 -04:00
committed by GitHub
parent 203ba2d340
commit 5235dcee95
2 changed files with 21 additions and 18 deletions
+5 -1
View File
@@ -156,6 +156,9 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQ::skills::SkillType skill, int32 bas
if (my_hit.base_damage == 0)
my_hit.base_damage = GetBaseSkillDamage(my_hit.skill);
if (base_damage = DMG_INVULNERABLE)
my_hit.damage_done = DMG_INVULNERABLE;
if (who->GetInvul() || who->GetSpecialAbility(IMMUNE_MELEE))
my_hit.damage_done = DMG_INVULNERABLE;
@@ -1649,8 +1652,9 @@ void NPC::DoClassAttacks(Mob *target) {
DoAnim(animKick, 0, false);
int32 dmg = GetBaseSkillDamage(EQ::skills::SkillKick);
if (GetWeaponDamage(target, (const EQ::ItemData*)nullptr) <= 0)
if (GetWeaponDamage(target, (const EQ::ItemData*)nullptr) <= 0) {
dmg = DMG_INVULNERABLE;
}
reuse = (KickReuseTime + 3) * 1000;
DoSpecialAttackDamage(target, EQ::skills::SkillKick, dmg, GetMinDamage(), -1, reuse);