Better getter and setter naming for player sex.

This commit is contained in:
MobiusDevelopment
2019-08-23 08:15:23 +00:00
parent d59f75b7fa
commit 895f3b56c7
196 changed files with 593 additions and 455 deletions

View File

@@ -395,10 +395,10 @@ public class AdminEditChar implements IAdminCommandHandler
case 131: // Doombringer
case 132: // Soul Hound (Male)
{
if (player.getAppearance().getSex())
if (player.getAppearance().isFemale())
{
sexChange = true;
player.getAppearance().setSex(false);
player.getAppearance().setMale();
}
break;
}
@@ -409,10 +409,10 @@ public class AdminEditChar implements IAdminCommandHandler
case 133: // Soul Hound (Female)
case 134: // Trickster
{
if (!player.getAppearance().getSex())
if (!player.getAppearance().isFemale())
{
sexChange = true;
player.getAppearance().setSex(true);
player.getAppearance().setFemale();
}
break;
}
@@ -532,7 +532,14 @@ public class AdminEditChar implements IAdminCommandHandler
{
return false;
}
player.getAppearance().setSex(player.getAppearance().getSex() ? false : true);
if (player.getAppearance().isFemale())
{
player.getAppearance().setMale();
}
else
{
player.getAppearance().setFemale();
}
player.sendMessage("Your gender has been changed by a GM");
player.broadcastUserInfo();
// Transform-untransorm player quickly to force the client to reload the character textures

View File

@@ -202,7 +202,7 @@ public class Wedding implements IVoicedCommandHandler
return false;
}
if ((ptarget.getAppearance().getSex() == activeChar.getAppearance().getSex()) && !Config.WEDDING_SAMESEX)
if ((ptarget.getAppearance().isFemale() == activeChar.getAppearance().isFemale()) && !Config.WEDDING_SAMESEX)
{
activeChar.sendMessage("Gay marriage is not allowed on this server!");
return false;