cleanup: use primitive type instead of wrapper type

This commit is contained in:
P0nk
2021-04-08 17:45:50 +02:00
parent 202f2d8bc5
commit a5b42b8a43
10 changed files with 20 additions and 23 deletions

View File

@@ -258,7 +258,7 @@ public abstract class AbstractDealDamageHandler extends AbstractMaplePacketHandl
eachd += Integer.MAX_VALUE;
if (pickpocket.getEffect(picklv).makeChanceResult()) {
final Integer eachdf;
final int eachdf;
if(eachd < 0)
eachdf = eachd + Integer.MAX_VALUE;
else
@@ -280,7 +280,7 @@ public abstract class AbstractDealDamageHandler extends AbstractMaplePacketHandl
MapleMonsterInformationProvider mi = MapleMonsterInformationProvider.getInstance();
List<Integer> dropPool = mi.retrieveDropPool(monster.getId());
if(!dropPool.isEmpty()) {
Integer rndPool = (int) Math.floor(Math.random() * dropPool.get(dropPool.size() - 1));
int rndPool = (int) Math.floor(Math.random() * dropPool.get(dropPool.size() - 1));
int i = 0;
while(rndPool >= dropPool.get(i)) i++;