From 62e4169e504d47d285ababeef35d726e1c06e9f2 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 10 Jul 2017 20:41:56 -0500 Subject: [PATCH] More animation packet reductions, DoAnim is called in many other places in combat than just AttackAnimation --- zone/attack.cpp | 7 ++++--- zone/mob.cpp | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index ddd8c04ce..d04bbf0d7 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -55,6 +55,9 @@ extern Zone* zone; EQEmu::skills::SkillType Mob::AttackAnimation(int Hand, const EQEmu::ItemInstance* weapon, EQEmu::skills::SkillType skillinuse) { + if (!attack_anim_timer.Check()) + return skillinuse; + // Determine animation int type = 0; if (weapon && weapon->IsClassCommon()) { @@ -137,9 +140,7 @@ EQEmu::skills::SkillType Mob::AttackAnimation(int Hand, const EQEmu::ItemInstanc if (Hand == EQEmu::inventory::slotSecondary) // DW anim type = animDualWield; - if (attack_anim_timer.Check()) { - DoAnim(type, 0, false); - } + DoAnim(type, 0, false); return skillinuse; } diff --git a/zone/mob.cpp b/zone/mob.cpp index dfc7a38bd..830ac9a61 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1568,6 +1568,9 @@ void Mob::ShowStats(Client* client) } void Mob::DoAnim(const int animnum, int type, bool ackreq, eqFilterType filter) { + if (!attack_anim_timer.Check()) + return; + auto outapp = new EQApplicationPacket(OP_Animation, sizeof(Animation_Struct)); Animation_Struct* anim = (Animation_Struct*)outapp->pBuffer; anim->spawnid = GetID();