270{
271
276
277 auto count = [&]() {
279 auto range = creatureQuestMap->equal_range(TEST_CREATURE_ID);
280 for (auto it = range.first; it != range.second; ++it)
281 if (it->second == TEST_QUEST_ID)
282 ++n;
283 return n;
284 };
285
286 ASSERT_EQ(count(), 1u) << "Quest should be on creature before reload";
287
288
289 creatureQuestMap->clear();
290 sPoolMgr->mQuestCreatureRelation.clear();
291 sPoolMgr->mQuestCreatureRelation.insert(
292 PooledQuestRelation::value_type(TEST_QUEST_ID, TEST_CREATURE_ID));
293
294 ASSERT_EQ(count(), 0u) << "Quest should be gone after reload clears the map";
295
296
298
299 EXPECT_EQ(count(), 1u)
300 << "ReSpawnPoolQuests should restore active pool quests after reload";
301}
std::uint32_t uint32
Definition Define.h:107
#define sPoolMgr
Definition PoolMgr.h:216
void Spawn1Object(SpawnedPoolData &spawns, PoolObject *obj)