refactor(Core/ObjectMgr): Change GetAcoreString from char const* to s… (#21213)

...ring
This commit is contained in:
Kitzunu
2025-02-01 22:46:42 +01:00
committed by GitHub
parent 137337601d
commit 9e9a2fe5e3
25 changed files with 71 additions and 95 deletions

View File

@@ -61,28 +61,22 @@ public:
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
char const* active = handler->GetAcoreString(LANG_ACTIVE);
std::string active = handler->GetAcoreString(LANG_ACTIVE);
for (uint16 eventId : activeEvents)
{
GameEventData const& eventData = events[eventId];
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, eventId, eventId, eventData.description, active);
}
else
{
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, eventId, eventData.description, active);
}
++counter;
}
if (counter == 0)
{
handler->SendSysMessage(LANG_NOEVENTFOUND);
}
handler->SetSentErrorMessage(true);
@@ -108,7 +102,7 @@ public:
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
bool active = activeEvents.find(eventId) != activeEvents.end();
char const* activeStr = active ? handler->GetAcoreString(LANG_ACTIVE) : "";
std::string activeStr = active ? handler->GetAcoreString(LANG_ACTIVE) : "";
std::string startTimeStr = Acore::Time::TimeToTimestampStr(Seconds(eventData.start));
std::string endTimeStr = Acore::Time::TimeToTimestampStr(Seconds(eventData.end));