mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-04 09:27:17 +00:00
fix: this can sometimes go above current building level
This commit is contained in:
@@ -1113,7 +1113,7 @@ class Automation {
|
|||||||
$totallvl = round( sqrt( pow( ( $tblevel + 0.5 ), 2 ) - ( ( !$twoRowsCatapultSetup ? (int) $battlepart[4] : (int) $battlepart[4] / 2 ) * 8 ) ) );
|
$totallvl = round( sqrt( pow( ( $tblevel + 0.5 ), 2 ) - ( ( !$twoRowsCatapultSetup ? (int) $battlepart[4] : (int) $battlepart[4] / 2 ) * 8 ) ) );
|
||||||
|
|
||||||
// no damage to the building/field
|
// no damage to the building/field
|
||||||
if ( $tblevel == $totallvl ) {
|
if ( $tblevel >= $totallvl ) {
|
||||||
$info_cata = " was not damaged.";
|
$info_cata = " was not damaged.";
|
||||||
} else // building/field damaged, damage calculations to follow
|
} else // building/field damaged, damage calculations to follow
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user