Core/GameEventMgr: Log error if loading GO/Creature into event that is part of pool

- Only warn, still load the GO/Creature
 - These should be added to game_event_pool by pool ID instead
This commit is contained in:
r00ty-tc
2019-03-30 18:46:20 +00:00
parent 2a7a1b27d5
commit 8bb88657f8

View File

@@ -413,6 +413,10 @@ void GameEventMgr::LoadFromDB()
continue;
}
// Log error for pooled object, but still spawn it
if (uint32 poolId = sPoolMgr->IsPartOfAPool(SPAWN_TYPE_CREATURE, guid))
TC_LOG_ERROR("sql.sql", "`game_event_creature`: game event id (%i) contains creature (%u) which is part of a pool (%u). This should be spawned in game_event_pool", event_id, guid, poolId);
GuidList& crelist = mGameEventCreatureGuids[internal_event_id];
crelist.push_back(guid);
@@ -459,6 +463,10 @@ void GameEventMgr::LoadFromDB()
continue;
}
// Log error for pooled object, but still spawn it
if (uint32 poolId = sPoolMgr->IsPartOfAPool(SPAWN_TYPE_GAMEOBJECT, guid))
TC_LOG_ERROR("sql.sql", "`game_event_gameobject`: game event id (%i) contains game object (%u) which is part of a pool (%u). This should be spawned in game_event_pool", event_id, guid, poolId);
GuidList& golist = mGameEventGameobjectGuids[internal_event_id];
golist.push_back(guid);