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