mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
feat(DB/Module): introduce module_string table (#19475)
This commit is contained in:
@@ -45,6 +45,11 @@ char const* ChatHandler::GetAcoreString(uint32 entry) const
|
||||
return m_session->GetAcoreString(entry);
|
||||
}
|
||||
|
||||
std::string const* ChatHandler::GetModuleString(std::string module, uint32 id) const
|
||||
{
|
||||
return m_session->GetModuleString(module, id);
|
||||
}
|
||||
|
||||
bool ChatHandler::IsAvailable(uint32 securityLevel) const
|
||||
{
|
||||
// check security level only for simple command (without child commands)
|
||||
|
||||
@@ -158,6 +158,21 @@ public:
|
||||
return Acore::StringFormatFmt(GetAcoreString(entry), std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
std::string const* GetModuleString(std::string module, uint32 id) const;
|
||||
|
||||
template<typename... Args>
|
||||
void PSendModuleSysMessage(std::string module, uint32 id, Args&&... args)
|
||||
{
|
||||
if (HasSession())
|
||||
SendSysMessage(PGetParseModuleString(module, id, std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
std::string PGetParseModuleString(std::string module, uint32 id, Args&&... args) const
|
||||
{
|
||||
return Acore::StringFormatFmt(GetModuleString(module, id)->c_str(), std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
void SendErrorMessage(uint32 entry);
|
||||
void SendErrorMessage(std::string_view str, bool escapeCharacters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user