cleanup: remove redundant cast
This commit is contained in:
@@ -104,7 +104,7 @@ public enum ItemFactory {
|
||||
equip.setWatk((short) rs.getInt("watk"));
|
||||
equip.setWdef((short) rs.getInt("wdef"));
|
||||
equip.setUpgradeSlots((byte) rs.getInt("upgradeslots"));
|
||||
equip.setLevel((byte) rs.getByte("level"));
|
||||
equip.setLevel(rs.getByte("level"));
|
||||
equip.setItemExp(rs.getInt("itemexp"));
|
||||
equip.setItemLevel(rs.getByte("itemlevel"));
|
||||
equip.setExpiration(rs.getLong("expiration"));
|
||||
|
||||
@@ -232,8 +232,8 @@ public class MapleInventory implements Iterable<Item> {
|
||||
public void move(short sSlot, short dSlot, short slotMax) {
|
||||
lock.lock();
|
||||
try {
|
||||
Item source = (Item) inventory.get(sSlot);
|
||||
Item target = (Item) inventory.get(dSlot);
|
||||
Item source = inventory.get(sSlot);
|
||||
Item target = inventory.get(dSlot);
|
||||
if (source == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ public class MaplePet extends Item {
|
||||
for (LifeMovementFragment move : movement) {
|
||||
if (move instanceof LifeMovement) {
|
||||
if (move instanceof AbsoluteLifeMovement) {
|
||||
this.setPos(((LifeMovement) move).getPosition());
|
||||
this.setPos(move.getPosition());
|
||||
}
|
||||
this.setStance(((LifeMovement) move).getNewstate());
|
||||
}
|
||||
|
||||
@@ -24,26 +24,20 @@ package client.inventory.manipulator;
|
||||
import client.MapleBuffStat;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.inventory.Equip;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventory;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import client.inventory.MaplePet;
|
||||
import client.inventory.ModifyInventory;
|
||||
import client.inventory.*;
|
||||
import client.newyear.NewYearCardRecord;
|
||||
import config.YamlConfig;
|
||||
import constants.inventory.ItemConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.maps.MapleMap;
|
||||
import tools.FilePrinter;
|
||||
import tools.MaplePacketCreator;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.maps.MapleMap;
|
||||
import tools.FilePrinter;
|
||||
|
||||
import tools.MaplePacketCreator;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -91,7 +85,7 @@ public class MapleInventoryManipulator {
|
||||
Iterator<Item> i = existing.iterator();
|
||||
while (quantity > 0) {
|
||||
if (i.hasNext()) {
|
||||
Item eItem = (Item) i.next();
|
||||
Item eItem = i.next();
|
||||
short oldQ = eItem.getQuantity();
|
||||
if (oldQ < slotMax && ((eItem.getOwner().equals(owner) || owner == null) && eItem.getFlag() == flag)) {
|
||||
short newQ = (short) Math.min(oldQ + quantity, slotMax);
|
||||
@@ -202,7 +196,7 @@ public class MapleInventoryManipulator {
|
||||
Iterator<Item> i = existing.iterator();
|
||||
while (quantity > 0) {
|
||||
if (i.hasNext()) {
|
||||
Item eItem = (Item) i.next();
|
||||
Item eItem = i.next();
|
||||
short oldQ = eItem.getQuantity();
|
||||
if (oldQ < slotMax && item.getFlag() == eItem.getFlag() && item.getOwner().equals(eItem.getOwner())) {
|
||||
short newQ = (short) Math.min(oldQ + quantity, slotMax);
|
||||
|
||||
Reference in New Issue
Block a user