From 0d45bb5bc13b3219c9c62b21d28400f8f0f82ad6 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 10 Mar 2024 19:12:12 -0500 Subject: [PATCH] Saetor Race Added --- src/engine/objects/Kit.java | 11 ++++++ src/engine/objects/PlayerCharacter.java | 47 +++++++++++++------------ 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/src/engine/objects/Kit.java b/src/engine/objects/Kit.java index b44c4d86..becda1a9 100644 --- a/src/engine/objects/Kit.java +++ b/src/engine/objects/Kit.java @@ -373,6 +373,17 @@ public class Kit extends AbstractGameObject { case 2503: return 69; } + case 1999: + switch (classID) { + case 2500: + return 53; + case 2501: + return 54; + case 2502: + return 37; + case 2503: + return 38; + } } diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 3f6ffccc..8278254b 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -789,33 +789,34 @@ public class PlayerCharacter extends AbstractCharacter { 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)) { - Logger.info("Invalid skinColorID: " + skinColorID + " for race: " + race.getName()); - 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(raceID >= 2000) { + if (!race.isValidHairStyle(hairStyleID)) { + Logger.info("Invalid HairStyleID: " + hairStyleID + " for race: " + race.getName()); + return null; + } - if (!race.isValidHairColor(hairColorID)) { - Logger.info("Invalid hairColorID: " + hairColorID + " for race: " + race.getName()); - return null; - } + if (!race.isValidSkinColor(skinColorID)) { + Logger.info("Invalid skinColorID: " + skinColorID + " for race: " + race.getName()); + return null; + } - if (!race.isValidBeardColor(beardColorID)) { - Logger.info("Invalid beardColorID: " + beardColorID + " for race: " + race.getName()); - return null; - } + if (!race.isValidHairColor(hairColorID)) { + Logger.info("Invalid hairColorID: " + hairColorID + " for race: " + race.getName()); + return null; + } + if (!race.isValidBeardColor(beardColorID)) { + Logger.info("Invalid beardColorID: " + beardColorID + " for race: " + race.getName()); + return null; + } + } // Get stat modifiers int strMod = msg.getStrengthMod(); int dexMod = msg.getDexterityMod();