Code bloc moved out of constructor.

This commit is contained in:
2023-04-29 16:24:19 -04:00
parent da62046ce0
commit a3217f44be
+13 -13
View File
@@ -217,19 +217,6 @@ public class NPC extends AbstractCharacter {
this.statAlt = rs.getFloat("npc_spawnY");
this.statLon = rs.getFloat("npc_spawnZ");
if (this.contract != null) {
this.symbol = this.contract.getIconID();
this.modTypeTable = this.contract.getNPCModTypeTable();
this.modSuffixTable = this.contract.getNpcModSuffixTable();
this.itemModTable = this.contract.getItemModTable();
int VID = this.contract.getVendorID();
if (VID != 0)
this.vendorID = VID;
else
this.vendorID = 1; //no vendor items
}
int guildID = rs.getInt("npc_guildID");
if (this.building != null)
@@ -386,6 +373,19 @@ public class NPC extends AbstractCharacter {
this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z);
}
if (this.contract != null) {
this.symbol = this.contract.getIconID();
this.modTypeTable = this.contract.getNPCModTypeTable();
this.modSuffixTable = this.contract.getNpcModSuffixTable();
this.itemModTable = this.contract.getItemModTable();
int VID = this.contract.getVendorID();
if (VID != 0)
this.vendorID = VID;
else
this.vendorID = 1; //no vendor items
}
if (this.mobBase != null) {
this.healthMax = this.mobBase.getHealthMax();
this.manaMax = 0;