forked from MagicBane/Server
Null check was done previously.
This commit is contained in:
+15
-20
@@ -842,7 +842,6 @@ public class NPC extends AbstractCharacter {
|
|||||||
else
|
else
|
||||||
this.guild = Guild.getGuild(this.guildUUID);
|
this.guild = Guild.getGuild(this.guildUUID);
|
||||||
|
|
||||||
|
|
||||||
if (this.guild == null)
|
if (this.guild == null)
|
||||||
this.guild = Guild.getErrantGuild();
|
this.guild = Guild.getErrantGuild();
|
||||||
|
|
||||||
@@ -872,27 +871,23 @@ public class NPC extends AbstractCharacter {
|
|||||||
if (this.building != null)
|
if (this.building != null)
|
||||||
NPCManager.slotCharacterInBuilding(this);
|
NPCManager.slotCharacterInBuilding(this);
|
||||||
|
|
||||||
if (this.contract != null) {
|
this.symbol = this.contract.getIconID();
|
||||||
this.symbol = this.contract.getIconID();
|
this.modTypeTable = this.contract.getNPCModTypeTable();
|
||||||
this.modTypeTable = this.contract.getNPCModTypeTable();
|
this.modSuffixTable = this.contract.getNpcModSuffixTable();
|
||||||
this.modSuffixTable = this.contract.getNpcModSuffixTable();
|
this.itemModTable = this.contract.getItemModTable();
|
||||||
this.itemModTable = this.contract.getItemModTable();
|
int VID = this.contract.getVendorID();
|
||||||
int VID = this.contract.getVendorID();
|
|
||||||
|
|
||||||
if (VID != 0)
|
if (VID != 0)
|
||||||
this.vendorID = VID;
|
this.vendorID = VID;
|
||||||
else
|
else
|
||||||
this.vendorID = 1; //no vendor items
|
this.vendorID = 1; //no vendor items
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mobBase != null) {
|
this.healthMax = this.mobBase.getHealthMax();
|
||||||
this.healthMax = this.mobBase.getHealthMax();
|
this.manaMax = 0;
|
||||||
this.manaMax = 0;
|
this.staminaMax = 0;
|
||||||
this.staminaMax = 0;
|
this.setHealth(this.healthMax);
|
||||||
this.setHealth(this.healthMax);
|
this.mana.set(this.manaMax);
|
||||||
this.mana.set(this.manaMax);
|
this.stamina.set(this.staminaMax);
|
||||||
this.stamina.set(this.staminaMax);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.parentZone.guild_zone)
|
if (this.parentZone.guild_zone)
|
||||||
if (NPC.GetNPCProfits(this) == null)
|
if (NPC.GetNPCProfits(this) == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user