mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
Core/DB: Update all locales to actual TrinityCore (#1160)
* Core/Misc Update all locales table structure to simple system. Port from TrinityCore Co-Authored-By: Winfidonarleyan <dowlandtop@yandex.com> * Core/Db/Gossip Update structure gossip_menu and gossip_menu_action to actual TrinityCore * Core/DB Update Broadcast system to actual TC * Core/Mail: implement Quest Mail Sender * Core/Quest Split quest template locales
This commit is contained in:
@@ -277,17 +277,17 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
|
||||
|
||||
recvData >> textID;
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_NPC_TEXT_QUERY TextId: %u", textID);
|
||||
#endif
|
||||
|
||||
recvData >> guid;
|
||||
|
||||
GossipText const* pGossip = sObjectMgr->GetGossipText(textID);
|
||||
GossipText const* gossip = sObjectMgr->GetGossipText(textID);
|
||||
|
||||
WorldPacket data(SMSG_NPC_TEXT_UPDATE, 100); // guess size
|
||||
data << textID;
|
||||
|
||||
if (!pGossip)
|
||||
if (!gossip)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
|
||||
{
|
||||
@@ -307,10 +307,10 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
std::string text0[MAX_GOSSIP_TEXT_OPTIONS], text1[MAX_GOSSIP_TEXT_OPTIONS];
|
||||
LocaleConstant locale = GetSessionDbLocaleIndex();
|
||||
|
||||
|
||||
for (uint8 i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; ++i)
|
||||
{
|
||||
BroadcastText const* bct = sObjectMgr->GetBroadcastText(pGossip->Options[i].BroadcastTextID);
|
||||
BroadcastText const* bct = sObjectMgr->GetBroadcastText(gossip->Options[i].BroadcastTextID);
|
||||
if (bct)
|
||||
{
|
||||
text0[i] = bct->GetText(locale, GENDER_MALE, true);
|
||||
@@ -318,8 +318,8 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
|
||||
}
|
||||
else
|
||||
{
|
||||
text0[i] = pGossip->Options[i].Text_0;
|
||||
text1[i] = pGossip->Options[i].Text_1;
|
||||
text0[i] = gossip->Options[i].Text_0;
|
||||
text1[i] = gossip->Options[i].Text_1;
|
||||
}
|
||||
|
||||
if (locale != DEFAULT_LOCALE && !bct)
|
||||
@@ -331,7 +331,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
|
||||
}
|
||||
}
|
||||
|
||||
data << pGossip->Options[i].Probability;
|
||||
data << gossip->Options[i].Probability;
|
||||
|
||||
if (text0[i].empty())
|
||||
data << text1[i];
|
||||
@@ -343,12 +343,12 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
|
||||
else
|
||||
data << text1[i];
|
||||
|
||||
data << pGossip->Options[i].Language;
|
||||
data << gossip->Options[i].Language;
|
||||
|
||||
for (uint8 j = 0; j < MAX_GOSSIP_TEXT_EMOTES; ++j)
|
||||
{
|
||||
data << pGossip->Options[i].Emotes[j]._Delay;
|
||||
data << pGossip->Options[i].Emotes[j]._Emote;
|
||||
data << gossip->Options[i].Emotes[j]._Delay;
|
||||
data << gossip->Options[i].Emotes[j]._Emote;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user