Core/Refactor: Part 5

This commit is contained in:
hondacrx
2018-07-05 10:57:42 -04:00
parent badf6c2714
commit 7255455b22
24 changed files with 109 additions and 85 deletions
+4 -7
View File
@@ -826,14 +826,11 @@ namespace Game
DespawnObject(spawns);
// recycle minimal amount of quests if possible count is lower than limit
if (limit > newQuests.Count && !currentQuests.Empty())
while (limit > newQuests.Count && !currentQuests.Empty())
{
do
{
ulong questId = currentQuests.SelectRandom();
newQuests.Add(questId);
currentQuests.Remove(questId);
} while (newQuests.Count < limit && !currentQuests.Empty()); // failsafe
ulong questId = currentQuests.SelectRandom();
newQuests.Add(questId);
currentQuests.Remove(questId);
}
if (newQuests.Empty())