|
|
|
@ -20,6 +20,7 @@ import org.pmw.tinylog.Logger;
@@ -20,6 +20,7 @@ import org.pmw.tinylog.Logger;
|
|
|
|
|
import java.sql.ResultSet; |
|
|
|
|
import java.sql.SQLException; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.EnumSet; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
@ -79,13 +80,12 @@ public class ItemBase {
@@ -79,13 +80,12 @@ public class ItemBase {
|
|
|
|
|
private boolean autoID = false; |
|
|
|
|
|
|
|
|
|
//requirements/restrictions
|
|
|
|
|
public ArrayList<Enum.MonsterType> restrictedRaces; |
|
|
|
|
public ArrayList<Enum.MonsterType> requiredRaces; |
|
|
|
|
public ArrayList<Enum.ClassType> restrictedClasses; |
|
|
|
|
public ArrayList<Enum.ClassType> requiredClasses; |
|
|
|
|
public ArrayList<Integer> requiredDiscs; |
|
|
|
|
public ArrayList<Integer> restrictedDiscs; |
|
|
|
|
public Enum.SexType requiredSex; |
|
|
|
|
public EnumSet<Enum.MonsterType> restrictedRaces; |
|
|
|
|
public EnumSet<Enum.MonsterType> requiredRaces; |
|
|
|
|
public EnumSet<Enum.ClassType> restrictedClasses; |
|
|
|
|
public EnumSet<Enum.ClassType> requiredClasses; |
|
|
|
|
public EnumSet<Enum.DisciplineType> requiredDiscs; |
|
|
|
|
public EnumSet<Enum.DisciplineType> restrictedDiscs; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* ResultSet Constructor |
|
|
|
@ -222,7 +222,7 @@ public class ItemBase {
@@ -222,7 +222,7 @@ public class ItemBase {
|
|
|
|
|
|
|
|
|
|
public static void loadAllItemBases() { |
|
|
|
|
DbManager.ItemBaseQueries.LOAD_ALL_ITEMBASES(); |
|
|
|
|
DbManager.ItemBaseQueries.LOAD_ALL_ITEM_REQUIREMENTS(); |
|
|
|
|
|
|
|
|
|
AnniverseryGifts.add(971000); |
|
|
|
|
AnniverseryGifts.add(971001); |
|
|
|
|
AnniverseryGifts.add(971002); |
|
|
|
@ -979,42 +979,4 @@ public class ItemBase {
@@ -979,42 +979,4 @@ public class ItemBase {
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void LoadRequirements(String racesRequired, String racesRestricted, String classesRequired, String classesRestricted, String discsRequired, String discsRestricted){ |
|
|
|
|
this.requiredRaces = new ArrayList<>(); |
|
|
|
|
this.restrictedRaces = new ArrayList<>(); |
|
|
|
|
this.requiredClasses = new ArrayList<>(); |
|
|
|
|
this.restrictedClasses = new ArrayList<>(); |
|
|
|
|
this.requiredDiscs = new ArrayList<>(); |
|
|
|
|
this.restrictedDiscs = new ArrayList<>(); |
|
|
|
|
if(racesRequired != null){ |
|
|
|
|
for(String entry : racesRequired.split(";")){ |
|
|
|
|
requiredRaces.add(Enum.MonsterType.valueOf(entry)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(racesRestricted != null){ |
|
|
|
|
for(String entry : racesRestricted.split(";")){ |
|
|
|
|
restrictedRaces.add(Enum.MonsterType.valueOf(entry)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(classesRequired != null){ |
|
|
|
|
for(String entry : classesRequired.split(";")){ |
|
|
|
|
requiredClasses.add(Enum.ClassType.valueOf(entry)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(classesRestricted != null){ |
|
|
|
|
for(String entry : classesRestricted.split(";")){ |
|
|
|
|
restrictedClasses.add(Enum.ClassType.valueOf(entry)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(discsRequired != null){ |
|
|
|
|
for(String entry : discsRequired.split(";")){ |
|
|
|
|
//TODO find way to load disc runebaseID from name
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(discsRestricted != null){ |
|
|
|
|
for(String entry : discsRestricted.split(";")) { |
|
|
|
|
//TODO find way to load disc runebaseID from name
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|