Not using literal values for Gender

This commit is contained in:
Jeroen De Meerleer 2019-03-19 16:40:18 +01:00
parent a2a0f99b14
commit 1496d77866
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -347,13 +347,13 @@ class Sws extends SwsModel
$length = 1; $length = 1;
switch (self::ReadData('Int', substr($swscontents, $offset, $length))) { switch (self::ReadData('Int', substr($swscontents, $offset, $length))) {
case 1: case 1:
$gender = 'M'; $gender = Gender::Male;
break; break;
case 2: case 2:
$gender = "F"; $gender = Gender::Female;
break; break;
default: default:
$gender = "X"; $gender = Gender::Neutral;
break; break;
} }
$player->setGender(new Gender($gender)); $player->setGender(new Gender($gender));