This commit is contained in:
hujiabin 2024-04-29 14:45:09 +08:00
parent 3b2a2fda02
commit fb47b4a469

View File

@ -225,16 +225,16 @@ class RoomBattleDataService extends BaseService {
}
//宝箱掉落
$rand = $rewardMeta['chestLootProb'] * 100;
$rnd = rand(1,100);
if ($rnd <= $rand){
$chestItems = LootService::dropOutItem($rewardMeta['chestLoot']);
foreach ($chestItems as $item){
array_push($reward,$item);
if ($rewardMeta['chestLootProb'] > 0){
$rand = $rewardMeta['chestLootProb'] * 100;
$rnd = rand(1,100);
if ($rnd <= $rand){
$chestItems = LootService::dropOutItem($rewardMeta['chestLoot']);
foreach ($chestItems as $item){
array_push($reward,$item);
}
}
}
}
}