修改原有框架中英文映射

This commit is contained in:
2026-03-17 18:09:10 +08:00
parent e7b8f4cae9
commit bdf50e61f5
81 changed files with 1956 additions and 735 deletions

View File

@@ -53,7 +53,7 @@ class PlayStartLogic
{
$player = DicePlayer::find($playerId);
if (!$player) {
throw new ApiException('用户不存在');
throw new ApiException('User not found');
}
$minEv = DiceRewardConfig::getCachedMinRealEv();
@@ -66,7 +66,7 @@ class PlayStartLogic
$paid = (int) ($player->paid_ticket_count ?? 0);
$free = (int) ($player->free_ticket_count ?? 0);
if ($paid + $free <= 0) {
throw new ApiException('抽奖券不足');
throw new ApiException('Insufficient lottery tickets');
}
$lotteryService = LotteryService::getOrCreate($playerId);
@@ -74,7 +74,7 @@ class PlayStartLogic
$configType0 = DiceLotteryPoolConfig::where('name', 'default')->find();
$configType1 = DiceLotteryPoolConfig::where('name', 'killScore')->find();
if (!$configType0) {
throw new ApiException('奖池配置不存在(需 name=default');
throw new ApiException('Lottery pool config not found (name=default required)');
}
// 玩家累计盈利:仅统计 lottery_config_id=type=0 的成功对局(中奖金额-100*局数)
@@ -119,7 +119,7 @@ class PlayStartLogic
}
if ($chosen === null) {
Log::error("多次摇取档位后仍无有效 DiceReward");
throw new ApiException('暂无可用奖励配置');
throw new ApiException('No available reward config');
}
$startIndex = (int) ($chosen['start_index'] ?? 0);