mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-15 07:41:00 +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));
|
$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
|
//fix: Only modify build queue if actual damage was dealt
|
||||||
$database->modifyBData($data['to'], $tbid, [$newLevel, $tblevel], $tribe);
|
if ($newLevel < $tblevel) {
|
||||||
|
$database->modifyBData($data['to'], $tbid, [$newLevel, $tblevel], $tribe);
|
||||||
|
}
|
||||||
|
|
||||||
// building/field destroyed
|
// building/field destroyed
|
||||||
if ($newLevel == 0){
|
if ($newLevel == 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user