mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
More animation packet reductions, DoAnim is called in many other places in combat than just AttackAnimation
This commit is contained in:
parent
122e71f4a3
commit
62e4169e50
@ -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;
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user