From 43a2fa75d228f391721f749b2f239aba02c52bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Kov=C3=A1cs?= Date: Sun, 1 Sep 2024 17:07:11 +0200 Subject: [PATCH] fix #592 #579 #570 #569 #595 Co-Authored-By: JonaMiX <2124810+jonamix-ar@users.noreply.github.com> --- app/Libraries/BattleEngine/Core/BattleReport.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Libraries/BattleEngine/Core/BattleReport.php b/app/Libraries/BattleEngine/Core/BattleReport.php index 137671e1c..901868274 100755 --- a/app/Libraries/BattleEngine/Core/BattleReport.php +++ b/app/Libraries/BattleEngine/Core/BattleReport.php @@ -5,6 +5,7 @@ use App\Libraries\BattleEngine\Models\PlayerGroup; use App\Libraries\BattleEngine\Utils\Events; use App\Libraries\BattleEngine\Utils\Math; +use App\Libraries\Functions; use Exception; /** @@ -256,7 +257,7 @@ public function getAttackerDebris() $metal += $lost[0]; $crystal += $lost[1]; } - $factor = constant(strtoupper($role) . '_DEBRIS_FACTOR'); + $factor = Functions::readConfig('fleet_cdr') / 100; $sendMetal += $metal * $factor; $sendCrystal += $crystal * $factor; } @@ -278,7 +279,7 @@ public function getDefenderDebris() $metal += $lost[0]; $crystal += $lost[1]; } - $factor = constant(strtoupper($role) . '_DEBRIS_FACTOR'); + $factor = Functions::readConfig('defs_cdr') / 100; $sendMetal += $metal * $factor; $sendCrystal += $crystal * $factor; }