mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Provide and use universal way for get locale and locale index for chat/console command use.
This commit is contained in:
parent
695d83568a
commit
fdbc22ac93
6 changed files with 56 additions and 30 deletions
|
|
@ -1578,6 +1578,16 @@ bool ChatHandler::needReportToTarget(Player* chr) const
|
|||
return pl != chr && pl->IsVisibleGloballyFor(chr);
|
||||
}
|
||||
|
||||
LocaleConstant ChatHandler::GetSessionDbcLocale() const
|
||||
{
|
||||
return m_session->GetSessionDbcLocale();
|
||||
}
|
||||
|
||||
int ChatHandler::GetSessionDbLocaleIndex() const
|
||||
{
|
||||
return m_session->GetSessionDbLocaleIndex();
|
||||
}
|
||||
|
||||
const char *CliHandler::GetMangosString(int32 entry) const
|
||||
{
|
||||
return objmgr.GetMangosStringForDBCLocale(entry);
|
||||
|
|
@ -1605,3 +1615,12 @@ bool CliHandler::needReportToTarget(Player* /*chr*/) const
|
|||
return true;
|
||||
}
|
||||
|
||||
LocaleConstant CliHandler::GetSessionDbcLocale() const
|
||||
{
|
||||
return sWorld.GetDefaultDbcLocale();
|
||||
}
|
||||
|
||||
int CliHandler::GetSessionDbLocaleIndex() const
|
||||
{
|
||||
return objmgr.GetDBCLocaleIndex();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue