优化导入权重测试数据

This commit is contained in:
2026-03-13 16:51:56 +08:00
parent 2de54e17c3
commit 2419f81955
5 changed files with 251 additions and 54 deletions

View File

@@ -354,9 +354,13 @@ class DiceRewardLogic
if ($configCw !== null) {
$tier = isset($configCw['tier']) ? trim((string) $configCw['tier']) : '';
if ($tier !== '') {
// 使用对应奖励配置的 weight 作为格子权重(若未配置则退回最小权重)
$weightCw = isset($configCw['weight']) && $configCw['weight'] !== null
? $configCw['weight']
: self::WEIGHT_MIN;
$payloadCw = [
'tier' => $tier,
'weight' => self::WEIGHT_MIN,
'weight' => $weightCw,
'grid_number' => $gridNumber,
'start_index' => $startId,
'end_index' => $endIdCw,
@@ -374,7 +378,7 @@ class DiceRewardLogic
$m->tier = $tier;
$m->direction = DiceReward::DIRECTION_CLOCKWISE;
$m->end_index = $endIdCw;
$m->weight = self::WEIGHT_MIN;
$m->weight = $weightCw;
$m->grid_number = $gridNumber;
$m->start_index = $startId;
$m->ui_text = $configCw['ui_text'] ?? '';
@@ -390,9 +394,13 @@ class DiceRewardLogic
if ($configCcw !== null) {
$tier = isset($configCcw['tier']) ? trim((string) $configCcw['tier']) : '';
if ($tier !== '') {
// 使用对应奖励配置的 weight 作为格子权重(若未配置则退回最小权重)
$weightCcw = isset($configCcw['weight']) && $configCcw['weight'] !== null
? $configCcw['weight']
: self::WEIGHT_MIN;
$payloadCcw = [
'tier' => $tier,
'weight' => self::WEIGHT_MIN,
'weight' => $weightCcw,
'grid_number' => $gridNumber,
'start_index' => $startId,
'end_index' => $endIdCcw,
@@ -410,7 +418,7 @@ class DiceRewardLogic
$m->tier = $tier;
$m->direction = DiceReward::DIRECTION_COUNTERCLOCKWISE;
$m->end_index = $endIdCcw;
$m->weight = self::WEIGHT_MIN;
$m->weight = $weightCcw;
$m->grid_number = $gridNumber;
$m->start_index = $startId;
$m->ui_text = $configCcw['ui_text'] ?? '';