From a6cee850a651b2d11d9c1eb47b632f7626f537ee Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 2 Mar 2024 19:16:18 -0600 Subject: [PATCH] allow BH and huntsman on all but priest --- src/engine/net/client/msg/ApplyRuneMsg.java | 75 +++++++++++---------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/src/engine/net/client/msg/ApplyRuneMsg.java b/src/engine/net/client/msg/ApplyRuneMsg.java index 6c6b893f..736f1fc7 100644 --- a/src/engine/net/client/msg/ApplyRuneMsg.java +++ b/src/engine/net/client/msg/ApplyRuneMsg.java @@ -80,52 +80,57 @@ public class ApplyRuneMsg extends ClientNetMsg { //Check race is met ConcurrentHashMap races = rb.getRace(); - if (races.size() > 0) { - int raceID = playerCharacter.getRaceID(); - boolean valid = false; - for (int validID : races.keySet()) { - if (validID == raceID) { - valid = true; - break; + if(runeID != 3007 && runeID != 3014) {//bounty hunter and huntsman + if (races.size() > 0) { + int raceID = playerCharacter.getRaceID(); + boolean valid = false; + for (int validID : races.keySet()) { + if (validID == raceID) { + valid = true; + break; + } + } + if (!valid) { + return false; } } - if (!valid) { - return false; - } - } - //Check base class is met - ConcurrentHashMap baseClasses = rb.getBaseClass(); - if (baseClasses.size() > 0) { - int baseClassID = playerCharacter.getBaseClassID(); - boolean valid = false; - for (int validID : baseClasses.keySet()) { - if (validID == baseClassID) { - valid = true; - break; + //Check base class is met + ConcurrentHashMap baseClasses = rb.getBaseClass(); + if (baseClasses.size() > 0) { + int baseClassID = playerCharacter.getBaseClassID(); + boolean valid = false; + for (int validID : baseClasses.keySet()) { + if (validID == baseClassID) { + valid = true; + break; + } + } + if (!valid) { + return false; } } - if (!valid) { - return false; - } - } - //Check promotion class is met - ConcurrentHashMap promotionClasses = rb.getPromotionClass(); - if (promotionClasses.size() > 0) { - int promotionClassID = playerCharacter.getPromotionClassID(); - boolean valid = false; - for (int validID : promotionClasses.keySet()) { - if (validID == promotionClassID) { - valid = true; - break; + //Check promotion class is met + ConcurrentHashMap promotionClasses = rb.getPromotionClass(); + if (promotionClasses.size() > 0) { + int promotionClassID = playerCharacter.getPromotionClassID(); + boolean valid = false; + for (int validID : promotionClasses.keySet()) { + if (validID == promotionClassID) { + valid = true; + break; + } + } + if (!valid) { + return false; } } - if (!valid) { + } else{ + if(playerCharacter.getPromotionClassID() == 2519){//priest return false; } } - //Check disciplines are met ArrayList runes = playerCharacter.getRunes(); ConcurrentHashMap disciplines = rb.getDiscipline();