From 795df5c597dc41e9706808bfc4726c375320ff19 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Mon, 12 Jun 2023 20:17:53 -0400 Subject: [PATCH] [Cleanup] Remove CountTempPets() from zone/entity.cpp and zone/entity.h (#3390) * [Cleanup] Remove CountTempPets() from zone/entity.cpp and zone/entity.h # Notes - This is unused. * Update entity.h --- zone/entity.cpp | 19 ------------------- zone/entity.h | 1 - 2 files changed, 20 deletions(-) diff --git a/zone/entity.cpp b/zone/entity.cpp index 26f0762d0..6c32f2386 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -4305,25 +4305,6 @@ void EntityList::DestroyTempPets(Mob *owner) } } -int16 EntityList::CountTempPets(Mob *owner) -{ - int16 count = 0; - auto it = npc_list.begin(); - while (it != npc_list.end()) { - NPC* n = it->second; - if (n->GetSwarmInfo()) { - if (n->GetSwarmInfo()->owner_id == owner->GetID()) { - count++; - } - } - ++it; - } - - owner->SetTempPetCount(count); - - return count; -} - void EntityList::AddTempPetsToHateList(Mob *owner, Mob* other, bool bFrenzy) { if (!other || !owner) diff --git a/zone/entity.h b/zone/entity.h index ee3b9c18f..b278f24d9 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -311,7 +311,6 @@ public: void RemoveAllRaids(); void RemoveAllEncounters(); void DestroyTempPets(Mob *owner); - int16 CountTempPets(Mob *owner); void AddTempPetsToHateList(Mob *owner, Mob* other, bool bFrenzy = false); void AddTempPetsToHateListOnOwnerDamage(Mob *owner, Mob* attacker, int32 spell_id); Entity *GetEntityMob(uint16 id);