From 7cb302e41a4582c9c3ad4dd49ae700d68cbe4c10 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Wed, 17 Jan 2024 17:18:13 +0800 Subject: [PATCH] 1 --- webapp/services/HashRateService.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/webapp/services/HashRateService.php b/webapp/services/HashRateService.php index 198ce8d4..24f1c83b 100644 --- a/webapp/services/HashRateService.php +++ b/webapp/services/HashRateService.php @@ -110,14 +110,15 @@ class HashRateService extends BaseService break; //指定英雄升阶数 case AchievementsPower::HERO_UP_QUALITY : { - $condition = $taskMate['condition']; - $quality = 0; - Hero::getHeroList(function ($row) use ($condition,&$quality) { - if ($row['hero_id'] == $condition && $row['quality'] > $quality){ - $quality = $row['quality']; + $state = false; + Hero::getHeroList(function ($row) use ($taskMate,&$state) { + if ($row['hero_id'] == $taskMate['condition'] && $row['quality'] >= $taskMate['Completed_quantity']){ + $state = true; } }); - $taskDto['current'] = $quality; + if ($state){ + $taskDto['current'] = $taskMate['Completed_quantity']; + } } break; //拥有英雄nft数