mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
refactor(Core/Chat): PSendSysMessage to fmt (#19449)
* refactor(Core/Chat): PSendSysMessage to `fmt`
This commit is contained in:
@@ -211,11 +211,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -244,11 +244,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -312,11 +312,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description.c_str(), active);
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description, active);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description.c_str(), active);
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description, active);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -516,11 +516,13 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, ItemQualityColors[itemTemplate.Quality], itemTemplate.ItemId, name.c_str());
|
||||
std::ostringstream color;
|
||||
color << std::hex << ItemQualityColors[itemTemplate.Quality];
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, color.str(), itemTemplate.ItemId, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name.c_str());
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -550,11 +552,13 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, ItemQualityColors[itemTemplate.Quality], itemTemplate.ItemId, name.c_str());
|
||||
std::ostringstream color;
|
||||
color << std::hex << ItemQualityColors[itemTemplate.Quality];
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, color.str(), itemTemplate.ItemId, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name.c_str());
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -640,11 +644,11 @@ public:
|
||||
// send item set in "id - [namedlink locale]" format
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name.c_str(), localeNames[locale]);
|
||||
handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name, localeNames[locale]);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name.c_str(), localeNames[locale]);
|
||||
handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name, localeNames[locale]);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -703,11 +707,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -736,11 +740,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -826,11 +830,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title, statusStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title, statusStr);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -882,11 +886,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title, statusStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title, statusStr);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -987,11 +991,11 @@ public:
|
||||
// send skill in "id - [namedlink locale]" format
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, skillInfo->id, skillInfo->id, name.c_str(), localeNames[locale], knownStr.c_str(), valStr.c_str());
|
||||
handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, skillInfo->id, skillInfo->id, name, localeNames[locale], knownStr, valStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, skillInfo->id, name.c_str(), localeNames[locale], knownStr.c_str(), valStr.c_str());
|
||||
handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, skillInfo->id, name, localeNames[locale], knownStr, valStr);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -1341,12 +1345,12 @@ public:
|
||||
// send taxinode in "id - [name] (Map:m X:x Y:y Z:z)" format
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, nodeEntry->ID, nodeEntry->ID, name.c_str(), localeNames[locale],
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, nodeEntry->ID, nodeEntry->ID, name, localeNames[locale],
|
||||
nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, nodeEntry->ID, name.c_str(), localeNames[locale],
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, nodeEntry->ID, name, localeNames[locale],
|
||||
nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
|
||||
}
|
||||
|
||||
@@ -1416,7 +1420,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str().c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str());
|
||||
}
|
||||
|
||||
if (limitReached)
|
||||
@@ -1675,7 +1679,7 @@ public:
|
||||
|
||||
if (result2)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, accountName.c_str(), accountId);
|
||||
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, accountName, accountId);
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1694,11 +1698,11 @@ public:
|
||||
|
||||
if (plevel > 0 && prace > 0 && prace <= RACE_DRAENEI && pclass > 0 && pclass <= CLASS_DRUID)
|
||||
{
|
||||
handler->PSendSysMessage(" %s (GUID %u) - %s - %s - %u%s", name.c_str(), guid, EnumUtils::ToTitle(Races(prace)), EnumUtils::ToTitle(Classes(pclass)), plevel, (online ? " - [ONLINE]" : ""));
|
||||
handler->PSendSysMessage(" {} (GUID {}) - {} - {} - {}{}", name, guid, EnumUtils::ToTitle(Races(prace)), EnumUtils::ToTitle(Classes(pclass)), plevel, (online ? " - [ONLINE]" : ""));
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name.c_str(), guid);
|
||||
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name, guid);
|
||||
}
|
||||
|
||||
++counter;
|
||||
|
||||
Reference in New Issue
Block a user