[Cleanup] Remove LimitCheckBoth() from zone/entity.cpp and zone/entity.h (#3393)

# Notes
- This is unused.
This commit is contained in:
Alex King 2023-06-12 16:05:39 -04:00 committed by GitHub
parent 108fc82ee0
commit 306b06745f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 30 deletions

View File

@ -4331,35 +4331,6 @@ bool EntityList::LimitCheckGroup(uint32 spawngroup_id, int count)
return true;
}
//check limits on an npc type in a given spawn group, and
//checks limits on the entire zone in one pass.
//returns true if neither limit has been reached
bool EntityList::LimitCheckBoth(uint32 npc_type, uint32 spawngroup_id, int group_count, int type_count)
{
if (group_count < 1 && type_count < 1)
return true;
std::map<uint16, SpawnLimitRecord>::iterator cur,end;
cur = npc_limit_list.begin();
end = npc_limit_list.end();
for (; cur != end; ++cur) {
if (cur->second.npc_type == npc_type) {
type_count--;
if (type_count == 0) {
return false;
}
}
if (cur->second.spawngroup_id == spawngroup_id) {
group_count--;
if (group_count == 0) {
return false;
}
}
}
return true;
}
bool EntityList::LimitCheckName(const char *npc_name)
{
auto it = npc_list.begin();

View File

@ -490,7 +490,6 @@ public:
void LimitRemoveNPC(NPC *npc);
bool LimitCheckType(uint32 npc_type, int count);
bool LimitCheckGroup(uint32 spawngroup_id, int count);
bool LimitCheckBoth(uint32 npc_type, uint32 spawngroup_id, int group_count, int type_count);
bool LimitCheckName(const char* npc_name);
int GetHatedCount(Mob *attacker, Mob *exclude, bool inc_gray_con);