This commit is contained in:
aozhiwei 2024-08-07 11:57:11 +08:00
parent 38b715e7a3
commit 116ce9962b
3 changed files with 16 additions and 10 deletions

View File

@ -67,11 +67,11 @@ class BigwheelController extends BaseAuthedController {
} }
$priceInfo = $this->getPriceInfo($data['drawed_times']); $priceInfo = $this->getPriceInfo($data['drawed_times']);
if (empty($priceInfo)) { if (empty($priceInfo)) {
myself()->_rspErr(500, 'server internal error'); myself()->_rspErr(500, 'server internal error1');
return; return;
} }
if ($priceInfo['cost_item_id'] != V_ITEM_DIAMOND) { if ($priceInfo['cost_item_id'] != V_ITEM_DIAMOND) {
myself()->_rspErr(500, 'server internal error'); myself()->_rspErr(500, 'server internal error2');
return; return;
} }
$costItemNum = 0; $costItemNum = 0;
@ -280,7 +280,15 @@ class BigwheelController extends BaseAuthedController {
) )
)); ));
} }
myself()->_fireEvent('Bigwheel', 'onWinPrize', $grid1, $grid2, $drop1, $drop2); myself()->_fireEvent('Bigwheel', 'onWinPrize',
array(
'grid' => $grid1,
'drop' => $drop1
),
array(
'grid' => $grid2,
'drop' => $drop2
));
} }
public function buyS() public function buyS()

View File

@ -5,13 +5,9 @@ namespace events;
class Bigwheel class Bigwheel
{ {
public static function onWinPrize($grid1, $grid2, $drop1, $drop2) public static function onWinPrize($grid1, $grid2)
{ {
myself()->_callServiceStatic('BigwheelService', 'onWinPrize', myself()->_callServiceStatic('BigwheelService', 'onWinPrize', $grid1, $grid2);
$grid1,
$grid2,
$drop1,
$drop2);
} }
} }

View File

@ -4,10 +4,12 @@ namespace services;
require_once('mt/Bigwheel.php'); require_once('mt/Bigwheel.php');
use mt;
class BigwheelService extends BaseService class BigwheelService extends BaseService
{ {
public static function onWinPrize($grid1, $grid2, $drop1, $drop2) public static function onWinPrize($grid1, $grid2)
{ {
$grids = array($grid1, $grid2); $grids = array($grid1, $grid2);
foreach ($grids as $grid) { foreach ($grids as $grid) {