菜单按钮权限设置-后台可以设置新增的按钮权限

This commit is contained in:
2026-03-17 20:30:37 +08:00
parent bdf50e61f5
commit f63616e735
15 changed files with 125 additions and 113 deletions

View File

@@ -86,10 +86,13 @@ class PlayStartLogic
$playerProfitTotal = $playerWinSum - 100.0 * $playerPlayCount;
$safetyLine = (int) ($configType0->safety_line ?? 0);
$killEnabled = ((int) ($configType0->kill_enabled ?? 1)) === 1;
// 玩家累计盈利>=安全线杀分:无论付费/免费都用 type=1 的 T*_weight未达到时一律按玩家权重
// 记录 lottery_config_id杀分记 type=1未杀分统一记当前池 type=0
$usePoolWeights = $killEnabled && $playerProfitTotal >= $safetyLine && $configType1 !== null;
$config = $usePoolWeights ? $configType1 : $configType0;
// 盈利>=安全线且开启杀分:付费/免费都用 killScore盈利<安全线:付费用玩家权重,免费用 killScore无则用 default
// 记录 lottery_config_id用池权重时记对应池,付费用玩家权重时记 default
$usePoolWeights = ($ticketType === self::LOTTERY_TYPE_PAID && $killEnabled && $playerProfitTotal >= $safetyLine && $configType1 !== null)
|| ($ticketType === self::LOTTERY_TYPE_FREE);
$config = $usePoolWeights
? (($ticketType === self::LOTTERY_TYPE_FREE && $configType1 === null) ? $configType0 : $configType1)
: $configType0;
// 按档位 T1-T5 抽取后,从 DiceReward 表按当前方向取该档位数据,再按 weight 抽取一条得到 grid_number
$rewardInstance = DiceReward::getCachedInstance();