[Cleanup] Multiple cases same outcome and set skip variable to same value (#3216)

# Notes
- `skip` is set to `attacker` before it's set to `attacker` again.
- Multiple spots in `Mob::AttackAnimation` use the same animations.
This commit is contained in:
Alex King 2023-04-03 17:24:27 -04:00 committed by GitHub
parent b1571cd062
commit cd5697bc81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,30 +101,26 @@ EQ::skills::SkillType Mob::AttackAnimation(int Hand, const EQ::ItemInstance* wea
}
else if (IsNPC()) {
switch (skillinuse) {
case EQ::skills::Skill1HSlashing: // 1H Slashing
type = anim1HWeapon;
break;
case EQ::skills::Skill2HSlashing: // 2H Slashing
type = anim2HSlashing;
break;
case EQ::skills::Skill1HPiercing: // Piercing
type = anim1HPiercing;
break;
case EQ::skills::Skill1HBlunt: // 1H Blunt
type = anim1HWeapon;
break;
case EQ::skills::Skill2HBlunt: // 2H Blunt
type = anim2HSlashing; //anim2HWeapon
break;
case EQ::skills::Skill2HPiercing: // 2H Piercing
type = anim2HWeapon;
break;
case EQ::skills::SkillHandtoHand:
type = animHand2Hand;
break;
default:
type = animHand2Hand;
break;
case EQ::skills::Skill1HBlunt: // 1H Blunt
case EQ::skills::Skill1HSlashing: // 1H Slashing
type = anim1HWeapon;
break;
case EQ::skills::Skill2HBlunt: // 2H Blunt
case EQ::skills::Skill2HSlashing: // 2H Slashing
type = anim2HSlashing;
break;
case EQ::skills::Skill1HPiercing: // Piercing
type = anim1HPiercing;
break;
case EQ::skills::Skill2HPiercing: // 2H Piercing
type = anim2HWeapon;
break;
case EQ::skills::SkillHandtoHand:
type = animHand2Hand;
break;
default:
type = animHand2Hand;
break;
}// switch
}
else {
@ -4305,7 +4301,6 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
attacker->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
}
}
skip = attacker;
}
//send damage to all clients around except the specified skip mob (attacker or the attacker's owner) and ourself