Permalink
Browse files

More animation packet reductions, DoAnim is called in many other plac…

…es in combat than just AttackAnimation
  • Loading branch information...
Akkadius committed Jul 11, 2017
1 parent 122e71f commit 62e4169e504d47d285ababeef35d726e1c06e9f2
Showing with 7 additions and 3 deletions.
  1. +4 −3 zone/attack.cpp
  2. +3 −0 zone/mob.cpp
View
@@ -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;
}
View
@@ -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();

0 comments on commit 62e4169

Please sign in to comment.