cleanup: use Integer#parseInt where applicable
This commit is contained in:
@@ -281,7 +281,7 @@ public class MapleLifeFactory {
|
||||
|
||||
private static void decodeElementalString(MapleMonsterStats stats, String elemAttr) {
|
||||
for (int i = 0; i < elemAttr.length(); i += 2) {
|
||||
stats.setEffectiveness(Element.getFromChar(elemAttr.charAt(i)), ElementalEffectiveness.getByNumber(Integer.valueOf(String.valueOf(elemAttr.charAt(i + 1)))));
|
||||
stats.setEffectiveness(Element.getFromChar(elemAttr.charAt(i)), ElementalEffectiveness.getByNumber(Integer.parseInt(String.valueOf(elemAttr.charAt(i + 1)))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class BuffExceptRequirement extends MapleQuestRequirement {
|
||||
@Override
|
||||
public void processData(MapleData data) {
|
||||
// item buffs are negative
|
||||
buffId = -1 * Integer.valueOf(MapleDataTool.getString(data));
|
||||
buffId = -1 * Integer.parseInt(MapleDataTool.getString(data));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,7 +40,7 @@ public class BuffRequirement extends MapleQuestRequirement {
|
||||
@Override
|
||||
public void processData(MapleData data) {
|
||||
// item buffs are negative
|
||||
buffId = -1 * Integer.valueOf(MapleDataTool.getString(data));
|
||||
buffId = -1 * Integer.parseInt(MapleDataTool.getString(data));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user