1
This commit is contained in:
parent
faf2ffca5c
commit
d2445903bc
@ -202,19 +202,19 @@ class InGameMallController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch ($itemMeta['type']){
|
switch ($itemMeta['type']){
|
||||||
// case \mt\Item::HERO_TYPE : {
|
case \mt\Item::HERO_TYPE : {
|
||||||
// $heroDb = Hero::find($goodsUniid);
|
$heroDb = Hero::find($goodsUniid);
|
||||||
// if (!$heroDb || !empty($heroDb['token_id']) || $heroDb['hero_id']!= $itemId){
|
if (!$heroDb || !empty($heroDb['token_id']) || $heroDb['hero_id']!= $itemId){
|
||||||
// $this->_rspErr(1, 'param goods_unnid error');
|
$this->_rspErr(1, 'param goods_unnid error');
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// if ($heroDb['seal_type'] != 1){
|
if ($heroDb['seal_type'] != 1){
|
||||||
// $this->_rspErr(1, 'Shelf heroes need to be packaged first');
|
$this->_rspErr(1, 'Shelf heroes need to be packaged first');
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// $orderField = $heroDb['quality'];
|
$orderField = $heroDb['quality'];
|
||||||
// }
|
}
|
||||||
// break;
|
break;
|
||||||
case \mt\Item::CHIP_TYPE : {
|
case \mt\Item::CHIP_TYPE : {
|
||||||
$chipDb = Chip::find($goodsUniid);
|
$chipDb = Chip::find($goodsUniid);
|
||||||
if (!$chipDb || !empty($chipDb['token_id']) || $chipDb['item_id']!= $itemId){
|
if (!$chipDb || !empty($chipDb['token_id']) || $chipDb['item_id']!= $itemId){
|
||||||
@ -276,19 +276,19 @@ class InGameMallController extends BaseAuthedController {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$propertyChgService->addChip();
|
$propertyChgService->addChip();
|
||||||
}//elseif ($itemMeta['type'] == \mt\Item::HERO_TYPE){
|
}elseif ($itemMeta['type'] == \mt\Item::HERO_TYPE){
|
||||||
// SqlHelper::update
|
SqlHelper::update
|
||||||
// (myself()->_getSelfMysql(),
|
(myself()->_getSelfMysql(),
|
||||||
// 't_hero',
|
't_hero',
|
||||||
// array(
|
array(
|
||||||
// 'idx' => $goodsUniid,
|
'idx' => $goodsUniid,
|
||||||
// ),
|
),
|
||||||
// array(
|
array(
|
||||||
// 'account_id' => InGameMall::SYSTEM_MALL_ACCOUNT
|
'account_id' => InGameMall::SYSTEM_MALL_ACCOUNT
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
// $propertyChgService->addHeroChg();
|
$propertyChgService->addHeroChg();
|
||||||
// }elseif ($itemMeta['type'] == \mt\Item::GOLD_SYN){
|
}//elseif ($itemMeta['type'] == \mt\Item::GOLD_SYN){
|
||||||
// SqlHelper::update
|
// SqlHelper::update
|
||||||
// (myself()->_getSelfMysql(),
|
// (myself()->_getSelfMysql(),
|
||||||
// 't_bag',
|
// 't_bag',
|
||||||
@ -362,6 +362,20 @@ class InGameMallController extends BaseAuthedController {
|
|||||||
$this->_decItems($costItems);
|
$this->_decItems($costItems);
|
||||||
|
|
||||||
switch ($goods['order_type']){
|
switch ($goods['order_type']){
|
||||||
|
case InGameMall::HERO_TYPE :{
|
||||||
|
SqlHelper::update
|
||||||
|
(myself()->_getSelfMysql(),
|
||||||
|
't_hero',
|
||||||
|
array(
|
||||||
|
'idx' => $goods['goods_uniid'],
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'account_id' => myself()->_getAccountId()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$propertyChgService->addHeroChg();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case InGameMall::CHIP_TYPE:{
|
case InGameMall::CHIP_TYPE:{
|
||||||
SqlHelper::update
|
SqlHelper::update
|
||||||
(myself()->_getSelfMysql(),
|
(myself()->_getSelfMysql(),
|
||||||
@ -710,7 +724,7 @@ EOD;
|
|||||||
|
|
||||||
private function _isGoodsType($type){
|
private function _isGoodsType($type){
|
||||||
if (in_array($type,array(
|
if (in_array($type,array(
|
||||||
// \mt\Item::HERO_TYPE,
|
\mt\Item::HERO_TYPE,
|
||||||
\mt\Item::CHIP_TYPE,
|
\mt\Item::CHIP_TYPE,
|
||||||
\mt\Item::FRAGMENT_TYPE,
|
\mt\Item::FRAGMENT_TYPE,
|
||||||
\mt\Item::BATTLE_REWARD_BOX,
|
\mt\Item::BATTLE_REWARD_BOX,
|
||||||
@ -727,9 +741,9 @@ EOD;
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
switch ($itemMeta['type']){
|
switch ($itemMeta['type']){
|
||||||
// case \mt\Item::HERO_TYPE : {
|
case \mt\Item::HERO_TYPE : {
|
||||||
// return InGameMall::HERO_TYPE;
|
return InGameMall::HERO_TYPE;
|
||||||
// }
|
}
|
||||||
case \mt\Item::CHIP_TYPE : {
|
case \mt\Item::CHIP_TYPE : {
|
||||||
return InGameMall::CHIP_TYPE;
|
return InGameMall::CHIP_TYPE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user