Skip to content

Commit

Permalink
More animation packet reductions, DoAnim is called in many other plac…
Browse files Browse the repository at this point in the history
…es in combat than just AttackAnimation
  • Loading branch information
Akkadius committed Jul 11, 2017
1 parent 122e71f commit 62e4169
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions zone/attack.cpp
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions zone/mob.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 62e4169

Please sign in to comment.