mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Merge pull request #133 from hdmaniak2/fix-WW-build-task-cancellation
Fix WW build task cancelled after Natar attack with 0 damage (issue #67)
This commit is contained in:
@@ -722,8 +722,10 @@ class Automation {
|
||||
|
||||
$newLevel = $battle->calculateNewBuildingLevel($tblevel, $catapultsDamage / ($twoRowsCatapultSetup ? 2 : 1));
|
||||
|
||||
//If that building was present in the building queue, we have to modify his level or remove it
|
||||
$database->modifyBData($data['to'], $tbid, [$newLevel, $tblevel], $tribe);
|
||||
//fix: Only modify build queue if actual damage was dealt
|
||||
if ($newLevel < $tblevel) {
|
||||
$database->modifyBData($data['to'], $tbid, [$newLevel, $tblevel], $tribe);
|
||||
}
|
||||
|
||||
// building/field destroyed
|
||||
if ($newLevel == 0){
|
||||
|
||||
Reference in New Issue
Block a user