Fix gender exploit.

Now check that character has a valid gender (and not an invalid via packet modifications).
This check works when trying to create a character or when building the character list.
If gender is invalid (neither male nor female): can't create the character and can't see in the characters' list (and also can't login with it via packet modding).

Signed-off-by: Anubisss <[email protected]>
This commit is contained in:
Anubisss
2011-04-01 05:05:13 +02:00
parent 5fe6c225e2
commit 1b0843194f
3 changed files with 27 additions and 3 deletions
@@ -552,7 +552,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
Player * pNewChar = new Player(this);
if (!pNewChar->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PLAYER), name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId))
{
// Player not create (race/class problem?)
// Player not create (race/class/etc problem?)
pNewChar->CleanupsBeforeDelete();
delete pNewChar;