mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
fix(DB/broadcast_text): align some column names (#10090)
This commit is contained in:
@@ -8981,8 +8981,8 @@ void ObjectMgr::LoadBroadcastTexts()
|
||||
|
||||
_broadcastTextStore.clear(); // for reload case
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
QueryResult result = WorldDatabase.Query("SELECT ID, Language, MaleText, FemaleText, EmoteID0, EmoteID1, EmoteID2, EmoteDelay0, EmoteDelay1, EmoteDelay2, SoundId, Unk1, Unk2 FROM broadcast_text");
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
QueryResult result = WorldDatabase.Query("SELECT ID, LanguageID, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, EmoteDelay3, SoundEntriesID, EmotesID, Flags FROM broadcast_text");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server.loading", ">> Loaded 0 broadcast texts. DB table `broadcast_text` is empty.");
|
||||
@@ -9002,22 +9002,22 @@ void ObjectMgr::LoadBroadcastTexts()
|
||||
bct.LanguageID = fields[1].GetUInt32();
|
||||
bct.MaleText[DEFAULT_LOCALE] = fields[2].GetString();
|
||||
bct.FemaleText[DEFAULT_LOCALE] = fields[3].GetString();
|
||||
bct.EmoteId0 = fields[4].GetUInt32();
|
||||
bct.EmoteId1 = fields[5].GetUInt32();
|
||||
bct.EmoteId2 = fields[6].GetUInt32();
|
||||
bct.EmoteDelay0 = fields[7].GetUInt32();
|
||||
bct.EmoteDelay1 = fields[8].GetUInt32();
|
||||
bct.EmoteDelay2 = fields[9].GetUInt32();
|
||||
bct.SoundId = fields[10].GetUInt32();
|
||||
bct.Unk1 = fields[11].GetUInt32();
|
||||
bct.Unk2 = fields[12].GetUInt32();
|
||||
bct.EmoteId1 = fields[4].GetUInt32();
|
||||
bct.EmoteId2 = fields[5].GetUInt32();
|
||||
bct.EmoteId3 = fields[6].GetUInt32();
|
||||
bct.EmoteDelay1 = fields[7].GetUInt32();
|
||||
bct.EmoteDelay2 = fields[8].GetUInt32();
|
||||
bct.EmoteDelay3 = fields[9].GetUInt32();
|
||||
bct.SoundEntriesId = fields[10].GetUInt32();
|
||||
bct.EmotesID = fields[11].GetUInt32();
|
||||
bct.Flags = fields[12].GetUInt32();
|
||||
|
||||
if (bct.SoundId)
|
||||
if (bct.SoundEntriesId)
|
||||
{
|
||||
if (!sSoundEntriesStore.LookupEntry(bct.SoundId))
|
||||
if (!sSoundEntriesStore.LookupEntry(bct.SoundEntriesId))
|
||||
{
|
||||
LOG_DEBUG("misc", "BroadcastText (Id: %u) in table `broadcast_text` has SoundId %u but sound does not exist.", bct.Id, bct.SoundId);
|
||||
bct.SoundId = 0;
|
||||
LOG_DEBUG("misc", "BroadcastText (Id: %u) in table `broadcast_text` has SoundEntriesId %u but sound does not exist.", bct.Id, bct.SoundEntriesId);
|
||||
bct.SoundEntriesId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9027,15 +9027,6 @@ void ObjectMgr::LoadBroadcastTexts()
|
||||
bct.LanguageID = LANG_UNIVERSAL;
|
||||
}
|
||||
|
||||
if (bct.EmoteId0)
|
||||
{
|
||||
if (!sEmotesStore.LookupEntry(bct.EmoteId0))
|
||||
{
|
||||
LOG_DEBUG("misc", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId0 %u but emote does not exist.", bct.Id, bct.EmoteId0);
|
||||
bct.EmoteId0 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (bct.EmoteId1)
|
||||
{
|
||||
if (!sEmotesStore.LookupEntry(bct.EmoteId1))
|
||||
@@ -9054,6 +9045,15 @@ void ObjectMgr::LoadBroadcastTexts()
|
||||
}
|
||||
}
|
||||
|
||||
if (bct.EmoteId3)
|
||||
{
|
||||
if (!sEmotesStore.LookupEntry(bct.EmoteId3))
|
||||
{
|
||||
LOG_DEBUG("misc", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId3 %u but emote does not exist.", bct.Id, bct.EmoteId3);
|
||||
bct.EmoteId3 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
_broadcastTextStore[bct.Id] = bct;
|
||||
} while (result->NextRow());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user