Merge branch 'hjb' of git.kingsome.cn:server/game2006api into hjb
This commit is contained in:
commit
60df4a889d
@ -48,10 +48,7 @@ class AAGameMail(object):
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['!attachments', [
|
||||
['itemid', 0, '道具id'],
|
||||
['itemnum', 0, '道具数量'],
|
||||
], ''],
|
||||
['award', _common.Award(), '奖励信息'],
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -341,7 +341,10 @@ class BigwheelController extends BaseAuthedController {
|
||||
'property_chg' => $this->propertyChgService->toDto(),
|
||||
'info' => $info
|
||||
));
|
||||
//myself()->_fireEvent('Bigwheel', 'onBuyOk', $info);
|
||||
myself()->_fireEvent('Bigwheel', 'onBuyOk', array(
|
||||
'grid_id' => $gridId,
|
||||
'buy_price' => $gridRef['buy_price'],
|
||||
));
|
||||
}
|
||||
|
||||
private function getMidDataKey()
|
||||
|
@ -3,6 +3,8 @@ use phpcommon\SqlHelper;
|
||||
require_once('models/Nft.php');
|
||||
require_once('models/User.php');
|
||||
require_once('models/Hero.php');
|
||||
require_once('models/Chip.php');
|
||||
require_once('models/ChipPage.php');
|
||||
require_once('services/NftService.php');
|
||||
require_once('mt/NftDesc.php');
|
||||
require_once('mt/Hero.php');
|
||||
@ -325,6 +327,7 @@ class OutAppNftController extends BaseController {
|
||||
$info['detail']['def'] = $heroAbility['defence'];
|
||||
$info['detail']['block'] = $heroAbility['block'];
|
||||
$info['detail']['crit'] = $heroAbility['critical'];
|
||||
$this->fillHeroDetail($heroDb, $info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -475,15 +478,55 @@ class OutAppNftController extends BaseController {
|
||||
$info['detail']['def'] = $heroAbility['defence'];
|
||||
$info['detail']['block'] = $heroAbility['block'];
|
||||
$info['detail']['crit'] = $heroAbility['critical'];
|
||||
$info['detail']['chip_slots'] = 0;
|
||||
$info['detail']['combat_ability_1'] = 0;
|
||||
$info['detail']['combat_ability_2'] = 0;
|
||||
$this->fillHeroDetail($heroDb, $info);
|
||||
}
|
||||
array_push($rspData['rows'], $info);
|
||||
}
|
||||
myself()->_rspData($rspData);
|
||||
}
|
||||
|
||||
private function fillHeroDetail($heroDb, $info)
|
||||
{
|
||||
$info['detail']['chip_slots'] = 0;
|
||||
$info['detail']['combat_ability_1'] = '';
|
||||
$info['detail']['combat_ability_2'] = '';
|
||||
$randAttr = emptyReplace(json_decode($heroDb['rand_attr'], true), array());
|
||||
$i = 1;
|
||||
foreach ($randAttr as $attr) {
|
||||
if (!isset($attr['new_attr']) ||
|
||||
!$attr['new_attr']) {
|
||||
continue;
|
||||
}
|
||||
$attrMeta = myself()->_callMtStatic('AttributeList', 'get', $attr['attr_id']);
|
||||
if ($attrMeta) {
|
||||
$langMeta = myself()->_callMtStatic('Language', 'get', $attrMeta['language']);
|
||||
if ($langMeta) {
|
||||
switch ($attrMeta['dispType']) {
|
||||
case 1:
|
||||
{
|
||||
$info['detail']['combat_ability_' . $i] = $langMeta['en'] . sprintf('%d', $attr['val']);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
$info['detail']['combat_ability_' . $i] = $langMeta['en'] . sprintf('%.2f', $attr['val']);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
$info['detail']['combat_ability_' . $i] = $langMeta['en'] . sprintf('%.4f', $attr['val']);
|
||||
}
|
||||
break;
|
||||
}
|
||||
++$i;
|
||||
if ($i >= 2) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function isWingHero($tokenId)
|
||||
{
|
||||
return $tokenId > 6240603010001668 && $tokenId <= 6240603010002168;
|
||||
|
@ -10,4 +10,8 @@ class Bigwheel
|
||||
myself()->_callServiceStatic('BigwheelService', 'onWinPrize', $grid1, $grid2);
|
||||
}
|
||||
|
||||
public static function onBuyOk($gridId, $buyPrice)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user