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

Port From (https://github.com/TrinityCore/TrinityCore/commit/4c996bdf8be86d6659e512aba115dae5ac94aaa7)
This commit is contained in:
hondacrx
2021-11-29 17:24:46 -05:00
parent c64c115f7e
commit 2079cd1094
+12
View File
@@ -393,6 +393,12 @@ namespace Game
Log.outError(LogFilter.Sql, "`game_event_creature` game event id ({0}) not exist in `game_event`", event_id);
continue;
}
// Log error for pooled object, but still spawn it
uint poolId = Global.PoolMgr.IsPartOfAPool(SpawnObjectType.Creature, guid);
if (poolId != 0)
Log.outError(LogFilter.Sql, $"`game_event_creature`: game event id ({event_id}) contains creature ({guid}) which is part of a pool ({poolId}). This should be spawned in game_event_pool");
mGameEventCreatureGuids[internal_event_id].Add(guid);
++count;
@@ -432,6 +438,12 @@ namespace Game
Log.outError(LogFilter.Sql, "`game_event_gameobject` game event id ({0}) not exist in `game_event`", event_id);
continue;
}
// Log error for pooled object, but still spawn it
uint poolId = Global.PoolMgr.IsPartOfAPool(SpawnObjectType.GameObject, guid);
if (poolId != 0)
Log.outError(LogFilter.Sql, $"`game_event_gameobject`: game event id ({event_id}) contains game object ({guid}) which is part of a pool ({poolId}). This should be spawned in game_event_pool");
mGameEventGameobjectGuids[internal_event_id].Add(guid);
++count;