@ -784,6 +784,9 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -784,6 +784,9 @@ public class PlayerCharacter extends AbstractCharacter {
// Verify Race
intraceID=msg.getRace();
if(raceID==0)
raceID=1999;
Racerace=Race.getRace(raceID);
if(race==null){
@ -823,6 +826,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -823,6 +826,7 @@ public class PlayerCharacter extends AbstractCharacter {
inthairColorID=msg.getHairColor();
intbeardColorID=msg.getBeardColor();
if(raceID!=1999){
if(!race.isValidHairStyle(hairStyleID)){
Logger.info("Invalid HairStyleID: "+hairStyleID+" for race: "+race.getName());
returnnull;
@ -842,7 +846,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -842,7 +846,7 @@ public class PlayerCharacter extends AbstractCharacter {
Logger.info("Invalid beardColorID: "+beardColorID+" for race: "+race.getName());
returnnull;
}
}
// Get stat modifiers
intstrMod=msg.getStrengthMod();
intdexMod=msg.getDexterityMod();
@ -1123,9 +1127,15 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1123,9 +1127,15 @@ public class PlayerCharacter extends AbstractCharacter {
@ -1155,6 +1165,13 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1155,6 +1165,13 @@ public class PlayerCharacter extends AbstractCharacter {