菜单按钮权限设置-后台可以设置新增的按钮权限
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user