Slots will be derived not stored.

This commit is contained in:
2023-04-29 08:08:45 -04:00
parent 2114d9832f
commit 225e55d956
4 changed files with 4 additions and 36 deletions
+1 -8
View File
@@ -94,7 +94,6 @@ public class NPC extends AbstractCharacter {
private String nameOverride = "";
private int equipmentSetID = 0;
public int runeSetID = 0;
public int slot = -1;
private Regions region = null;
public Vector3fImmutable inBuildingLoc = Vector3fImmutable.ZERO;
@@ -224,8 +223,6 @@ public class NPC extends AbstractCharacter {
this.statAlt = rs.getFloat("npc_spawnY");
this.statLon = rs.getFloat("npc_spawnZ");
this.slot = rs.getInt("npc_slot");
if (this.contract != null) {
this.symbol = this.contract.getIconID();
this.modTypeTable = this.contract.getNPCModTypeTable();
@@ -909,10 +906,7 @@ public class NPC extends AbstractCharacter {
BuildingLocation buildingLocation = null;
//-1 slot means no slot available in building.
if (this.slot != -1)
putSlot = this.slot;
else
putSlot = NPC.getBuildingSlot(this);
putSlot = NPC.getBuildingSlot(this);
buildingLocation = buildingModel.getSlotLocation(putSlot);
@@ -1556,7 +1550,6 @@ public class NPC extends AbstractCharacter {
if (!DbManager.NPCQueries.UPDATE_SLOT(npc, slot))
return false;
npc.slot = slot;
return true;
}