forked from MagicBane/Server
Code bloc moved out of constructor.
This commit is contained in:
+13
-13
@@ -217,19 +217,6 @@ public class NPC extends AbstractCharacter {
|
|||||||
this.statAlt = rs.getFloat("npc_spawnY");
|
this.statAlt = rs.getFloat("npc_spawnY");
|
||||||
this.statLon = rs.getFloat("npc_spawnZ");
|
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");
|
int guildID = rs.getInt("npc_guildID");
|
||||||
|
|
||||||
if (this.building != null)
|
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);
|
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) {
|
if (this.mobBase != null) {
|
||||||
this.healthMax = this.mobBase.getHealthMax();
|
this.healthMax = this.mobBase.getHealthMax();
|
||||||
this.manaMax = 0;
|
this.manaMax = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user