修改原有框架中英文映射

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

@@ -35,7 +35,7 @@ class GameLogic
public function buyLotteryTickets(int $playerId, int $count): array
{
if (!isset(self::PACKAGES[$count])) {
throw new ApiException('购买抽奖券错误');
throw new ApiException('Invalid lottery ticket purchase');
}
$pack = self::PACKAGES[$count];
$cost = $pack['coin'];
@@ -45,11 +45,11 @@ class GameLogic
$player = DicePlayer::find($playerId);
if (!$player) {
throw new ApiException('用户不存在');
throw new ApiException('User not found');
}
$coinBefore = (float) $player->coin;
if ($coinBefore < $cost) {
throw new ApiException('平台币不足');
throw new ApiException('Insufficient balance');
}
$coinAfter = $coinBefore - $cost;