mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 07:02:35 +00:00
[Cleanup] Remove LimitCheckBoth() from zone/entity.cpp and zone/entity.h (#3393)
# Notes - This is unused.
This commit is contained in:
parent
108fc82ee0
commit
306b06745f
@ -4331,35 +4331,6 @@ bool EntityList::LimitCheckGroup(uint32 spawngroup_id, int count)
|
|||||||
return true;
|
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)
|
bool EntityList::LimitCheckName(const char *npc_name)
|
||||||
{
|
{
|
||||||
auto it = npc_list.begin();
|
auto it = npc_list.begin();
|
||||||
|
|||||||
@ -490,7 +490,6 @@ public:
|
|||||||
void LimitRemoveNPC(NPC *npc);
|
void LimitRemoveNPC(NPC *npc);
|
||||||
bool LimitCheckType(uint32 npc_type, int count);
|
bool LimitCheckType(uint32 npc_type, int count);
|
||||||
bool LimitCheckGroup(uint32 spawngroup_id, 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);
|
bool LimitCheckName(const char* npc_name);
|
||||||
|
|
||||||
int GetHatedCount(Mob *attacker, Mob *exclude, bool inc_gray_con);
|
int GetHatedCount(Mob *attacker, Mob *exclude, bool inc_gray_con);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user