[Cleanup] Cleanup Special Ability Code (#4365)

* [Cleanup] Cleanup Special Ability-based Code

* Update emu_constants.cpp

* Update emu_constants.cpp

* Update emu_constants.cpp

* Update special_ability.cpp

* Cleanup

* Update emu_constants.cpp
This commit is contained in:
Alex King
2024-06-01 19:20:43 -04:00
committed by GitHub
parent d01d091b47
commit 76b9ce0ac1
27 changed files with 622 additions and 564 deletions
+5 -5
View File
@@ -5807,7 +5807,7 @@ void Client::Handle_OP_DeleteItem(const EQApplicationPacket *app)
RecordPlayerEventLog(PlayerEvent::ITEM_DESTROY, e);
}
}
DeleteItemInInventory(alc->from_slot, 1);
}
@@ -11536,8 +11536,8 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
entity_list.MessageCloseString(this, false, 200, 10, STRING_FEIGNFAILED, mypet->GetCleanName());
}
else {
bool immune_aggro = GetSpecialAbility(IMMUNE_AGGRO);
mypet->SetSpecialAbility(IMMUNE_AGGRO, 1);
bool has_aggro_immunity = GetSpecialAbility(SpecialAbility::AggroImmunity);
mypet->SetSpecialAbility(SpecialAbility::AggroImmunity, 1);
mypet->WipeHateList();
mypet->SetPetOrder(SPO_FeignDeath);
mypet->SetRunAnimSpeed(0);
@@ -11549,8 +11549,8 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
mypet->InterruptSpell();
}
if (!immune_aggro) {
mypet->SetSpecialAbility(IMMUNE_AGGRO, 0);
if (!has_aggro_immunity) {
mypet->SetSpecialAbility(SpecialAbility::AggroImmunity, 0);
}
}
}