|
|
@ -789,33 +789,34 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Verify HairStyle/BeardStyle/SkinColor/HairColor/BeardColor
|
|
|
|
|
|
|
|
int hairStyleID = msg.getHairStyle(); |
|
|
|
|
|
|
|
int beardStyleID = msg.getBeardStyle(); |
|
|
|
|
|
|
|
int skinColorID = msg.getSkinColor(); |
|
|
|
|
|
|
|
int hairColorID = msg.getHairColor(); |
|
|
|
|
|
|
|
int beardColorID = msg.getBeardColor(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!race.isValidHairStyle(hairStyleID)) { |
|
|
|
|
|
|
|
Logger.info("Invalid HairStyleID: " + hairStyleID + " for race: " + race.getName()); |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!race.isValidSkinColor(skinColorID)) { |
|
|
|
// Verify HairStyle/BeardStyle/SkinColor/HairColor/BeardColor
|
|
|
|
Logger.info("Invalid skinColorID: " + skinColorID + " for race: " + race.getName()); |
|
|
|
int hairStyleID = msg.getHairStyle(); |
|
|
|
return null; |
|
|
|
int beardStyleID = msg.getBeardStyle(); |
|
|
|
} |
|
|
|
int skinColorID = msg.getSkinColor(); |
|
|
|
|
|
|
|
int hairColorID = msg.getHairColor(); |
|
|
|
|
|
|
|
int beardColorID = msg.getBeardColor(); |
|
|
|
|
|
|
|
if(raceID >= 2000) { |
|
|
|
|
|
|
|
if (!race.isValidHairStyle(hairStyleID)) { |
|
|
|
|
|
|
|
Logger.info("Invalid HairStyleID: " + hairStyleID + " for race: " + race.getName()); |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!race.isValidHairColor(hairColorID)) { |
|
|
|
if (!race.isValidSkinColor(skinColorID)) { |
|
|
|
Logger.info("Invalid hairColorID: " + hairColorID + " for race: " + race.getName()); |
|
|
|
Logger.info("Invalid skinColorID: " + skinColorID + " for race: " + race.getName()); |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!race.isValidBeardColor(beardColorID)) { |
|
|
|
if (!race.isValidHairColor(hairColorID)) { |
|
|
|
Logger.info("Invalid beardColorID: " + beardColorID + " for race: " + race.getName()); |
|
|
|
Logger.info("Invalid hairColorID: " + hairColorID + " for race: " + race.getName()); |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!race.isValidBeardColor(beardColorID)) { |
|
|
|
|
|
|
|
Logger.info("Invalid beardColorID: " + beardColorID + " for race: " + race.getName()); |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// Get stat modifiers
|
|
|
|
// Get stat modifiers
|
|
|
|
int strMod = msg.getStrengthMod(); |
|
|
|
int strMod = msg.getStrengthMod(); |
|
|
|
int dexMod = msg.getDexterityMod(); |
|
|
|
int dexMod = msg.getDexterityMod(); |
|
|
|