cleanup: remove unnecessary unboxing
This commit is contained in:
@@ -403,7 +403,7 @@ public final class Channel {
|
||||
int[] retArr = new int[ret.size()];
|
||||
int pos = 0;
|
||||
for (Integer i : ret) {
|
||||
retArr[pos++] = i.intValue();
|
||||
retArr[pos++] = i;
|
||||
}
|
||||
return retArr;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public abstract class AbstractDealDamageHandler extends AbstractMaplePacketHandl
|
||||
if (attack.skill == ChiefBandit.MESO_EXPLOSION) {
|
||||
int delay = 0;
|
||||
for (Integer oned : attack.allDamage.keySet()) {
|
||||
MapleMapObject mapobject = map.getMapObject(oned.intValue());
|
||||
MapleMapObject mapobject = map.getMapObject(oned);
|
||||
if (mapobject != null && mapobject.getType() == MapleMapObjectType.ITEM) {
|
||||
final MapleMapItem mapitem = (MapleMapItem) mapobject;
|
||||
if (mapitem.getMeso() == 0) { //Maybe it is possible some how?
|
||||
@@ -183,7 +183,7 @@ public abstract class AbstractDealDamageHandler extends AbstractMaplePacketHandl
|
||||
}
|
||||
}
|
||||
for (Integer oned : attack.allDamage.keySet()) {
|
||||
final MapleMonster monster = map.getMonsterByOid(oned.intValue());
|
||||
final MapleMonster monster = map.getMonsterByOid(oned);
|
||||
if (monster != null) {
|
||||
double distance = player.getPosition().distanceSq(monster.getPosition());
|
||||
double distanceToDetect = 200000.0;
|
||||
@@ -253,7 +253,7 @@ public abstract class AbstractDealDamageHandler extends AbstractMaplePacketHandl
|
||||
int picklv = (player.isGM()) ? pickpocket.getMaxLevel() : player.getSkillLevel(pickpocket);
|
||||
if(picklv > 0) {
|
||||
int delay = 0;
|
||||
final int maxmeso = player.getBuffedValue(MapleBuffStat.PICKPOCKET).intValue();
|
||||
final int maxmeso = player.getBuffedValue(MapleBuffStat.PICKPOCKET);
|
||||
for (Integer eachd : onedList) {
|
||||
eachd += Integer.MAX_VALUE;
|
||||
|
||||
|
||||
@@ -21,30 +21,19 @@
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import client.*;
|
||||
import config.YamlConfig;
|
||||
import client.MapleBuffStat;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import constants.game.GameConstants;
|
||||
import constants.skills.Crusader;
|
||||
import constants.skills.DawnWarrior;
|
||||
import constants.skills.DragonKnight;
|
||||
import constants.skills.Hero;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Rogue;
|
||||
import constants.skills.WindArcher;
|
||||
import constants.skills.*;
|
||||
import server.MapleStatEffect;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.Pair;
|
||||
import tools.data.input.SeekableLittleEndianAccessor;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public final class CloseRangeDamageHandler extends AbstractDealDamageHandler {
|
||||
|
||||
@Override
|
||||
@@ -78,7 +67,7 @@ public final class CloseRangeDamageHandler extends AbstractDealDamageHandler {
|
||||
Integer comboBuff = chr.getBuffedValue(MapleBuffStat.COMBO);
|
||||
if (GameConstants.isFinisherSkill(attack.skill)) {
|
||||
if (comboBuff != null) {
|
||||
numFinisherOrbs = comboBuff.intValue() - 1;
|
||||
numFinisherOrbs = comboBuff - 1;
|
||||
}
|
||||
chr.handleOrbconsume();
|
||||
} else if (attack.numAttacked > 0) {
|
||||
@@ -129,7 +118,7 @@ public final class CloseRangeDamageHandler extends AbstractDealDamageHandler {
|
||||
int totDamageToOneMonster = 0; // sacrifice attacks only 1 mob with 1 attack
|
||||
final Iterator<List<Integer>> dmgIt = attack.allDamage.values().iterator();
|
||||
if (dmgIt.hasNext()) {
|
||||
totDamageToOneMonster = dmgIt.next().get(0).intValue();
|
||||
totDamageToOneMonster = dmgIt.next().get(0);
|
||||
}
|
||||
|
||||
chr.safeAddHP(-1 * totDamageToOneMonster * attack.getAttackEffect(chr, null).getX() / 100);
|
||||
|
||||
Reference in New Issue
Block a user