|
|
|
@ -80,52 +80,57 @@ public class ApplyRuneMsg extends ClientNetMsg {
@@ -80,52 +80,57 @@ public class ApplyRuneMsg extends ClientNetMsg {
|
|
|
|
|
|
|
|
|
|
//Check race is met
|
|
|
|
|
ConcurrentHashMap<Integer, Boolean> 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<Integer, Boolean> 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<Integer, Boolean> 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<Integer, Boolean> 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<Integer, Boolean> 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<CharacterRune> runes = playerCharacter.getRunes(); |
|
|
|
|
ConcurrentHashMap<Integer, Boolean> disciplines = rb.getDiscipline(); |
|
|
|
|