Browse Source

allow BH and huntsman on all but priest

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
a6cee850a6
  1. 75
      src/engine/net/client/msg/ApplyRuneMsg.java

75
src/engine/net/client/msg/ApplyRuneMsg.java

@ -80,52 +80,57 @@ public class ApplyRuneMsg extends ClientNetMsg {
//Check race is met //Check race is met
ConcurrentHashMap<Integer, Boolean> races = rb.getRace(); ConcurrentHashMap<Integer, Boolean> races = rb.getRace();
if (races.size() > 0) { if(runeID != 3007 && runeID != 3014) {//bounty hunter and huntsman
int raceID = playerCharacter.getRaceID(); if (races.size() > 0) {
boolean valid = false; int raceID = playerCharacter.getRaceID();
for (int validID : races.keySet()) { boolean valid = false;
if (validID == raceID) { for (int validID : races.keySet()) {
valid = true; if (validID == raceID) {
break; valid = true;
break;
}
}
if (!valid) {
return false;
} }
} }
if (!valid) {
return false;
}
}
//Check base class is met //Check base class is met
ConcurrentHashMap<Integer, Boolean> baseClasses = rb.getBaseClass(); ConcurrentHashMap<Integer, Boolean> baseClasses = rb.getBaseClass();
if (baseClasses.size() > 0) { if (baseClasses.size() > 0) {
int baseClassID = playerCharacter.getBaseClassID(); int baseClassID = playerCharacter.getBaseClassID();
boolean valid = false; boolean valid = false;
for (int validID : baseClasses.keySet()) { for (int validID : baseClasses.keySet()) {
if (validID == baseClassID) { if (validID == baseClassID) {
valid = true; valid = true;
break; break;
}
}
if (!valid) {
return false;
} }
} }
if (!valid) {
return false;
}
}
//Check promotion class is met //Check promotion class is met
ConcurrentHashMap<Integer, Boolean> promotionClasses = rb.getPromotionClass(); ConcurrentHashMap<Integer, Boolean> promotionClasses = rb.getPromotionClass();
if (promotionClasses.size() > 0) { if (promotionClasses.size() > 0) {
int promotionClassID = playerCharacter.getPromotionClassID(); int promotionClassID = playerCharacter.getPromotionClassID();
boolean valid = false; boolean valid = false;
for (int validID : promotionClasses.keySet()) { for (int validID : promotionClasses.keySet()) {
if (validID == promotionClassID) { if (validID == promotionClassID) {
valid = true; valid = true;
break; break;
}
}
if (!valid) {
return false;
} }
} }
if (!valid) { } else{
if(playerCharacter.getPromotionClassID() == 2519){//priest
return false; return false;
} }
} }
//Check disciplines are met //Check disciplines are met
ArrayList<CharacterRune> runes = playerCharacter.getRunes(); ArrayList<CharacterRune> runes = playerCharacter.getRunes();
ConcurrentHashMap<Integer, Boolean> disciplines = rb.getDiscipline(); ConcurrentHashMap<Integer, Boolean> disciplines = rb.getDiscipline();

Loading…
Cancel
Save