Rename and clean up MapleInventoryType

This commit is contained in:
P0nk
2021-09-09 20:49:05 +02:00
parent ba647db6cf
commit 5ed7cf73d1
97 changed files with 556 additions and 556 deletions

View File

@@ -23,8 +23,8 @@ import client.MapleCharacter;
import client.MapleClient;
import client.MapleSkinColor;
import client.inventory.Inventory;
import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.MapleInventoryType;
import config.YamlConfig;
import net.server.Server;
import server.MapleItemInformationProvider;
@@ -58,7 +58,7 @@ public abstract class CharacterFactory {
newchar.setJob(recipe.getJob());
newchar.setMapId(recipe.getMap());
Inventory equipped = newchar.getInventory(MapleInventoryType.EQUIPPED);
Inventory equipped = newchar.getInventory(InventoryType.EQUIPPED);
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
int top = recipe.getTop(), bottom = recipe.getBottom(), shoes = recipe.getShoes(), weapon = recipe.getWeapon();

View File

@@ -21,15 +21,16 @@ package client.creator;
import client.MapleJob;
import client.Skill;
import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.MapleInventoryType;
import config.YamlConfig;
import java.util.concurrent.atomic.AtomicInteger;
import tools.Pair;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import tools.Pair;
import java.util.concurrent.atomic.AtomicInteger;
/**
*
@@ -44,8 +45,8 @@ public class CharacterFactoryRecipe {
private int meso = 0;
private List<Pair<Skill, Integer>> skills = new LinkedList<>();
private List<Pair<Item, MapleInventoryType>> itemsWithType = new LinkedList<>();
private Map<MapleInventoryType, AtomicInteger> runningTypePosition = new LinkedHashMap<>();
private List<Pair<Item, InventoryType>> itemsWithType = new LinkedList<>();
private Map<InventoryType, AtomicInteger> runningTypePosition = new LinkedHashMap<>();
public CharacterFactoryRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
this.job = job;
@@ -107,10 +108,10 @@ public class CharacterFactoryRecipe {
}
public void addStartingEquipment(Item eqpItem) {
itemsWithType.add(new Pair<>(eqpItem, MapleInventoryType.EQUIP));
itemsWithType.add(new Pair<>(eqpItem, InventoryType.EQUIP));
}
public void addStartingItem(int itemid, int quantity, MapleInventoryType itemType) {
public void addStartingItem(int itemid, int quantity, InventoryType itemType) {
AtomicInteger p = runningTypePosition.get(itemType);
if(p == null) {
p = new AtomicInteger(0);
@@ -188,7 +189,7 @@ public class CharacterFactoryRecipe {
return skills;
}
public List<Pair<Item, MapleInventoryType>> getStartingItems() {
public List<Pair<Item, InventoryType>> getStartingItems() {
return itemsWithType;
}
}

View File

@@ -23,7 +23,7 @@ import client.MapleClient;
import client.MapleJob;
import client.creator.CharacterFactory;
import client.creator.CharacterFactoryRecipe;
import client.inventory.MapleInventoryType;
import client.inventory.InventoryType;
/**
*
@@ -33,11 +33,11 @@ public class BeginnerCreator extends CharacterFactory {
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
giveItem(recipe, 4161001, 1, MapleInventoryType.ETC);
giveItem(recipe, 4161001, 1, InventoryType.ETC);
return recipe;
}
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, InventoryType itemType) {
recipe.addStartingItem(itemid, quantity, itemType);
}

View File

@@ -23,7 +23,7 @@ import client.MapleClient;
import client.MapleJob;
import client.creator.CharacterFactory;
import client.creator.CharacterFactoryRecipe;
import client.inventory.MapleInventoryType;
import client.inventory.InventoryType;
/**
*
@@ -33,11 +33,11 @@ public class LegendCreator extends CharacterFactory {
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
giveItem(recipe, 4161048, 1, MapleInventoryType.ETC);
giveItem(recipe, 4161048, 1, InventoryType.ETC);
return recipe;
}
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, InventoryType itemType) {
recipe.addStartingItem(itemid, quantity, itemType);
}

View File

@@ -23,7 +23,7 @@ import client.MapleClient;
import client.MapleJob;
import client.creator.CharacterFactory;
import client.creator.CharacterFactoryRecipe;
import client.inventory.MapleInventoryType;
import client.inventory.InventoryType;
/**
*
@@ -33,11 +33,11 @@ public class NoblesseCreator extends CharacterFactory {
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
giveItem(recipe, 4161047, 1, MapleInventoryType.ETC);
giveItem(recipe, 4161047, 1, InventoryType.ETC);
return recipe;
}
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, InventoryType itemType) {
recipe.addStartingItem(itemid, quantity, itemType);
}

View File

@@ -23,8 +23,8 @@ import client.MapleClient;
import client.MapleJob;
import client.creator.CharacterFactory;
import client.creator.CharacterFactoryRecipe;
import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.MapleInventoryType;
import server.MapleItemInformationProvider;
/**
@@ -53,9 +53,9 @@ public class BowmanCreator extends CharacterFactory {
giveEquipment(recipe, ii, weapons[i]);
}
giveItem(recipe, 2000002, 100, MapleInventoryType.USE);
giveItem(recipe, 2000003, 100, MapleInventoryType.USE);
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
giveItem(recipe, 2000002, 100, InventoryType.USE);
giveItem(recipe, 2000003, 100, InventoryType.USE);
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
return recipe;
}
@@ -65,7 +65,7 @@ public class BowmanCreator extends CharacterFactory {
recipe.addStartingEquipment(nEquip);
}
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, InventoryType itemType) {
recipe.addStartingItem(itemid, quantity, itemType);
}

View File

@@ -25,8 +25,8 @@ import client.Skill;
import client.SkillFactory;
import client.creator.CharacterFactory;
import client.creator.CharacterFactoryRecipe;
import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.MapleInventoryType;
import constants.skills.Magician;
import server.MapleItemInformationProvider;
@@ -61,9 +61,9 @@ public class MagicianCreator extends CharacterFactory {
giveEquipment(recipe, ii, weapons[i]);
}
giveItem(recipe, 2000001, 100, MapleInventoryType.USE);
giveItem(recipe, 2000006, 100, MapleInventoryType.USE);
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
giveItem(recipe, 2000001, 100, InventoryType.USE);
giveItem(recipe, 2000006, 100, InventoryType.USE);
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
if(improveSp > 0) {
improveSp += 5;
@@ -88,7 +88,7 @@ public class MagicianCreator extends CharacterFactory {
recipe.addStartingEquipment(nEquip);
}
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, InventoryType itemType) {
recipe.addStartingItem(itemid, quantity, itemType);
}

View File

@@ -23,8 +23,8 @@ import client.MapleClient;
import client.MapleJob;
import client.creator.CharacterFactory;
import client.creator.CharacterFactoryRecipe;
import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.MapleInventoryType;
import server.MapleItemInformationProvider;
/**
@@ -55,11 +55,11 @@ public class PirateCreator extends CharacterFactory {
giveEquipment(recipe, ii, weapons[i]);
}
giveItem(recipe, 2330000, 800, MapleInventoryType.USE);
giveItem(recipe, 2330000, 800, InventoryType.USE);
giveItem(recipe, 2000002, 100, MapleInventoryType.USE);
giveItem(recipe, 2000003, 100, MapleInventoryType.USE);
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
giveItem(recipe, 2000002, 100, InventoryType.USE);
giveItem(recipe, 2000003, 100, InventoryType.USE);
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
return recipe;
}
@@ -69,7 +69,7 @@ public class PirateCreator extends CharacterFactory {
recipe.addStartingEquipment(nEquip);
}
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, InventoryType itemType) {
recipe.addStartingItem(itemid, quantity, itemType);
}

View File

@@ -23,8 +23,8 @@ import client.MapleClient;
import client.MapleJob;
import client.creator.CharacterFactory;
import client.creator.CharacterFactoryRecipe;
import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.MapleInventoryType;
import server.MapleItemInformationProvider;
/**
@@ -53,11 +53,11 @@ public class ThiefCreator extends CharacterFactory {
giveEquipment(recipe, ii, weapons[i]);
}
giveItem(recipe, 2070000, 500, MapleInventoryType.USE);
giveItem(recipe, 2070000, 500, InventoryType.USE);
giveItem(recipe, 2000002, 100, MapleInventoryType.USE);
giveItem(recipe, 2000003, 100, MapleInventoryType.USE);
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
giveItem(recipe, 2000002, 100, InventoryType.USE);
giveItem(recipe, 2000003, 100, InventoryType.USE);
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
return recipe;
}
@@ -67,7 +67,7 @@ public class ThiefCreator extends CharacterFactory {
recipe.addStartingEquipment(nEquip);
}
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, InventoryType itemType) {
recipe.addStartingItem(itemid, quantity, itemType);
}

View File

@@ -25,8 +25,8 @@ import client.Skill;
import client.SkillFactory;
import client.creator.CharacterFactory;
import client.creator.CharacterFactoryRecipe;
import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.MapleInventoryType;
import constants.skills.Warrior;
import server.MapleItemInformationProvider;
@@ -76,9 +76,9 @@ public class WarriorCreator extends CharacterFactory {
}
}
giveItem(recipe, 2000002, 100, MapleInventoryType.USE);
giveItem(recipe, 2000003, 100, MapleInventoryType.USE);
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
giveItem(recipe, 2000002, 100, InventoryType.USE);
giveItem(recipe, 2000003, 100, InventoryType.USE);
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
return recipe;
}
@@ -88,7 +88,7 @@ public class WarriorCreator extends CharacterFactory {
recipe.addStartingEquipment(nEquip);
}
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, InventoryType itemType) {
recipe.addStartingItem(itemid, quantity, itemType);
}