mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Core/Handlers): Properly limit equipment set name length to client maximum. (#23151)
This commit is contained in:
@@ -1754,9 +1754,21 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData)
|
||||
std::string name;
|
||||
recvData >> name;
|
||||
|
||||
if (name.length() > 16) // Client limitation
|
||||
{
|
||||
LOG_ERROR("entities.player.cheat", "Character GUID {} tried to create equipment set {} with too long a name!", _player->GetGUID().ToString(), setGuid);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string iconName;
|
||||
recvData >> iconName;
|
||||
|
||||
if (iconName.length() > 100) // DB limitation
|
||||
{
|
||||
LOG_ERROR("entities.player.cheat", "Character GUID {} tried to create equipment set {} with too long an icon name!", _player->GetGUID().ToString(), setGuid);
|
||||
return;
|
||||
}
|
||||
|
||||
EquipmentSet eqSet;
|
||||
|
||||
eqSet.Guid = setGuid;
|
||||
|
||||
Reference in New Issue
Block a user