aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 80a56d17bf4..3ba31cda2cb 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -6116,10 +6116,10 @@ void ObjectMgr::LoadGossipText()
{
if (BroadcastText const* bcText = sObjectMgr->GetBroadcastText(gOption.BroadcastTextID))
{
- if (bcText->MaleText[DEFAULT_LOCALE] != gOption.Text_0)
- TC_LOG_INFO("sql.sql", "Row %u in table `npc_text` has mismatch between text%u_0 and the corresponding MaleText in `broadcast_text` row %u", id, i, gOption.BroadcastTextID);
- if (bcText->FemaleText[DEFAULT_LOCALE] != gOption.Text_1)
- TC_LOG_INFO("sql.sql", "Row %u in table `npc_text` has mismatch between text%u_1 and the corresponding FemaleText in `broadcast_text` row %u", id, i, gOption.BroadcastTextID);
+ if (bcText->Text[DEFAULT_LOCALE] != gOption.Text_0)
+ TC_LOG_INFO("sql.sql", "Row %u in table `npc_text` has mismatch between text%u_0 and the corresponding Text in `broadcast_text` row %u", id, i, gOption.BroadcastTextID);
+ if (bcText->Text1[DEFAULT_LOCALE] != gOption.Text_1)
+ TC_LOG_INFO("sql.sql", "Row %u in table `npc_text` has mismatch between text%u_1 and the corresponding Text1 in `broadcast_text` row %u", id, i, gOption.BroadcastTextID);
}
else
{
@@ -9623,8 +9623,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, Text, Text1, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, EmoteDelay3, SoundEntriesID, EmotesID, Flags FROM broadcast_text");
if (!result)
{
TC_LOG_INFO("server.loading", ">> Loaded 0 broadcast texts. DB table `broadcast_text` is empty.");
@@ -9640,41 +9640,32 @@ void ObjectMgr::LoadBroadcastTexts()
BroadcastText bct;
bct.Id = fields[0].GetUInt32();
- bct.Language = 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.LanguageID = fields[1].GetUInt32();
+ bct.Text[DEFAULT_LOCALE] = fields[2].GetString();
+ bct.Text1[DEFAULT_LOCALE] = fields[3].GetString();
+ 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))
{
- TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` has SoundId %u but sound does not exist.", bct.Id, bct.SoundId);
- bct.SoundId = 0;
+ TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` has SoundEntriesID %u but sound does not exist.", bct.Id, bct.SoundEntriesID);
+ bct.SoundEntriesID = 0;
}
}
- if (!GetLanguageDescByID(bct.Language))
+ if (!GetLanguageDescByID(bct.LanguageID))
{
- TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` using Language %u but Language does not exist.", bct.Id, bct.Language);
- bct.Language = LANG_UNIVERSAL;
- }
-
- if (bct.EmoteId0)
- {
- if (!sEmotesStore.LookupEntry(bct.EmoteId0))
- {
- TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` has EmoteId0 %u but emote does not exist.", bct.Id, bct.EmoteId0);
- bct.EmoteId0 = 0;
- }
+ TC_LOG_DEBUG("broadcasttext", "BroadcastText (Id: %u) in table `broadcast_text` using LanguageID %u but Language does not exist.", bct.Id, bct.LanguageID);
+ bct.LanguageID = LANG_UNIVERSAL;
}
if (bct.EmoteId1)
@@ -9695,6 +9686,15 @@ void ObjectMgr::LoadBroadcastTexts()
}
}
+ if (bct.EmoteId3)
+ {
+ if (!sEmotesStore.LookupEntry(bct.EmoteId3))
+ {
+ TC_LOG_DEBUG("broadcasttext", "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());
@@ -9706,8 +9706,8 @@ void ObjectMgr::LoadBroadcastTextLocales()
{
uint32 oldMSTime = getMSTime();
- // 0 1 2 3
- QueryResult result = WorldDatabase.Query("SELECT ID, locale, MaleText, FemaleText FROM broadcast_text_locale");
+ // 0 1 2 3
+ QueryResult result = WorldDatabase.Query("SELECT ID, locale, Text, Text1 FROM broadcast_text_locale");
if (!result)
{
TC_LOG_INFO("server.loading", ">> Loaded 0 broadcast text locales. DB table `broadcast_text_locale` is empty.");
@@ -9720,8 +9720,8 @@ void ObjectMgr::LoadBroadcastTextLocales()
uint32 id = fields[0].GetUInt32();
std::string localeName = fields[1].GetString();
- std::string MaleText = fields[2].GetString();
- std::string FemaleText = fields[3].GetString();
+ std::string Text = fields[2].GetString();
+ std::string Text1 = fields[3].GetString();
BroadcastTextContainer::iterator bct = _broadcastTextStore.find(id);
if (bct == _broadcastTextStore.end())
@@ -9734,8 +9734,8 @@ void ObjectMgr::LoadBroadcastTextLocales()
if (locale == LOCALE_enUS)
continue;
- AddLocaleString(MaleText, locale, bct->second.MaleText);
- AddLocaleString(FemaleText, locale, bct->second.FemaleText);
+ AddLocaleString(Text, locale, bct->second.Text);
+ AddLocaleString(Text1, locale, bct->second.Text1);
} while (result->NextRow());
TC_LOG_INFO("server.loading", ">> Loaded %u broadcast text locales in %u ms", uint32(_broadcastTextStore.size()), GetMSTimeDiffToNow(oldMSTime));