delete unused functions and update documentation

This commit is contained in:
jadebenn
2024-03-03 19:02:11 -06:00
parent 70e0cd6f93
commit a449e5323b
5 changed files with 72 additions and 87 deletions

View File

@@ -74,13 +74,13 @@ void DamagingPets::OnTimerDone(Entity* self, std::string message) {
}
void DamagingPets::MakeUntamable(Entity* self) {
auto* petComponent = self->GetComponent<PetComponent>();
auto* const petComponent = self->GetComponent<PetComponent>();
// If the pet is currently not being tamed, make it hostile
if (petComponent != nullptr && petComponent->GetStatus() != 5) {
if (petComponent != nullptr && !petComponent->HasFlag(PetFlag::NOT_WAITING)) {
self->SetNetworkVar<bool>(u"bIAmTamable", false);
self->SetVar<bool>(u"IsEvil", true);
petComponent->SetStatus(1);
petComponent->SetFlag(PetFlag::IDLE);
auto* combatAIComponent = self->GetComponent<BaseCombatAIComponent>();
if (combatAIComponent != nullptr) {
@@ -110,7 +110,7 @@ void DamagingPets::ClearEffects(Entity* self) {
auto* petComponent = self->GetComponent<PetComponent>();
if (petComponent != nullptr) {
petComponent->SetStatus(67108866);
petComponent->SetFlag(PetFlag::TAMEABLE, PetFlag::UNKNOWN2);
}
auto* combatAIComponent = self->GetComponent<BaseCombatAIComponent>();