From b1e7dc1ad2ecc18b53ac9e928f73ddef1e418f8c Mon Sep 17 00:00:00 2001 From: silinoron Date: Mon, 6 Sep 2010 10:42:53 -0700 Subject: Core: Disallow race and faction transfers to races for which character creation is not allowed. --HG-- branch : trunk --- .../game/Server/Protocol/Handlers/CharacterHandler.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index e777071b306..cf3ec422d9e 100644 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -1387,6 +1387,18 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) SendPacket( &data ); return; } + + if (GetSecurity() == SEC_PLAYER) + { + uint32 raceMaskDisabled = sWorld.getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK); + if ((1 << (race - 1)) & raceMaskDisabled) + { + WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1); + data << uint8(CHAR_CREATE_ERROR); + SendPacket( &data ); + return; + } + } // prevent character rename to invalid name if (!normalizePlayerName(newname)) -- cgit v1.2.3