diff --git a/webapp/services/RoomBattleDataService.php b/webapp/services/RoomBattleDataService.php index c28a410a..c63be2f3 100644 --- a/webapp/services/RoomBattleDataService.php +++ b/webapp/services/RoomBattleDataService.php @@ -286,18 +286,21 @@ class RoomBattleDataService extends BaseService { $rnd = rand(1,100); if ($rnd <= $rand){ $chestItems = LootService::dropOutItem($rewardMeta['chestLoot']); - $event = array( - 'ID' => 'Box', - 'SUB_ID' => 'drop', - 'SUB_KEY' => 'drop_box', - 'before' =>array( - 'rnd' => $rnd, - 'rate' => $rate, - 'rewardMeta' => $rewardMeta, - ), - 'result' => $chestItems, - ); - LogService::burialPointEvent($event); + if (count($chestItems)>0){ + $event = array( + 'ID' => 'Box', + 'SUB_ID' => 'drop', + 'SUB_KEY' => 'drop_box', + 'before' =>array( + 'rnd' => $rnd, + 'rate' => $rate, + 'rewardMeta' => $rewardMeta, + ), + 'result' => $chestItems, + ); + LogService::burialPointEvent($event); + } + foreach ($chestItems as $item){ array_push($reward,$item); }