[Combat] Allow npcs/pets to kick vs opponents requiring magic weapons if wearing magic booties. (#1868)

* [Pets/NPC Kick] Allow pets/npcs kick vs mobs that req magic if using magic boots

* Backout accidental change to bash
This commit is contained in:
Paul Coene 2021-12-23 15:01:56 -05:00 committed by GitHub
parent 4fbb98a5f7
commit 4f0e9945c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1617,6 +1617,8 @@ void NPC::DoClassAttacks(Mob *target) {
bool ca_time = classattack_timer.Check(false);
bool ka_time = knightattack_timer.Check(false);
const EQ::ItemData* boots = database.GetItem(equipment[EQ::invslot::slotFeet]);
//only check attack allowed if we are going to do something
if((taunt_time || ca_time || ka_time) && !IsAttackAllowed(target))
return;
@ -1688,7 +1690,7 @@ 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, boots) <= 0) {
dmg = DMG_INVULNERABLE;
}
@ -1739,7 +1741,7 @@ 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, boots) <= 0)
dmg = DMG_INVULNERABLE;
reuse = (KickReuseTime + 3) * 1000;