Can roll list refactored
This commit is contained in:
@@ -321,12 +321,12 @@ public class dbItemHandler extends dbHandlerBase {
|
|||||||
return worked;
|
return worked;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashSet<Integer> GET_ITEMS_FOR_VENDOR(final int vendorID) {
|
public HashSet<Integer> GET_VENDOR_CAN_ROLL_LIST(final int vendorID) {
|
||||||
|
|
||||||
HashSet<Integer> itemSet = new HashSet<>();
|
HashSet<Integer> itemSet = new HashSet<>();
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
try (Connection connection = DbManager.getConnection();
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT ID FROM static_itembase WHERE vendorType = ?")) {
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT ID FROM static_vendor_items WHERE vendorType = ?")) {
|
||||||
|
|
||||||
preparedStatement.setInt(1, vendorID);
|
preparedStatement.setInt(1, vendorID);
|
||||||
|
|
||||||
|
|||||||
@@ -1039,7 +1039,7 @@ public class NPC extends AbstractCharacter {
|
|||||||
public HashSet<Integer> getCanRoll() {
|
public HashSet<Integer> getCanRoll() {
|
||||||
|
|
||||||
if (this.canRoll == null)
|
if (this.canRoll == null)
|
||||||
this.canRoll = DbManager.ItemQueries.GET_ITEMS_FOR_VENDOR(this.vendorID);
|
this.canRoll = DbManager.ItemQueries.GET_VENDOR_CAN_ROLL_LIST(this.vendorID);
|
||||||
|
|
||||||
HashSet<Integer> fullItemList = this.canRoll;
|
HashSet<Integer> fullItemList = this.canRoll;
|
||||||
HashSet<Integer> filteredItemList = new HashSet<>();
|
HashSet<Integer> filteredItemList = new HashSet<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user