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

(cherry picked from commit 8bb88657f8)
This commit is contained in:
r00ty-tc
2019-03-30 18:46:20 +00:00
committed by Shauren
parent 1f47d18a36
commit 4c996bdf8b

View File

@@ -414,6 +414,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 (" UI64FMTD ") 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);
@@ -460,6 +464,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 (" UI64FMTD ") 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);