Rename and clean up MapleItemInformationProvider
This commit is contained in:
@@ -25,7 +25,7 @@ package client.command.commands.gm0;
|
||||
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
import server.gachapon.MapleGachapon;
|
||||
|
||||
public class GachaCommand extends Command {
|
||||
@@ -56,7 +56,7 @@ public class GachaCommand extends Command {
|
||||
String talkStr = "The #b" + gachaName + "#k Gachapon contains the following items.\r\n\r\n";
|
||||
for (int i = 0; i < 2; i++){
|
||||
for (int id : gacha.getItems(i)){
|
||||
talkStr += "-" + MapleItemInformationProvider.getInstance().getName(id) + "\r\n";
|
||||
talkStr += "-" + ItemInformationProvider.getInstance().getName(id) + "\r\n";
|
||||
}
|
||||
}
|
||||
talkStr += "\r\nPlease keep in mind that there are items that are in all gachapons and are not listed here.";
|
||||
|
||||
@@ -26,7 +26,7 @@ package client.command.commands.gm1;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
import server.life.MonsterDropEntry;
|
||||
import server.life.MonsterInformationProvider;
|
||||
import tools.Pair;
|
||||
@@ -57,7 +57,7 @@ public class WhatDropsFromCommand extends Command {
|
||||
output += mobName + " drops the following items:\r\n\r\n";
|
||||
for (MonsterDropEntry drop : MonsterInformationProvider.getInstance().retrieveDrop(mobId)){
|
||||
try {
|
||||
String name = MapleItemInformationProvider.getInstance().getName(drop.itemId);
|
||||
String name = ItemInformationProvider.getInstance().getName(drop.itemId);
|
||||
if (name == null || name.equals("null") || drop.chance == 0){
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ package client.command.commands.gm1;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
import server.life.MonsterInformationProvider;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.Pair;
|
||||
@@ -53,7 +53,7 @@ public class WhoDropsCommand extends Command {
|
||||
try {
|
||||
String searchString = player.getLastCommandMessage();
|
||||
String output = "";
|
||||
Iterator<Pair<Integer, String>> listIterator = MapleItemInformationProvider.getInstance().getItemDataByName(searchString).iterator();
|
||||
Iterator<Pair<Integer, String>> listIterator = ItemInformationProvider.getInstance().getItemDataByName(searchString).iterator();
|
||||
if (listIterator.hasNext()) {
|
||||
int count = 1;
|
||||
while (listIterator.hasNext() && count <= 3) {
|
||||
|
||||
@@ -30,7 +30,7 @@ import client.inventory.Pet;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.inventory.ItemConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
public class ItemCommand extends Command {
|
||||
{
|
||||
@@ -47,7 +47,7 @@ public class ItemCommand extends Command {
|
||||
}
|
||||
|
||||
int itemId = Integer.parseInt(params[0]);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
||||
|
||||
if(ii.getName(itemId) == null) {
|
||||
player.yellowMessage("Item id '" + params[0] + "' does not exist.");
|
||||
|
||||
@@ -31,7 +31,7 @@ import client.inventory.Item;
|
||||
import client.inventory.Pet;
|
||||
import config.YamlConfig;
|
||||
import constants.inventory.ItemConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
public class ItemDropCommand extends Command {
|
||||
{
|
||||
@@ -48,7 +48,7 @@ public class ItemDropCommand extends Command {
|
||||
}
|
||||
|
||||
int itemId = Integer.parseInt(params[0]);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
||||
|
||||
if(ii.getName(itemId) == null) {
|
||||
player.yellowMessage("Item id '" + params[0] + "' does not exist.");
|
||||
|
||||
@@ -29,7 +29,7 @@ import client.command.Command;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import constants.inventory.ItemConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
public class RechargeCommand extends Command {
|
||||
{
|
||||
@@ -39,7 +39,7 @@ public class RechargeCommand extends Command {
|
||||
@Override
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
||||
for (Item torecharge : c.getPlayer().getInventory(InventoryType.USE).list()) {
|
||||
if (ItemConstants.isThrowingStar(torecharge.getItemId())){
|
||||
torecharge.setQuantity(ii.getSlotMax(c, torecharge.getItemId()));
|
||||
|
||||
@@ -31,7 +31,7 @@ import provider.DataProvider;
|
||||
import provider.DataProviderFactory;
|
||||
import provider.DataTool;
|
||||
import provider.wz.WZFiles;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
import server.quest.Quest;
|
||||
import tools.Pair;
|
||||
|
||||
@@ -117,7 +117,7 @@ public class SearchCommand extends Command {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (Pair<Integer, String> itemPair : MapleItemInformationProvider.getInstance().getAllItems()) {
|
||||
for (Pair<Integer, String> itemPair : ItemInformationProvider.getInstance().getAllItems()) {
|
||||
if (sb.length() < 32654) {//ohlol
|
||||
if (itemPair.getRight().toLowerCase().contains(search.toLowerCase())) {
|
||||
sb.append("#b").append(itemPair.getLeft()).append("#k - #r").append(itemPair.getRight()).append("\r\n");
|
||||
|
||||
@@ -28,7 +28,7 @@ import client.Client;
|
||||
import client.Stat;
|
||||
import client.command.Command;
|
||||
import constants.inventory.ItemConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
public class FaceCommand extends Command {
|
||||
{
|
||||
@@ -46,7 +46,7 @@ public class FaceCommand extends Command {
|
||||
try {
|
||||
if (params.length == 1) {
|
||||
int itemId = Integer.parseInt(params[0]);
|
||||
if (!ItemConstants.isFace(itemId) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
if (!ItemConstants.isFace(itemId) || ItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
player.yellowMessage("Face id '" + params[0] + "' does not exist.");
|
||||
return;
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class FaceCommand extends Command {
|
||||
player.equipChanged();
|
||||
} else {
|
||||
int itemId = Integer.parseInt(params[1]);
|
||||
if (!ItemConstants.isFace(itemId) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
if (!ItemConstants.isFace(itemId) || ItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
player.yellowMessage("Face id '" + params[1] + "' does not exist.");
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import client.Client;
|
||||
import client.Stat;
|
||||
import client.command.Command;
|
||||
import constants.inventory.ItemConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
public class HairCommand extends Command {
|
||||
{
|
||||
@@ -46,7 +46,7 @@ public class HairCommand extends Command {
|
||||
try {
|
||||
if (params.length == 1) {
|
||||
int itemId = Integer.parseInt(params[0]);
|
||||
if (!ItemConstants.isHair(itemId) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
if (!ItemConstants.isHair(itemId) || ItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
player.yellowMessage("Hair id '" + params[0] + "' does not exist.");
|
||||
return;
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class HairCommand extends Command {
|
||||
player.equipChanged();
|
||||
} else {
|
||||
int itemId = Integer.parseInt(params[1]);
|
||||
if (!ItemConstants.isHair(itemId) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
if (!ItemConstants.isHair(itemId) || ItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
player.yellowMessage("Hair id '" + params[1] + "' does not exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import constants.inventory.ItemConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
public class ProItemCommand extends Command {
|
||||
{
|
||||
@@ -46,7 +46,7 @@ public class ProItemCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
||||
int itemid = Integer.parseInt(params[0]);
|
||||
|
||||
if(ii.getName(itemid) == null) {
|
||||
|
||||
Reference in New Issue
Block a user