refactor(Core/WorldSession): Make SendNotification use fmt and parse acore_string (#19489)

* refactor(Core/WorldSession): Make SendNotification use `fmt`

* Make SendNotification use `fmt`

* Make SendNotification parse acore_string entries
This commit is contained in:
Kitzunu
2024-07-28 01:25:06 +02:00
committed by GitHub
parent 8d9f22572e
commit 6c0afe1810
7 changed files with 29 additions and 43 deletions

View File

@@ -345,9 +345,19 @@ public:
void ReadMovementInfo(WorldPacket& data, MovementInfo* mi);
void WriteMovementInfo(WorldPacket* data, MovementInfo* mi);
void SendNotification(std::string_view str);
template<typename... Args>
void SendNotification(uint32 strId, Args&&... args)
{
SendNotification(Acore::StringFormatFmt(GetAcoreString(strId), std::forward<Args>(args)...));
}
template<typename... Args>
void SendNotification(char const* fmt, Args&&... args)
{
SendNotification(Acore::StringFormatFmt(fmt, std::forward<Args>(args)...));
}
void SendPacket(WorldPacket const* packet);
void SendNotification(const char* format, ...) ATTR_PRINTF(2, 3);
void SendNotification(uint32 string_id, ...);
void SendPetNameInvalid(uint32 error, std::string const& name, DeclinedName* declinedName);
void SendPartyResult(PartyOperation operation, std::string const& member, PartyResult res, uint32 val = 0);
void SendAreaTriggerMessage(const char* Text, ...) ATTR_PRINTF(2, 3);