mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10711] Check localization data for existance main table entres.
Data will skipped for nonexistent entries, and reported with disabled LogFilter_DbStrictedCheck filter.
This commit is contained in:
parent
24eb9ec87a
commit
534ff29f15
8 changed files with 118 additions and 54 deletions
|
|
@ -299,6 +299,12 @@ void ObjectMgr::LoadCreatureLocales()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
|
||||
if (!GetCreatureTemplate(entry))
|
||||
{
|
||||
ERROR_DB_STRICT_LOG("Table `locales_creature` has data for not existed creature entry %u, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
CreatureLocale& data = mCreatureLocaleMap[entry];
|
||||
|
||||
for(int i = 1; i < MAX_LOCALE; ++i)
|
||||
|
|
@ -368,6 +374,27 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
|
|||
uint16 menuId = fields[0].GetUInt16();
|
||||
uint16 id = fields[1].GetUInt16();
|
||||
|
||||
GossipMenuItemsMapBounds bounds = GetGossipMenuItemsMapBounds(menuId);
|
||||
|
||||
bool found = false;
|
||||
if (bounds.first != bounds.second)
|
||||
{
|
||||
for (GossipMenuItemsMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
|
||||
{
|
||||
if (itr->second.id == id)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
ERROR_DB_STRICT_LOG("Table `locales_gossip_menu_option` has data for nonexistent gossip menu %u item %u, skipped.", menuId, id);
|
||||
continue;
|
||||
}
|
||||
|
||||
GossipMenuItemsLocale& data = mGossipMenuItemsLocaleMap[MAKE_PAIR32(menuId,id)];
|
||||
|
||||
for(int i = 1; i < MAX_LOCALE; ++i)
|
||||
|
|
@ -431,6 +458,12 @@ void ObjectMgr::LoadPointOfInterestLocales()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
|
||||
if (!GetPointOfInterest(entry))
|
||||
{
|
||||
ERROR_DB_STRICT_LOG("Table `locales_points_of_interest` has data for nonexistent POI entry %u, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
PointOfInterestLocale& data = mPointOfInterestLocaleMap[entry];
|
||||
|
||||
for(int i = 1; i < MAX_LOCALE; ++i)
|
||||
|
|
@ -1769,6 +1802,12 @@ void ObjectMgr::LoadItemLocales()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
|
||||
if (!GetItemPrototype(entry))
|
||||
{
|
||||
ERROR_DB_STRICT_LOG("Table `locales_item` has data for nonexistent item entry %u, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemLocale& data = mItemLocaleMap[entry];
|
||||
|
||||
for(int i = 1; i < MAX_LOCALE; ++i)
|
||||
|
|
@ -4377,6 +4416,12 @@ void ObjectMgr::LoadQuestLocales()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
|
||||
if (!GetQuestTemplate(entry))
|
||||
{
|
||||
ERROR_DB_STRICT_LOG("Table `locales_quest` has data for nonexistent quest entry %u, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
QuestLocale& data = mQuestLocaleMap[entry];
|
||||
|
||||
for(int i = 1; i < MAX_LOCALE; ++i)
|
||||
|
|
@ -5147,6 +5192,12 @@ void ObjectMgr::LoadPageTextLocales()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
|
||||
if (!sPageTextStore.LookupEntry<PageText>(entry))
|
||||
{
|
||||
ERROR_DB_STRICT_LOG("Table `locales_page_text` has data for nonexistent page text entry %u, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
PageTextLocale& data = mPageTextLocaleMap[entry];
|
||||
|
||||
for(int i = 1; i < MAX_LOCALE; ++i)
|
||||
|
|
@ -5335,6 +5386,12 @@ void ObjectMgr::LoadNpcTextLocales()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
|
||||
if (!GetGossipText(entry))
|
||||
{
|
||||
ERROR_DB_STRICT_LOG("Table `locales_npc_text` has data for nonexistent gossip text entry %u, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
NpcTextLocale& data = mNpcTextLocaleMap[entry];
|
||||
|
||||
for(int i=1; i<MAX_LOCALE; ++i)
|
||||
|
|
@ -6408,6 +6465,12 @@ void ObjectMgr::LoadGameObjectLocales()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
|
||||
if (!GetGameObjectInfo(entry))
|
||||
{
|
||||
ERROR_DB_STRICT_LOG("Table `locales_gameobject` has data for nonexistent gameobject entry %u, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
GameObjectLocale& data = mGameObjectLocaleMap[entry];
|
||||
|
||||
for(int i = 1; i < MAX_LOCALE; ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue