[Cleanup] Utilize IsTaunting(), SetPetPower(), SetPetType(), and SetTaunting() (#3275)

* [Cleanup] Utilize SetPetPower() in zone/pets.cpp

# Notes
- This wasn't used before.

* Utilize other methods.

* Update special_attacks.cpp
This commit is contained in:
Alex King
2023-04-15 13:20:04 -04:00
committed by GitHub
parent 7523c972fa
commit ff40dbc710
4 changed files with 18 additions and 10 deletions
+7 -1
View File
@@ -1730,7 +1730,13 @@ void NPC::DoClassAttacks(Mob *target) {
//general stuff, for all classes....
//only gets used when their primary ability get used too
if (taunting && HasOwner() && target->IsNPC() && target->GetBodyType() != BT_Undead && taunt_time) {
if (
IsTaunting() &&
HasOwner() &&
target->IsNPC() &&
target->GetBodyType() != BT_Undead &&
taunt_time
) {
GetOwner()->MessageString(Chat::PetResponse, PET_TAUNTING);
Taunt(target->CastToNPC(), false);
}