mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-16 06:12:52 -04:00
Changed UniformBoxService to use new data format
This commit is contained in:
@@ -47,7 +47,6 @@ import intents.network.OutboundPacketIntent;
|
||||
import intents.server.ServerManagementIntent;
|
||||
import intents.server.ServerStatusIntent;
|
||||
import java.time.OffsetTime;
|
||||
import java.time.ZoneOffset;
|
||||
import resources.Galaxy;
|
||||
import resources.Galaxy.GalaxyStatus;
|
||||
import resources.config.ConfigFile;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class UniformBoxService extends Service {
|
||||
//TODO: Display loot box
|
||||
|
||||
private static final String [] UNIFORM_COLUMNS = {"boots", "pants", "belt", "gloves", "shirt", "vest", "hat", "necklace", "robe", "weapon"};
|
||||
private static final String GET_UNIFORMBOX_SQL = "SELECT * FROM npe_uniformbox where profession = ? AND race = ? AND (gender = ? OR gender = 3)";
|
||||
private static final String GET_UNIFORMBOX_SQL = "SELECT * FROM npe_uniformbox where profession = ? AND race = ?";
|
||||
private static final String UNIFORM_BOX_IFF = "object/tangible/npe/shared_npe_uniform_box.iff";
|
||||
|
||||
private RelationalServerData uniformBoxDatabase;
|
||||
@@ -86,15 +86,14 @@ public class UniformBoxService extends Service {
|
||||
String profession = creature.getPlayerObject().getProfession();
|
||||
|
||||
destroyUniformBox(creature);
|
||||
handleCreateItems(inventory, profession.substring(0, profession.lastIndexOf('_')), creature.getRace());
|
||||
handleCreateItems(inventory, profession, creature.getRace());
|
||||
}
|
||||
|
||||
private void handleCreateItems(SWGObject inventory, String profession, Race race) {
|
||||
synchronized (getUniformBoxStatement) {
|
||||
try {
|
||||
getUniformBoxStatement.setString(1, profession);
|
||||
getUniformBoxStatement.setString(2, race.getSpecies());
|
||||
getUniformBoxStatement.setInt(3, race.isMale() ? 1 : 2);
|
||||
getUniformBoxStatement.setString(2, race.name());
|
||||
|
||||
try (ResultSet set = getUniformBoxStatement.executeQuery()) {
|
||||
if (set.next())
|
||||
|
||||
Reference in New Issue
Block a user