mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/GameEvent: Add log for game_event_creature/game_event_gameobject contains creature/gameobject not found in table creature/gameobject table
This commit is contained in:
@@ -272,10 +272,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = CharacterDatabase.Query("SELECT eventEntry, state, next_start FROM game_event_save");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -318,10 +315,7 @@ void GameEventMgr::LoadFromDB()
|
||||
// 0 1
|
||||
QueryResult result = WorldDatabase.Query("SELECT eventEntry, prerequisite_event FROM game_event_prerequisite");
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -366,15 +360,11 @@ void GameEventMgr::LoadFromDB()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1
|
||||
QueryResult result = WorldDatabase.Query("SELECT creature.guid, game_event_creature.eventEntry FROM creature"
|
||||
" JOIN game_event_creature ON creature.guid = game_event_creature.guid");
|
||||
// 0 1
|
||||
QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry FROM game_event_creature");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -387,6 +377,13 @@ void GameEventMgr::LoadFromDB()
|
||||
|
||||
int32 internal_event_id = mGameEvent.size() + event_id - 1;
|
||||
|
||||
CreatureData const* data = sObjectMgr->GetCreatureData(guid);
|
||||
if (!data)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_creature` contains creature (GUID: %u) not found in `creature` table.", guid);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_creature` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
|
||||
@@ -409,15 +406,11 @@ void GameEventMgr::LoadFromDB()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1
|
||||
QueryResult result = WorldDatabase.Query("SELECT gameobject.guid, game_event_gameobject.eventEntry FROM gameobject"
|
||||
" JOIN game_event_gameobject ON gameobject.guid=game_event_gameobject.guid");
|
||||
// 0 1
|
||||
QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry FROM game_event_gameobject");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -430,6 +423,13 @@ void GameEventMgr::LoadFromDB()
|
||||
|
||||
int32 internal_event_id = mGameEvent.size() + event_id - 1;
|
||||
|
||||
GameObjectData const* data = sObjectMgr->GetGOData(guid);
|
||||
if (!data)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_gameobject` contains gameobject (GUID: %u) not found in `gameobject` table.", guid);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_gameobject` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
|
||||
@@ -456,9 +456,7 @@ void GameEventMgr::LoadFromDB()
|
||||
"FROM creature JOIN game_event_model_equip ON creature.guid=game_event_model_equip.guid");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -512,9 +510,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = WorldDatabase.Query("SELECT id, quest, eventEntry FROM game_event_creature_quest");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -551,9 +547,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = WorldDatabase.Query("SELECT id, quest, eventEntry FROM game_event_gameobject_quest");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -590,9 +584,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = WorldDatabase.Query("SELECT quest, eventEntry, condition_id, num FROM game_event_quest_condition");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -631,9 +623,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = WorldDatabase.Query("SELECT eventEntry, condition_id, req_num, max_world_state_field, done_world_state_field FROM game_event_condition");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -671,9 +661,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = CharacterDatabase.Query("SELECT eventEntry, condition_id, done FROM game_event_condition_save");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -717,9 +705,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry, npcflag FROM game_event_npcflag");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -755,9 +741,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = WorldDatabase.Query("SELECT questId, eventEntry FROM game_event_seasonal_questrelation");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -859,9 +843,7 @@ void GameEventMgr::LoadFromDB()
|
||||
QueryResult result = WorldDatabase.Query("SELECT eventEntry, bgflag FROM game_event_battleground_holiday");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -896,9 +878,7 @@ void GameEventMgr::LoadFromDB()
|
||||
" JOIN game_event_pool ON pool_template.entry = game_event_pool.pool_entry");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
|
||||
@@ -1572,7 +1572,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
uint32 const FetchIngredients[21] [4] =
|
||||
uint32 const FetchIngredients[21][4] =
|
||||
{
|
||||
{ SPELL_FETCH_KNOTROOT, SPELL_HAVE_KNOTROOT, ITEM_KNOTROOT, SAY_KNOTROOT },
|
||||
{ SPELL_FETCH_PICKLED_EAGLE_EGG, SPELL_HAVE_PICKLED_EAGLE_EGG, ITEM_PICKLED_EAGLE_EGG, SAY_PICKLED_EAGLE_EGG },
|
||||
@@ -1673,7 +1673,6 @@ class spell_random_ingredient : public SpellScriptLoader
|
||||
{
|
||||
if (Player* player = GetHitPlayer())
|
||||
{
|
||||
|
||||
uint8 ingredient = 0;
|
||||
|
||||
switch (GetSpellInfo()->Id)
|
||||
|
||||
Reference in New Issue
Block a user