mirror of
https://github.com/araxiaonline/AzerothCore-wotlk-with-NPCBots.git
synced 2026-06-13 03:22:24 -04:00
fix(Core/Chat): fix crash when using GetModuleString() from console (#25896)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -895,6 +895,11 @@ std::string CliHandler::GetAcoreString(uint32 entry) const
|
||||
return sObjectMgr->GetAcoreStringForDBCLocale(entry);
|
||||
}
|
||||
|
||||
std::string const* CliHandler::GetModuleString(std::string module, uint32 id) const
|
||||
{
|
||||
return sObjectMgr->GetModuleString(module, id, LocaleConstant(sObjectMgr->GetDBCLocaleIndex()));
|
||||
}
|
||||
|
||||
void CliHandler::SendSysMessage(std::string_view str, bool /*escapeCharacters*/)
|
||||
{
|
||||
m_print(m_callbackArg, str);
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
return Acore::StringFormat(GetAcoreString(entry), std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
std::string const* GetModuleString(std::string module, uint32 id) const;
|
||||
virtual std::string const* GetModuleString(std::string module, uint32 id) const;
|
||||
|
||||
template<typename... Args>
|
||||
void PSendModuleSysMessage(std::string module, uint32 id, Args&&... args)
|
||||
@@ -260,6 +260,7 @@ public:
|
||||
|
||||
// overwrite functions
|
||||
std::string GetAcoreString(uint32 entry) const override;
|
||||
std::string const* GetModuleString(std::string module, uint32 id) const override;
|
||||
void SendSysMessage(std::string_view, bool escapeCharacters) override;
|
||||
bool ParseCommands(std::string_view str) override;
|
||||
std::string GetNameLink() const override;
|
||||
|
||||
Reference in New Issue
Block a user