NPC special price option

This commit is contained in:
2025-01-03 07:47:16 -06:00
parent 3d83baed78
commit 6e66659940
5 changed files with 17 additions and 9 deletions
+12 -5
View File
@@ -79,7 +79,7 @@ public class NPC extends AbstractCharacter {
private HashSet<Integer> canRoll = null;
public int parentZoneUUID;
public int equipmentSetID = 0;
private int repairCost = 5;
private int specialPrice = 5;
// New NPC constructor. Fill in the blanks and then call
// PERSIST.
@@ -153,6 +153,12 @@ public class NPC extends AbstractCharacter {
this.name = rs.getString("npc_name");
try {
this.specialPrice = rs.getInt("specialPrice");
}catch(Exception e){
this.specialPrice = 5;
}
} catch (Exception e) {
Logger.error("NPC: " + this.dbID + " :" + e);
e.printStackTrace();
@@ -1290,12 +1296,13 @@ public class NPC extends AbstractCharacter {
return name;
}
public int getRepairCost() {
return repairCost;
public int getSpecialPrice() {
return specialPrice;
}
public void setRepairCost(int repairCost) {
this.repairCost = repairCost;
public void setSpecialPrice(int specialPrice) {
this.specialPrice = specialPrice;
DbManager.NPCQueries.updateDatabase(this);
}
public void processUpgradeNPC(PlayerCharacter player) {