|
|
@ -78,53 +78,44 @@ public class ApplyRuneMsg extends ClientNetMsg { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
boolean valid = true; |
|
|
|
boolean valid = false; |
|
|
|
|
|
|
|
|
|
|
|
//Check race is met
|
|
|
|
//Check race is met
|
|
|
|
ConcurrentHashMap<Integer, Boolean> races = rb.getRace(); |
|
|
|
if (rb.getRace() != null && rb.getRace().size() > 0) { |
|
|
|
if (races.size() > 0) { |
|
|
|
|
|
|
|
int raceID = playerCharacter.getRaceID(); |
|
|
|
int raceID = playerCharacter.getRaceID(); |
|
|
|
for (int validID : races.keySet()) { |
|
|
|
if (rb.getRace().containsKey(raceID)) |
|
|
|
if (validID == raceID) { |
|
|
|
valid = rb.getRace().get(raceID); |
|
|
|
valid = rb.getRace().get(raceID); |
|
|
|
} else{ |
|
|
|
break; |
|
|
|
valid = true; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!valid) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!valid) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
//Check base class is met
|
|
|
|
//Check base class is met
|
|
|
|
ConcurrentHashMap<Integer, Boolean> baseClasses = rb.getBaseClass(); |
|
|
|
if (rb.getBaseClass() != null && rb.getBaseClass().size() > 0) { |
|
|
|
if (baseClasses.size() > 0) { |
|
|
|
int baseID = playerCharacter.getBaseClassID(); |
|
|
|
int baseClassID = playerCharacter.getBaseClassID(); |
|
|
|
if (rb.getBaseClass().containsKey(baseID)) |
|
|
|
for (int validID : baseClasses.keySet()) { |
|
|
|
valid = rb.getRace().get(baseID); |
|
|
|
if (validID == baseClassID) { |
|
|
|
} else{ |
|
|
|
valid = baseClasses.get(baseClassID); |
|
|
|
valid = true; |
|
|
|
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(); |
|
|
|
if (rb.getPromotionClass() != null && rb.getPromotionClass().size() > 0) { |
|
|
|
if (promotionClasses.size() > 0) { |
|
|
|
|
|
|
|
int promotionClassID = playerCharacter.getPromotionClassID(); |
|
|
|
int promotionClassID = playerCharacter.getPromotionClassID(); |
|
|
|
for (int validID : promotionClasses.keySet()) { |
|
|
|
if (rb.getPromotionClass().containsKey(promotionClassID)) |
|
|
|
if (validID == promotionClassID) { |
|
|
|
valid = rb.getRace().get(promotionClassID); |
|
|
|
valid = rb.getPromotionClass().get(promotionClassID); |
|
|
|
} else{ |
|
|
|
break; |
|
|
|
valid = true; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!valid) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!valid) |
|
|
|
|
|
|
|
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(); |
|
|
|