mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 17:13:47 +00:00
refactor(Core/ObjectMgr): Change GetAcoreString from char const* to s… (#21213)
...ring
This commit is contained in:
@@ -58,7 +58,8 @@ namespace Acore
|
||||
|
||||
void operator()(WorldPacket& data, LocaleConstant loc_idx)
|
||||
{
|
||||
char const* text = sObjectMgr->GetAcoreString(_textId, loc_idx);
|
||||
std::string strtext = sObjectMgr->GetAcoreString(_textId, loc_idx);
|
||||
char const* text = strtext.c_str();
|
||||
if (_args)
|
||||
{
|
||||
// we need copy va_list before use or original va_list will corrupted
|
||||
@@ -95,9 +96,12 @@ namespace Acore
|
||||
|
||||
void operator()(WorldPacket& data, LocaleConstant loc_idx)
|
||||
{
|
||||
char const* text = sObjectMgr->GetAcoreString(_textId, loc_idx);
|
||||
char const* arg1str = _arg1 ? sObjectMgr->GetAcoreString(_arg1, loc_idx) : "";
|
||||
char const* arg2str = _arg2 ? sObjectMgr->GetAcoreString(_arg2, loc_idx) : "";
|
||||
std::string strtext = sObjectMgr->GetAcoreString(_textId, loc_idx);
|
||||
char const* text = strtext.c_str();
|
||||
std::string stragr1str = sObjectMgr->GetAcoreString(_arg1, loc_idx);
|
||||
char const* arg1str = _arg1 ? stragr1str.c_str() : "";
|
||||
std::string strarg2str = sObjectMgr->GetAcoreString(_arg2, loc_idx);
|
||||
char const* arg2str = _arg2 ? strarg2str.c_str() : "";
|
||||
|
||||
char str[2048];
|
||||
snprintf(str, 2048, text, arg1str, arg2str);
|
||||
@@ -1659,13 +1663,6 @@ void Battleground::EndNow()
|
||||
SetEndTime(0);
|
||||
}
|
||||
|
||||
// To be removed
|
||||
char const* Battleground::GetAcoreString(int32 entry)
|
||||
{
|
||||
// FIXME: now we have different DBC locales and need localized message for each target client
|
||||
return sObjectMgr->GetAcoreStringForDBCLocale(entry);
|
||||
}
|
||||
|
||||
void Battleground::HandleTriggerBuff(GameObject* gameObject)
|
||||
{
|
||||
// Xinef: crash fix?
|
||||
|
||||
Reference in New Issue
Block a user