[Cleanup] Remove RemoveMob() and RemoveRaid() from zone/entity.cpp and zone/entity.h (#3389)

# Notes
- These are unused.
This commit is contained in:
Alex King 2023-06-12 16:11:17 -04:00 committed by GitHub
parent dfaa929778
commit 8e33755f02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 39 deletions

View File

@ -2818,31 +2818,6 @@ bool EntityList::RemoveMob(uint16 delete_id)
return false;
}
/**
* @param delete_mob
* @return
*/
bool EntityList::RemoveMob(Mob *delete_mob)
{
if (delete_mob == 0) {
return true;
}
auto it = mob_list.begin();
while (it != mob_list.end()) {
if (it->second == delete_mob) {
safe_delete(it->second);
if (!corpse_list.count(it->first)) {
free_ids.push(it->first);
}
mob_list.erase(it);
return true;
}
++it;
}
return false;
}
/**
* @param delete_id
* @return
@ -3094,18 +3069,6 @@ bool EntityList::RemoveGroup(uint32 delete_id)
return true;
}
bool EntityList::RemoveRaid(uint32 delete_id)
{
auto it = std::find_if(raid_list.begin(), raid_list.end(),
[delete_id](const Raid *a) { return a->GetID() == delete_id; });
if (it == raid_list.end())
return false;
auto raid = *it;
raid_list.erase(it);
safe_delete(raid);
return true;
}
void EntityList::Clear()
{
RemoveAllClients();

View File

@ -290,13 +290,11 @@ public:
void AddProximity(NPC *proximity_for);
void Clear();
bool RemoveMob(uint16 delete_id);
bool RemoveMob(Mob* delete_mob);
bool RemoveClient(uint16 delete_id);
bool RemoveClient(Client* delete_client);
bool RemoveNPC(uint16 delete_id);
bool RemoveMerc(uint16 delete_id);
bool RemoveGroup(uint32 delete_id);
bool RemoveRaid(uint32 delete_id);
bool RemoveCorpse(uint16 delete_id);
bool RemoveDoor(uint16 delete_id);
bool RemoveTrap(uint16 delete_id);