From cbbd01b39148fd1c6be13779fcf5074cb0880378 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 28 Jun 2017 13:27:37 -0400 Subject: [PATCH] Quick fix for NPC attack skill issue --- zone/attack.cpp | 5 ++--- zone/mob.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 28ff607dc..c210e37dc 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -53,9 +53,8 @@ extern WorldServer worldserver; extern EntityList entity_list; extern Zone* zone; -EQEmu::skills::SkillType Mob::AttackAnimation(int Hand, const EQEmu::ItemInstance* weapon) +EQEmu::skills::SkillType Mob::AttackAnimation(int Hand, const EQEmu::ItemInstance* weapon, EQEmu::skills:SkillType skillinuse) { - EQEmu::skills::SkillType skillinuse = EQEmu::skills::Skill1HBlunt; // Determine animation int type = 0; if (weapon && weapon->IsClassCommon()) { @@ -1924,7 +1923,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool //do attack animation regardless of whether or not we can hit below int16 charges = 0; EQEmu::ItemInstance weapon_inst(weapon, charges); - my_hit.skill = AttackAnimation(Hand, &weapon_inst); + my_hit.skill = AttackAnimation(Hand, &weapon_inst, my_hit.skill); //basically "if not immune" then do the attack if (weapon_damage > 0) { diff --git a/zone/mob.h b/zone/mob.h index a8bf043c6..109cd3656 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -233,7 +233,7 @@ public: inline bool SeeImprovedHide() const { return see_improved_hide; } bool IsInvisible(Mob* other = 0) const; void SetInvisible(uint8 state); - EQEmu::skills::SkillType AttackAnimation(int Hand, const EQEmu::ItemInstance* weapon); + EQEmu::skills::SkillType AttackAnimation(int Hand, const EQEmu::ItemInstance* weapon, EQEmu::skills::SkillType skillinuse = EQEmu::skills::Skill1HBlunt); //Song bool UseBardSpellLogic(uint16 spell_id = 0xffff, int slot = -1);