mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 23:56:25 +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:
@@ -59,7 +59,7 @@ std::vector<ChatCommand> const& ChatHandler::getCommandTable()
|
||||
return commandTableCache;
|
||||
}
|
||||
|
||||
std::string ChatHandler::PGetParseString(int32 entry, ...) const
|
||||
std::string ChatHandler::PGetParseString(uint32 entry, ...) const
|
||||
{
|
||||
const char *format = GetTrinityString(entry);
|
||||
char str[1024];
|
||||
@@ -70,7 +70,7 @@ std::string ChatHandler::PGetParseString(int32 entry, ...) const
|
||||
return std::string(str);
|
||||
}
|
||||
|
||||
const char *ChatHandler::GetTrinityString(int32 entry) const
|
||||
char const* ChatHandler::GetTrinityString(uint32 entry) const
|
||||
{
|
||||
return m_session->GetTrinityString(entry);
|
||||
}
|
||||
@@ -209,12 +209,12 @@ void ChatHandler::SendGlobalGMSysMessage(const char *str)
|
||||
free(buf);
|
||||
}
|
||||
|
||||
void ChatHandler::SendSysMessage(int32 entry)
|
||||
void ChatHandler::SendSysMessage(uint32 entry)
|
||||
{
|
||||
SendSysMessage(GetTrinityString(entry));
|
||||
}
|
||||
|
||||
void ChatHandler::PSendSysMessage(int32 entry, ...)
|
||||
void ChatHandler::PSendSysMessage(uint32 entry, ...)
|
||||
{
|
||||
const char *format = GetTrinityString(entry);
|
||||
va_list ap;
|
||||
@@ -1217,7 +1217,7 @@ std::string ChatHandler::GetNameLink(Player* chr) const
|
||||
return playerLink(chr->GetName());
|
||||
}
|
||||
|
||||
const char *CliHandler::GetTrinityString(int32 entry) const
|
||||
char const* CliHandler::GetTrinityString(uint32 entry) const
|
||||
{
|
||||
return sObjectMgr->GetTrinityStringForDBCLocale(entry);
|
||||
}
|
||||
|
||||
@@ -56,13 +56,13 @@ class ChatHandler
|
||||
static char* LineFromMessage(char*& pos) { char* start = strtok(pos, "\n"); pos = NULL; return start; }
|
||||
|
||||
// function with different implementation for chat/console
|
||||
virtual const char *GetTrinityString(int32 entry) const;
|
||||
virtual void SendSysMessage(const char *str);
|
||||
virtual char const* GetTrinityString(uint32 entry) const;
|
||||
virtual void SendSysMessage(char const* str);
|
||||
|
||||
void SendSysMessage(int32 entry);
|
||||
void PSendSysMessage(const char *format, ...) ATTR_PRINTF(2, 3);
|
||||
void PSendSysMessage(int32 entry, ...);
|
||||
std::string PGetParseString(int32 entry, ...) const;
|
||||
void SendSysMessage(uint32 entry);
|
||||
void PSendSysMessage(char const* format, ...) ATTR_PRINTF(2, 3);
|
||||
void PSendSysMessage(uint32 entry, ...);
|
||||
std::string PGetParseString(uint32 entry, ...) const;
|
||||
|
||||
bool ParseCommands(const char* text);
|
||||
|
||||
@@ -139,13 +139,13 @@ class CliHandler : public ChatHandler
|
||||
explicit CliHandler(void* callbackArg, Print* zprint) : m_callbackArg(callbackArg), m_print(zprint) {}
|
||||
|
||||
// overwrite functions
|
||||
const char *GetTrinityString(int32 entry) const;
|
||||
bool isAvailable(ChatCommand const& cmd) const;
|
||||
void SendSysMessage(const char *str);
|
||||
std::string GetNameLink() const;
|
||||
bool needReportToTarget(Player* chr) const;
|
||||
LocaleConstant GetSessionDbcLocale() const;
|
||||
int GetSessionDbLocaleIndex() const;
|
||||
char const* GetTrinityString(uint32 entry) const override;
|
||||
bool isAvailable(ChatCommand const& cmd) const override;
|
||||
void SendSysMessage(const char *str) override;
|
||||
std::string GetNameLink() const override;
|
||||
bool needReportToTarget(Player* chr) const override;
|
||||
LocaleConstant GetSessionDbcLocale() const override;
|
||||
int GetSessionDbLocaleIndex() const override;
|
||||
|
||||
private:
|
||||
void* m_callbackArg;
|
||||
|
||||
Reference in New Issue
Block a user