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']);
if (empty($priceInfo)) {
myself()->_rspErr(500, 'server internal error');
myself()->_rspErr(500, 'server internal error1');
return;
}
if ($priceInfo['cost_item_id'] != V_ITEM_DIAMOND) {
myself()->_rspErr(500, 'server internal error');
myself()->_rspErr(500, 'server internal error2');
return;
}
$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()

View File

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

View File

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