This commit is contained in:
aozhiwei 2022-11-21 16:16:39 +08:00
parent c6b1f93a10
commit 44bbb3fc13
2 changed files with 18 additions and 2 deletions

View File

@ -227,12 +227,12 @@ class BattleController extends BaseAuthedController {
}
}
{
$itemDb = Bag::find(V_ITEM_REVIVE_COIN);
$itemDb = Bag::findEx($member['account_id'], V_ITEM_REVIVE_COIN);
$info['revive_coin'] = $itemDb && $itemDb['item_num'] > 0 ? $itemDb['item_num'] : 0;
}
{
$info['match_mode'] = 0;
if ($currSeason && myself()->_getV(TN_RANK_STATUS, 0 ) == 0){
if ($currSeason && myself()->_getV(TN_RANK_STATUS, 0) == 0){
$info['match_mode'] = 1;
}
}

View File

@ -34,6 +34,22 @@ class Bag extends BaseModel {
return $row;
}
public static function findEx($accountId, $itemId)
{
$row = SqlHelper::ormSelectOne(
myself()->_getMysql($accountId),
't_bag',
array(
'account_id' => $accountId,
'item_id' => $itemId,
)
);
if ($row) {
$row['item_uniid'] = $row['idx'];
}
return $row;
}
public static function findByUniId($itemUniId)
{
$row = SqlHelper::ormSelectOne(