mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user