chore(Core/Misc): Remove deprecated code (#19413)

* Config - Deprecated for 3 years
* ChatCommand - Deprecated for 2 years
* getLevel() - Deprecated for 2 years
* SendGlobalText - Deprecated for 8 years +
This commit is contained in:
Kitzunu
2024-07-20 07:41:01 +02:00
committed by GitHub
parent 5c09a3194e
commit 21f86d1c3c
13 changed files with 52 additions and 132 deletions

View File

@@ -567,7 +567,6 @@ public:
virtual void LoadConfigSettings(bool reload = false) = 0;
virtual void SendWorldText(uint32 string_id, ...) = 0;
virtual void SendWorldTextOptional(uint32 string_id, uint32 flag, ...) = 0;
virtual void SendGlobalText(const char* text, WorldSession* self) = 0;
virtual void SendGMText(uint32 string_id, ...) = 0;
virtual void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) = 0;
virtual void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) = 0;

View File

@@ -2649,24 +2649,6 @@ void World::SendGMText(uint32 string_id, ...)
va_end(ap);
}
/// @deprecated only for debug purpose. Send a System Message to all players (except self if mentioned)
void World::SendGlobalText(const char* text, WorldSession* self)
{
WorldPacket data;
// need copy to prevent corruption by strtok call in LineFromMessage original string
char* buf = strdup(text);
char* pos = buf;
while (char* line = ChatHandler::LineFromMessage(pos))
{
ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line);
SendGlobalMessage(&data, self);
}
free(buf);
}
/// Send a packet to all players (or players selected team) in the zone (except self if mentioned)
bool World::SendZoneMessage(uint32 zone, WorldPacket const* packet, WorldSession* self, TeamId teamId)
{

View File

@@ -239,7 +239,6 @@ public:
void LoadConfigSettings(bool reload = false) override;
void SendWorldText(uint32 string_id, ...) override;
void SendGlobalText(const char* text, WorldSession* self) override;
void SendGMText(uint32 string_id, ...) override;
void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) override;
void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) override;