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:
Kargatum
2019-01-13 05:56:06 +07:00
committed by Viste(Кирилл)
parent 76772e434d
commit b34bc28e5b
26 changed files with 59397 additions and 525 deletions

View File

@@ -1463,6 +1463,8 @@ void World::SetInitialWorldSettings()
sObjectMgr->LoadItemLocales();
sObjectMgr->LoadItemSetNameLocales();
sObjectMgr->LoadQuestLocales();
sObjectMgr->LoadQuestOfferRewardLocale();
sObjectMgr->LoadQuestRequestItemsLocale();
sObjectMgr->LoadNpcTextLocales();
sObjectMgr->LoadPageTextLocales();
sObjectMgr->LoadGossipMenuItemsLocales();
@@ -1805,10 +1807,7 @@ void World::SetInitialWorldSettings()
sObjectMgr->LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
sObjectMgr->LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
sObjectMgr->LoadWaypointScripts();
sLog->outString("Loading Scripts text locales..."); // must be after Load*Scripts calls
sObjectMgr->LoadDbScriptStrings();
sLog->outString("Loading spell script names...");
sObjectMgr->LoadSpellScriptNames();
@@ -2282,7 +2281,7 @@ namespace Trinity
{
public:
typedef std::vector<WorldPacket*> WorldPacketList;
explicit WorldWorldTextBuilder(int32 textId, va_list* args = NULL) : i_textId(textId), i_args(args) {}
explicit WorldWorldTextBuilder(uint32 textId, va_list* args = NULL) : i_textId(textId), i_args(args) {}
void operator()(WorldPacketList& data_list, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx);
@@ -2316,13 +2315,13 @@ namespace Trinity
}
int32 i_textId;
uint32 i_textId;
va_list* i_args;
};
} // namespace Trinity
/// Send a System Message to all players (except self if mentioned)
void World::SendWorldText(int32 string_id, ...)
void World::SendWorldText(uint32 string_id, ...)
{
va_list ap;
va_start(ap, string_id);
@@ -2341,7 +2340,7 @@ void World::SendWorldText(int32 string_id, ...)
}
/// Send a System Message to all GMs (except self if mentioned)
void World::SendGMText(int32 string_id, ...)
void World::SendGMText(uint32 string_id, ...)
{
va_list ap;
va_start(ap, string_id);

View File

@@ -651,9 +651,9 @@ class World
void LoadConfigSettings(bool reload = false);
void LoadModuleConfigSettings();
void SendWorldText(int32 string_id, ...);
void SendWorldText(uint32 string_id, ...);
void SendGlobalText(const char* text, WorldSession* self);
void SendGMText(int32 string_id, ...);
void SendGMText(uint32 string_id, ...);
void SendGlobalMessage(WorldPacket* packet, WorldSession* self = 0, TeamId teamId = TEAM_NEUTRAL);
void SendGlobalGMMessage(WorldPacket* packet, WorldSession* self = 0, TeamId teamId = TEAM_NEUTRAL);
bool SendZoneMessage(uint32 zone, WorldPacket* packet, WorldSession* self = 0, TeamId teamId = TEAM_NEUTRAL);