|
|
@ -182,6 +182,22 @@ public class Building extends AbstractWorldObject { |
|
|
|
this.setHealth(healthMax); |
|
|
|
this.setHealth(healthMax); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!this.ownerIsNPC){ |
|
|
|
|
|
|
|
//add extra HP for city walls of R8 trees
|
|
|
|
|
|
|
|
City city = ZoneManager.getCityAtLocation(this.loc); |
|
|
|
|
|
|
|
if(city != null){ |
|
|
|
|
|
|
|
Building ToL = city.getTOL(); |
|
|
|
|
|
|
|
if(ToL != null){ |
|
|
|
|
|
|
|
if(ToL.rank == 8){ |
|
|
|
|
|
|
|
float currentHealth = this.health.get(); |
|
|
|
|
|
|
|
float newHealth = (currentHealth/this.healthMax) * (this.healthMax * 1.1f); |
|
|
|
|
|
|
|
this.healthMax *= 1.1f; |
|
|
|
|
|
|
|
this.setHealth(newHealth); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Null out blueprint if not needed (npc building)
|
|
|
|
// Null out blueprint if not needed (npc building)
|
|
|
|
|
|
|
|
|
|
|
|
if (blueprintUUID == 0) |
|
|
|
if (blueprintUUID == 0) |
|
|
|