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
+2
View File
@@ -1471,6 +1471,8 @@ class Player : public Unit, public GridObject<Player>
static uint32 GetLevelFromDB(uint64 guid);
static bool LoadPositionFromDB(uint32& mapid, float& x,float& y,float& z,float& o, bool& in_flight, uint64 guid);
static bool IsValidGender(uint8 Gender) { return Gender <= GENDER_FEMALE ; }
/*********************************************************/
/*** SAVE SYSTEM ***/
/*********************************************************/