fix(Core/Pooling): Fixed less and less objects from pools being spawned the longer the server is running (#5572)

This commit is contained in:
UltraNix
2021-05-08 20:39:09 +02:00
committed by GitHub
parent 75c75a40d4
commit 44babc3c3a
26 changed files with 136 additions and 105 deletions

View File

@@ -426,7 +426,7 @@ public:
targets.push_back(itr->GetSource());
targets.remove_if(acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
targets.remove_if(acore::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
acore::Containers::RandomResizeList(targets, (RAID_MODE(2,3)));
acore::Containers::RandomResize(targets, (RAID_MODE(2,3)));
for (std::list<Unit*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
{
float prevZ = (*itr)->GetPositionZ();
@@ -1273,7 +1273,7 @@ public:
{
targets.remove_if(acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
targets.remove_if(acore::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
acore::Containers::RandomResizeList(targets, 1);
acore::Containers::RandomResize(targets, 1);
}
void Register() override