mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
refactor(Core/Misc): Acore::StringFormat to fmt format (#19838)
refactor(Core/Utilities): Acore::StringFormat to fmt format * closes https://github.com/azerothcore/azerothcore-wotlk/issues/10356
This commit is contained in:
@@ -310,7 +310,7 @@ public:
|
||||
if (target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index)
|
||||
activeStr = handler->GetAcoreString(LANG_ACTIVE);
|
||||
|
||||
std::string titleName = Acore::StringFormat(name, player->GetName().c_str());
|
||||
std::string titleName = Acore::StringFormat(name, player->GetName());
|
||||
|
||||
// send title in "id (idx:idx) - [namedlink locale]" format
|
||||
if (handler->GetSession())
|
||||
|
||||
@@ -733,14 +733,14 @@ public:
|
||||
|
||||
if (item->GetOwnerGUID() != player->GetGUID())
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): For the item {}, the owner ({}) and the player ({}) don't match!", index, item->GetGUID().ToString(), item->GetOwnerGUID().ToString(), player->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormat("queue({}): For the item {}, the owner ({}) and the player ({}) don't match!", index, item->GetGUID().ToString(), item->GetOwnerGUID().ToString(), player->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item->GetQueuePos() != index)
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): For the item {}, the queuepos doesn't match it's position in the queue!", index, item->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormat("queue({}): For the item {}, the queuepos doesn't match it's position in the queue!", index, item->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -752,14 +752,14 @@ public:
|
||||
|
||||
if (!test)
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for {} are incorrect, the player doesn't have any item at that position!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormat("queue({}): The bag({}) and slot({}) values for {} are incorrect, the player doesn't have any item at that position!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (test != item)
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for the {} are incorrect, {} is there instead!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString(), test->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormat("queue({}): The bag({}) and slot({}) values for the {} are incorrect, {} is there instead!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString(), test->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
if (message.empty())
|
||||
return false;
|
||||
|
||||
sWorld->SendServerMessage(SERVER_MSG_STRING, Acore::StringFormatFmt(handler->GetAcoreString(LANG_SYSTEMMESSAGE), message.data()));
|
||||
sWorld->SendServerMessage(SERVER_MSG_STRING, Acore::StringFormat(handler->GetAcoreString(LANG_SYSTEMMESSAGE), message.data()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
itemCount = *Acore::StringTo<uint32>(itemTokens.at(1));
|
||||
break;
|
||||
default:
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("> Incorrect item list format for '{}'", itemString));
|
||||
handler->SendSysMessage(Acore::StringFormat("> Incorrect item list format for '{}'", itemString));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,9 +121,9 @@ public:
|
||||
dbPort = (*res)[0].Get<uint16>();
|
||||
|
||||
if (dbPort)
|
||||
dbPortOutput = Acore::StringFormatFmt("Realmlist (Realm Id: {}) configured in port {}", realm.Id.Realm, dbPort);
|
||||
dbPortOutput = Acore::StringFormat("Realmlist (Realm Id: {}) configured in port {}", realm.Id.Realm, dbPort);
|
||||
else
|
||||
dbPortOutput = Acore::StringFormatFmt("Realm Id: {} not found in `realmlist` table. Please check your setup", realm.Id.Realm);
|
||||
dbPortOutput = Acore::StringFormat("Realm Id: {} not found in `realmlist` table. Please check your setup", realm.Id.Realm);
|
||||
}
|
||||
|
||||
HandleServerInfoCommand(handler);
|
||||
|
||||
@@ -144,7 +144,7 @@ class spell_the_flag_of_ownership : public SpellScript
|
||||
|
||||
LocaleConstant loc_idx = caster->ToPlayer()->GetSession()->GetSessionDbLocaleIndex();
|
||||
BroadcastText const* bct = sObjectMgr->GetBroadcastText(TEXT_FLAG_OF_OWNERSHIP);
|
||||
std::string bctMsg = Acore::StringFormat(bct->GetText(loc_idx, caster->getGender()), caster->GetName().c_str(), target->GetName().c_str());
|
||||
std::string bctMsg = Acore::StringFormat(bct->GetText(loc_idx, caster->getGender()), caster->GetName(), target->GetName());
|
||||
caster->Talk(bctMsg, CHAT_MSG_MONSTER_EMOTE, LANG_UNIVERSAL, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), target);
|
||||
|
||||
haveTarget = true;
|
||||
|
||||
Reference in New Issue
Block a user