diff options
author | silinoron <none@none> | 2010-09-06 10:42:53 -0700 |
---|---|---|
committer | silinoron <none@none> | 2010-09-06 10:42:53 -0700 |
commit | b1e7dc1ad2ecc18b53ac9e928f73ddef1e418f8c (patch) | |
tree | 277fbd85984411b74c29f39bead4170aa7abb41e | |
parent | 7afc640ef42d648f06d22259d786dfe9ed51a31e (diff) |
Core: Disallow race and faction transfers to races for which character creation is not allowed.
--HG--
branch : trunk
-rw-r--r-- | src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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)) |