From b7463cd522ccae9eefa1afd08e10ecdb6d98ec6a Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Mon, 27 Nov 2017 16:33:10 +0100 Subject: [PATCH] fix: max crop/resources reset to level 1 value temporarily This happened when level 1 granary / warehouse was built because of a missing + sign in a formula. #374 --- GameEngine/Automation.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 09ead08e..97f9086a 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -654,11 +654,10 @@ class Automation { if ($level != 1) { $max -= ${'bid'.$indi['type']}[$level-1]['attri'] * STORAGE_MULTIPLIER; - $max += ${'bid'.$indi['type']}[$level]['attri'] * STORAGE_MULTIPLIER; - } else { - $max = ${'bid'.$indi['type']}[$level]['attri'] * STORAGE_MULTIPLIER; } + $max += ${'bid'.$indi['type']}[$level]['attri'] * STORAGE_MULTIPLIER; + $fieldsToSet[$fieldDbName] = $max; }