|
|
|
@ -26,6 +26,7 @@ import java.sql.PreparedStatement;
@@ -26,6 +26,7 @@ import java.sql.PreparedStatement;
|
|
|
|
|
import java.sql.ResultSet; |
|
|
|
|
import java.sql.SQLException; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -181,6 +182,8 @@ public class dbItemHandler extends dbHandlerBase {
@@ -181,6 +182,8 @@ public class dbItemHandler extends dbHandlerBase {
|
|
|
|
|
|
|
|
|
|
JSONParser jsonParser = new JSONParser(); |
|
|
|
|
|
|
|
|
|
HashMap<ItemType, Integer> templateTCountMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_item_templates`;"); |
|
|
|
|
ResultSet rs = preparedStatement.executeQuery()) { |
|
|
|
@ -191,8 +194,14 @@ public class dbItemHandler extends dbHandlerBase {
@@ -191,8 +194,14 @@ public class dbItemHandler extends dbHandlerBase {
|
|
|
|
|
ItemTemplate itemTemplate = new ItemTemplate(jsonObject); |
|
|
|
|
itemTemplate.template_id = templateID; |
|
|
|
|
ItemTemplate.templates.put(templateID, itemTemplate); |
|
|
|
|
|
|
|
|
|
if (templateTCountMap.entrySet().contains(itemTemplate.item_type)) |
|
|
|
|
templateTCountMap.put(itemTemplate.item_type, templateTCountMap.get(itemTemplate.item_type) + 1); |
|
|
|
|
else |
|
|
|
|
templateTCountMap.put(itemTemplate.item_type, 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Logger.info(templateTCountMap.toString()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
Logger.error(e); |
|
|
|
|
} |
|
|
|
|