|
|
@ -348,15 +348,13 @@ public class NPC extends AbstractCharacter { |
|
|
|
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); |
|
|
|
//this.firstName = this.minionMobBase.getFirstName();
|
|
|
|
|
|
|
|
//this.lastName = "";
|
|
|
|
|
|
|
|
//this.level = (short)(this.minionMobBase.getLevel());
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//add this npc to building
|
|
|
|
//add this npc to building
|
|
|
|
if (this.building != null && this.loadID != 0) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (building.getBlueprint() != null){ |
|
|
|
if (this.building != null) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (building.getBlueprint() != null) { |
|
|
|
|
|
|
|
|
|
|
|
int maxSlots; |
|
|
|
int maxSlots; |
|
|
|
maxSlots = building.getBlueprint().getSlotsForRank(this.building.getRank()); |
|
|
|
maxSlots = building.getBlueprint().getSlotsForRank(this.building.getRank()); |
|
|
@ -368,8 +366,7 @@ public class NPC extends AbstractCharacter { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//npc created by an admin without a blueprint, just default max slot size to 10.
|
|
|
|
} else { |
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int maxSlots = 10; |
|
|
|
int maxSlots = 10; |
|
|
|
|
|
|
|
|
|
|
@ -1094,6 +1091,7 @@ public class NPC extends AbstractCharacter { |
|
|
|
// *** Refactor : this has a useInit flag that can be removed
|
|
|
|
// *** Refactor : this has a useInit flag that can be removed
|
|
|
|
|
|
|
|
|
|
|
|
public static NPC createNPC(String name, int contractID, Vector3fImmutable spawn, Guild guild, boolean isMob, Zone parent, short level, boolean useInit, Building building) { |
|
|
|
public static NPC createNPC(String name, int contractID, Vector3fImmutable spawn, Guild guild, boolean isMob, Zone parent, short level, boolean useInit, Building building) { |
|
|
|
|
|
|
|
|
|
|
|
NPC npcWithoutID = new NPC(name, (short) 0, (short) 0, (short) 0, (short) 0, |
|
|
|
NPC npcWithoutID = new NPC(name, (short) 0, (short) 0, (short) 0, (short) 0, |
|
|
|
(short) 0, (short) 1, 0, false, false, false, spawn, spawn, Vector3fImmutable.ZERO, |
|
|
|
(short) 0, (short) 1, 0, false, false, false, spawn, spawn, Vector3fImmutable.ZERO, |
|
|
|
(short) 1, (short) 1, (short) 1, guild, (byte) 0, 0, isMob, building, contractID, parent); |
|
|
|
(short) 1, (short) 1, (short) 1, guild, (byte) 0, 0, isMob, building, contractID, parent); |
|
|
|