mine HP set to custom value after rebuild
This commit is contained in:
1 parent
230a7460cd
commit
7175f79bfe
2 files changed
+4
-3
No files matched your search
@@ -1035,13 +1035,14 @@ public class Building extends AbstractWorldObject {
|
||||
|
||||
// *** Refactor: Can't we just use setRank() for this?
|
||||
|
||||
public final void rebuildMine() {
|
||||
public final void rebuildMine(int maxHP) {
|
||||
this.setRank(1);
|
||||
this.meshUUID = this.getBlueprint().getMeshForRank(this.rank);
|
||||
|
||||
// New rank mean new max hitpoints.
|
||||
|
||||
this.healthMax = this.getBlueprint().getMaxHealth(this.rank);
|
||||
//this.healthMax = this.getBlueprint().getMaxHealth(this.rank);
|
||||
this.healthMax = maxHP;
|
||||
this.setCurrentHitPoints(this.healthMax);
|
||||
this.getBounds().setBounds(this);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user