Browse Source

Superfluous getter and setters removed.

master
MagicBot 2 years ago
parent
commit
f744c64737
  1. 3
      src/engine/gameManager/NPCManager.java
  2. 19
      src/engine/objects/EquipmentSetEntry.java
  3. 2
      src/engine/objects/MobBase.java
  4. 2
      src/engine/server/world/WorldServer.java

3
src/engine/gameManager/NPCManager.java

@ -10,4 +10,7 @@ public enum NPCManager { @@ -10,4 +10,7 @@ public enum NPCManager {
public static HashMap<Integer, ArrayList<EquipmentSetEntry>> EquipmentSetMap = new HashMap<>();
public static void LoadAllEquipmentSets() {
EquipmentSetMap = DbManager.ItemBaseQueries.LOAD_EQUIPMENT_FOR_NPC_AND_MOBS();
}
}

19
src/engine/objects/EquipmentSetEntry.java

@ -9,16 +9,13 @@ @@ -9,16 +9,13 @@
package engine.objects;
import engine.gameManager.DbManager;
import engine.gameManager.NPCManager;
import java.sql.ResultSet;
import java.sql.SQLException;
public class EquipmentSetEntry {
private float dropChance;
private int itemID;
public float dropChance;
public int itemID;
/**
* ResultSet Constructor
@ -29,16 +26,4 @@ public class EquipmentSetEntry { @@ -29,16 +26,4 @@ public class EquipmentSetEntry {
this.itemID = (rs.getInt("itemID"));
}
public static void LoadAllEquipmentSets() {
NPCManager.EquipmentSetMap = DbManager.ItemBaseQueries.LOAD_EQUIPMENT_FOR_NPC_AND_MOBS();
}
float getDropChance() {
return dropChance;
}
public int getItemID() {
return itemID;
}
}

2
src/engine/objects/MobBase.java

@ -152,7 +152,7 @@ public class MobBase extends AbstractGameObject { @@ -152,7 +152,7 @@ public class MobBase extends AbstractGameObject {
for (EquipmentSetEntry equipmentSetEntry : equipList) {
MobEquipment mobEquipment = new MobEquipment(equipmentSetEntry.getItemID(), equipmentSetEntry.getDropChance());
MobEquipment mobEquipment = new MobEquipment(equipmentSetEntry.itemID, equipmentSetEntry.dropChance);
ItemBase itemBase = mobEquipment.getItemBase();
if (itemBase != null) {

2
src/engine/server/world/WorldServer.java

@ -285,7 +285,7 @@ public class WorldServer { @@ -285,7 +285,7 @@ public class WorldServer {
DbManager.PromotionQueries.GET_ALL_PROMOTIONS();
Logger.info("Loading NPC and Mob Equipment Sets");
EquipmentSetEntry.LoadAllEquipmentSets();
NPCManager.LoadAllEquipmentSets();
Logger.info("Loading Gold Loot for Mobbases");
MobbaseGoldEntry.LoadMobbaseGold();

Loading…
Cancel
Save