[Cleanup] Cleanup Body Type Code (#4366)

* [Cleanup] Cleanup Body Type-based Code

* Update bodytypes.cpp

* Final

* Update body_type.cpp

* Cleanup

* Cleanup

* Formatting

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
Alex King
2024-06-02 04:25:06 -04:00
committed by GitHub
parent 0c45d3b09e
commit 8640776a21
39 changed files with 324 additions and 250 deletions
+3 -3
View File
@@ -1854,7 +1854,7 @@ void NPC::DoClassAttacks(Mob *target) {
IsTaunting() &&
HasOwner() &&
target->IsNPC() &&
target->GetBodyType() != BT_Undead &&
target->GetBodyType() != BodyType::Undead &&
taunt_time &&
type_of_pet &&
type_of_pet != petTargetLock &&
@@ -2403,7 +2403,7 @@ int Mob::TryHeadShot(Mob *defender, EQ::skills::SkillType skillInUse)
!defender->IsClient() &&
skillInUse == EQ::skills::SkillArchery &&
GetTarget() == defender &&
(defender->GetBodyType() == BT_Humanoid || !RuleB(Combat, HeadshotOnlyHumanoids)) &&
(defender->GetBodyType() == BodyType::Humanoid || !RuleB(Combat, HeadshotOnlyHumanoids)) &&
!defender->GetSpecialAbility(SpecialAbility::HeadshotImmunity)
) {
uint32 HeadShot_Dmg = aabonuses.HeadShot[SBIndex::FINISHING_EFFECT_DMG] + spellbonuses.HeadShot[SBIndex::FINISHING_EFFECT_DMG] + itembonuses.HeadShot[SBIndex::FINISHING_EFFECT_DMG];
@@ -2440,7 +2440,7 @@ int Mob::TryAssassinate(Mob *defender, EQ::skills::SkillType skillInUse)
!defender->IsClient() &&
GetLevel() >= RuleI(Combat, AssassinateLevelRequirement) &&
(skillInUse == EQ::skills::SkillBackstab || skillInUse == EQ::skills::SkillThrowing) &&
(defender->GetBodyType() == BT_Humanoid || !RuleB(Combat, AssassinateOnlyHumanoids)) &&
(defender->GetBodyType() == BodyType::Humanoid || !RuleB(Combat, AssassinateOnlyHumanoids)) &&
!defender->GetSpecialAbility(SpecialAbility::AssassinateImmunity)
) {
int chance = GetDEX();