Removed non necessary constructors.

This commit is contained in:
MobiusDev
2019-02-20 17:45:59 +00:00
parent 0de6a33d43
commit dcb4e9db7b
15 changed files with 49 additions and 49 deletions

View File

@@ -274,11 +274,11 @@ public class TradeController
} }
if (LimitedItem) if (LimitedItem)
{ {
_listsTaskItem.put(new Integer(buy1.getListId()), buy1); _listsTaskItem.put(buy1.getListId(), buy1);
} }
else else
{ {
_lists.put(new Integer(buy1.getListId()), buy1); _lists.put(buy1.getListId(), buy1);
} }
_nextListId = Math.max(_nextListId, buy1.getListId() + 1); _nextListId = Math.max(_nextListId, buy1.getListId() + 1);
@@ -445,11 +445,11 @@ public class TradeController
} }
if (LimitedItem) if (LimitedItem)
{ {
_listsTaskItem.put(new Integer(buy1.getListId()), buy1); _listsTaskItem.put(buy1.getListId(), buy1);
} }
else else
{ {
_lists.put(new Integer(buy1.getListId()), buy1); _lists.put(buy1.getListId(), buy1);
} }
_nextListId = Math.max(_nextListId, buy1.getListId() + 1); _nextListId = Math.max(_nextListId, buy1.getListId() + 1);
} }
@@ -508,12 +508,12 @@ public class TradeController
public L2TradeList getBuyList(int listId) public L2TradeList getBuyList(int listId)
{ {
if (_lists.get(new Integer(listId)) != null) if (_lists.get(listId) != null)
{ {
return _lists.get(new Integer(listId)); return _lists.get(listId);
} }
return _listsTaskItem.get(new Integer(listId)); return _listsTaskItem.get(listId);
} }
public List<L2TradeList> getBuyListByNpcId(int npcId) public List<L2TradeList> getBuyListByNpcId(int npcId)

View File

@@ -189,7 +189,7 @@ public class RecipeTable extends RecipeController
{ {
recipeList.addRecipe(recipePart); recipeList.addRecipe(recipePart);
} }
_lists.put(new Integer(_lists.size()), recipeList); _lists.put(_lists.size(), recipeList);
} }
catch (Exception e) catch (Exception e)
{ {
@@ -211,7 +211,7 @@ public class RecipeTable extends RecipeController
{ {
for (int i = 0; i < _lists.size(); i++) for (int i = 0; i < _lists.size(); i++)
{ {
final L2RecipeList find = _lists.get(new Integer(i)); final L2RecipeList find = _lists.get(i);
if (find.getRecipeId() == itemId) if (find.getRecipeId() == itemId)
{ {
return find; return find;
@@ -224,7 +224,7 @@ public class RecipeTable extends RecipeController
{ {
for (int i = 0; i < _lists.size(); i++) for (int i = 0; i < _lists.size(); i++)
{ {
final L2RecipeList find = _lists.get(new Integer(i)); final L2RecipeList find = _lists.get(i);
if (find.getId() == recId) if (find.getId() == recId)
{ {
return find; return find;

View File

@@ -227,7 +227,7 @@ public class ClanTable
LOGGER.info("New clan created: {" + clan.getClanId() + "} {" + clan.getName() + "}"); LOGGER.info("New clan created: {" + clan.getClanId() + "} {" + clan.getName() + "}");
_clans.put(new Integer(clan.getClanId()), clan); _clans.put(clan.getClanId(), clan);
// should be update packet only // should be update packet only
player.sendPacket(new PledgeShowInfoUpdate(clan)); player.sendPacket(new PledgeShowInfoUpdate(clan));

View File

@@ -87,7 +87,7 @@ public class LevelUpData
lvlDat.setClassMpAdd(rset.getFloat(MP_ADD)); lvlDat.setClassMpAdd(rset.getFloat(MP_ADD));
lvlDat.setClassMpModifier(rset.getFloat(MP_MOD)); lvlDat.setClassMpModifier(rset.getFloat(MP_MOD));
lvlTable.put(new Integer(lvlDat.getClassid()), lvlDat); lvlTable.put(lvlDat.getClassid(), lvlDat);
} }
statement.close(); statement.close();

View File

@@ -161,7 +161,7 @@ public class ItemHandler
// Add handler for each ID found // Add handler for each ID found
for (int id : ids) for (int id : ids)
{ {
_datatable.put(new Integer(id), handler); _datatable.put(id, handler);
} }
} }
@@ -172,6 +172,6 @@ public class ItemHandler
*/ */
public IItemHandler getItemHandler(int itemId) public IItemHandler getItemHandler(int itemId)
{ {
return _datatable.get(new Integer(itemId)); return _datatable.get(itemId);
} }
} }

View File

@@ -80,17 +80,15 @@ public class UserCommandHandler
public void registerUserCommandHandler(IUserCommandHandler handler) public void registerUserCommandHandler(IUserCommandHandler handler)
{ {
int[] ids = handler.getUserCommandList(); for (int id : handler.getUserCommandList())
for (int id : ids)
{ {
_datatable.put(new Integer(id), handler); _datatable.put(id, handler);
} }
} }
public IUserCommandHandler getUserCommandHandler(int userCommand) public IUserCommandHandler getUserCommandHandler(int userCommand)
{ {
return _datatable.get(new Integer(userCommand)); return _datatable.get(userCommand);
} }
public int size() public int size()

View File

@@ -316,7 +316,7 @@ public final class L2World
*/ */
public L2PetInstance getPet(int ownerId) public L2PetInstance getPet(int ownerId)
{ {
return _petsInstance.get(new Integer(ownerId)); return _petsInstance.get(ownerId);
} }
/** /**
@@ -328,7 +328,7 @@ public final class L2World
*/ */
public L2PetInstance addPet(int ownerId, L2PetInstance pet) public L2PetInstance addPet(int ownerId, L2PetInstance pet)
{ {
return _petsInstance.put(new Integer(ownerId), pet); return _petsInstance.put(ownerId, pet);
} }
/** /**
@@ -338,7 +338,7 @@ public final class L2World
*/ */
public void removePet(int ownerId) public void removePet(int ownerId)
{ {
_petsInstance.remove(new Integer(ownerId)); _petsInstance.remove(ownerId);
} }
/** /**

View File

@@ -512,7 +512,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
{ {
final int objectId = c.getObjectId(); final int objectId = c.getObjectId();
_charSlotMapping.add(new Integer(objectId)); _charSlotMapping.add(objectId);
} }
} }

View File

@@ -43,35 +43,35 @@ public class ConfirmDlg extends L2GameServerPacket
public ConfirmDlg addString(String text) public ConfirmDlg addString(String text)
{ {
_types.add(new Integer(TYPE_TEXT)); _types.add(TYPE_TEXT);
_values.add(text); _values.add(text);
return this; return this;
} }
public ConfirmDlg addNumber(int number) public ConfirmDlg addNumber(int number)
{ {
_types.add(new Integer(TYPE_NUMBER)); _types.add(TYPE_NUMBER);
_values.add(new Integer(number)); _values.add(number);
return this; return this;
} }
public ConfirmDlg addNpcName(int id) public ConfirmDlg addNpcName(int id)
{ {
_types.add(new Integer(TYPE_NPC_NAME)); _types.add(TYPE_NPC_NAME);
_values.add(new Integer(1000000 + id)); _values.add(1000000 + id);
return this; return this;
} }
public ConfirmDlg addItemName(int id) public ConfirmDlg addItemName(int id)
{ {
_types.add(new Integer(TYPE_ITEM_NAME)); _types.add(TYPE_ITEM_NAME);
_values.add(new Integer(id)); _values.add(id);
return this; return this;
} }
public ConfirmDlg addZoneName(int x, int y, int z) public ConfirmDlg addZoneName(int x, int y, int z)
{ {
_types.add(new Integer(TYPE_ZONE_NAME)); _types.add(TYPE_ZONE_NAME);
final int[] coord = final int[] coord =
{ {
x, x,
@@ -89,8 +89,8 @@ public class ConfirmDlg extends L2GameServerPacket
public ConfirmDlg addSkillName(int id, int lvl) public ConfirmDlg addSkillName(int id, int lvl)
{ {
_types.add(new Integer(TYPE_SKILL_NAME)); _types.add(TYPE_SKILL_NAME);
_values.add(new Integer(id)); _values.add(id);
_skillLvL = lvl; _skillLvL = lvl;
return this; return this;
} }

View File

@@ -56,7 +56,7 @@ public final class SystemMessage extends L2GameServerPacket
public SystemMessage addString(String text) public SystemMessage addString(String text)
{ {
_types.add(new Integer(TYPE_TEXT)); _types.add(TYPE_TEXT);
_values.add(text); _values.add(text);
return this; return this;
@@ -64,30 +64,30 @@ public final class SystemMessage extends L2GameServerPacket
public SystemMessage addNumber(int number) public SystemMessage addNumber(int number)
{ {
_types.add(new Integer(TYPE_NUMBER)); _types.add(TYPE_NUMBER);
_values.add(new Integer(number)); _values.add(number);
return this; return this;
} }
public SystemMessage addNpcName(int id) public SystemMessage addNpcName(int id)
{ {
_types.add(new Integer(TYPE_NPC_NAME)); _types.add(TYPE_NPC_NAME);
_values.add(new Integer(1000000 + id)); _values.add(1000000 + id);
return this; return this;
} }
public SystemMessage addItemName(int id) public SystemMessage addItemName(int id)
{ {
_types.add(new Integer(TYPE_ITEM_NAME)); _types.add(TYPE_ITEM_NAME);
_values.add(new Integer(id)); _values.add(id);
return this; return this;
} }
public SystemMessage addZoneName(int x, int y, int z) public SystemMessage addZoneName(int x, int y, int z)
{ {
_types.add(new Integer(TYPE_ZONE_NAME)); _types.add(TYPE_ZONE_NAME);
final int[] coord = final int[] coord =
{ {
x, x,
@@ -106,8 +106,8 @@ public final class SystemMessage extends L2GameServerPacket
public SystemMessage addSkillName(int id, int lvl) public SystemMessage addSkillName(int id, int lvl)
{ {
_types.add(new Integer(TYPE_SKILL_NAME)); _types.add(TYPE_SKILL_NAME);
_values.add(new Integer(id)); _values.add(id);
_skillLvL = lvl; _skillLvL = lvl;
return this; return this;

View File

@@ -224,7 +224,7 @@ public final class L2NpcTemplate extends L2CharTemplate
public void addVulnerability(Stats id, double vuln) public void addVulnerability(Stats id, double vuln)
{ {
_vulnerabilities.put(id, new Double(vuln)); _vulnerabilities.put(id, vuln);
} }
public double getVulnerability(Stats id) public double getVulnerability(Stats id)

View File

@@ -279,8 +279,8 @@ public class Gui
JScrollPane scrollPanel = new JScrollPane(txtrConsole); JScrollPane scrollPanel = new JScrollPane(txtrConsole);
scrollPanel.setBounds(0, 0, 800, 550); scrollPanel.setBounds(0, 0, 800, 550);
JLayeredPane layeredPanel = new JLayeredPane(); JLayeredPane layeredPanel = new JLayeredPane();
layeredPanel.add(scrollPanel, new Integer(0), 0); layeredPanel.add(scrollPanel, 0, 0);
layeredPanel.add(systemPanel, new Integer(1), 0); layeredPanel.add(systemPanel, 1, 0);
// Set frame. // Set frame.
JFrame frame = new JFrame("Mobius - GameServer"); JFrame frame = new JFrame("Mobius - GameServer");

View File

@@ -71,7 +71,7 @@ public class MultiSort
for (int i = 0; i < valueList.length; i++) for (int i = 0; i < valueList.length; i++)
{ {
tempIntList[i] = new Integer(valueList[i]); tempIntList[i] = valueList[i];
} }
return Arrays.asList(tempIntList); return Arrays.asList(tempIntList);

View File

@@ -33,6 +33,7 @@ import javax.swing.JPasswordField;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.SpringLayout; import javax.swing.SpringLayout;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import javax.swing.WindowConstants;
import com.l2jmobius.commons.util.SplashScreen; import com.l2jmobius.commons.util.SplashScreen;
import com.l2jmobius.tools.dbinstaller.RunTasks; import com.l2jmobius.tools.dbinstaller.RunTasks;
@@ -82,7 +83,7 @@ public class DBConfigGUI extends JFrame
final int height = 220; final int height = 220;
final Dimension resolution = Toolkit.getDefaultToolkit().getScreenSize(); final Dimension resolution = Toolkit.getDefaultToolkit().getScreenSize();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setBounds((resolution.width - width) / 2, (resolution.height - height) / 2, width, height); setBounds((resolution.width - width) / 2, (resolution.height - height) / 2, width, height);
setResizable(false); setResizable(false);

View File

@@ -30,6 +30,7 @@ import javax.swing.JOptionPane;
import javax.swing.JProgressBar; import javax.swing.JProgressBar;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.WindowConstants;
import com.l2jmobius.tools.dbinstaller.DBOutputInterface; import com.l2jmobius.tools.dbinstaller.DBOutputInterface;
@@ -62,7 +63,7 @@ public class DBInstallerGUI extends JFrame implements DBOutputInterface
final int height = 360; final int height = 360;
final Dimension resolution = Toolkit.getDefaultToolkit().getScreenSize(); final Dimension resolution = Toolkit.getDefaultToolkit().getScreenSize();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setBounds((resolution.width - width) / 2, (resolution.height - height) / 2, width, height); setBounds((resolution.width - width) / 2, (resolution.height - height) / 2, width, height);
setResizable(false); setResizable(false);