This commit is contained in:
hujiabin 2024-04-16 16:06:17 +08:00
parent da08012e00
commit 1462e2c39b
2 changed files with 21 additions and 4 deletions

View File

@ -130,5 +130,19 @@ class Hero(object):
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'unSealHero',
'desc': '英雄解封',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=unSealHero',
'params': [
_common.ReqHead(),
['hero_uniid', 0, '英雄唯一id'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
]

View File

@ -435,10 +435,8 @@ class BagController extends BaseAuthedController {
$this->_rspErr(1, "item_id error");
return;
}
if (!(
$itemMeta['type'] == mt\Item::FUNC_TYPE &&
$itemMeta['sub_type'] == mt\Item::FUNC_RENAME_CARD_SUBTYPE)) {
$this->_rspErr(1, "only supported rename card");
if ($itemMeta['type'] != mt\Item::FUNC_TYPE) {
$this->_rspErr(1, "only supported property");
return;
}
$costItems= array(
@ -498,6 +496,7 @@ class BagController extends BaseAuthedController {
private function useSealDrug($itemDb, $itemMeta, $itemNum, $param1, $param2, $param3)
{
$userInfo = $this->_getOrmUserInfo();
$errCode = 0;
$errMsg = '';
$heroUniId = $param1;
@ -506,6 +505,10 @@ class BagController extends BaseAuthedController {
$this->_rspErr(1, "You don't have the hero yet");
return;
}
if ($userInfo['hero_id'] == $heroUniId){
$this->_rspErr(1, "Unable to operate the battle hero");
return;
}
if (!$heroDb['token_id']){
$this->_rspErr(1, "this hero is not NFT");
return;