修改DiceLotteryPoolConfig-type改为name映射
This commit is contained in:
@@ -56,8 +56,8 @@ class LotteryService
|
||||
if (!$player) {
|
||||
throw new \RuntimeException('玩家不存在');
|
||||
}
|
||||
$config0 = DiceLotteryPoolConfig::where('type', 0)->find();
|
||||
$config1 = DiceLotteryPoolConfig::where('type', 1)->find();
|
||||
$config0 = DiceLotteryPoolConfig::where('name', 'default')->find();
|
||||
$config1 = DiceLotteryPoolConfig::where('name', 'killScore')->find();
|
||||
$s = new self($playerId);
|
||||
$s->configType0Id = $config0 ? (int) $config0->id : null;
|
||||
$s->configType1Id = $config1 ? (int) $config1->id : null;
|
||||
|
||||
Reference in New Issue
Block a user