mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
refactor(Core/Chat): Move SendNotification to ChatHander (#19491)
* refactor(Core/Chat): Move SendNotification to ChatHander * Update Battleground.cpp * fix build * Update src/server/game/Chat/Chat.h
This commit is contained in:
@@ -787,16 +787,6 @@ bool WorldSession::DisallowHyperlinksAndMaybeKick(std::string_view str)
|
||||
return false;
|
||||
}
|
||||
|
||||
void WorldSession::SendNotification(std::string_view str)
|
||||
{
|
||||
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
||||
for (std::string_view line : Acore::Tokenize(str, '\n', true))
|
||||
{
|
||||
data << line.data();
|
||||
SendPacket(&data);
|
||||
}
|
||||
}
|
||||
|
||||
char const* WorldSession::GetAcoreString(uint32 entry) const
|
||||
{
|
||||
return sObjectMgr->GetAcoreString(entry, GetSessionDbLocaleIndex());
|
||||
|
||||
@@ -345,18 +345,6 @@ 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 SendPetNameInvalid(uint32 error, std::string const& name, DeclinedName* declinedName);
|
||||
void SendPartyResult(PartyOperation operation, std::string const& member, PartyResult res, uint32 val = 0);
|
||||
|
||||
Reference in New Issue
Block a user