mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 15:41:30 +00:00
[Cleanup] Remove RemoveMob() and RemoveRaid() from zone/entity.cpp and zone/entity.h (#3389)
# Notes - These are unused.
This commit is contained in:
parent
dfaa929778
commit
8e33755f02
@ -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();
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user