1
This commit is contained in:
parent
80afde40d0
commit
83e2386341
@ -9,25 +9,16 @@ use phpcommon\SqlHelper;
|
||||
|
||||
class LuckySymbol extends BaseModel {
|
||||
|
||||
public static function find($itemId)
|
||||
public static function hasLuckySymbol()
|
||||
{
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getSelfMysql(),
|
||||
't_bag',
|
||||
't_lucky_symbol',
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
'item_id' => $itemId,
|
||||
)
|
||||
);
|
||||
if ($row) {
|
||||
$row['item_uniid'] = $row['idx'];
|
||||
if ($row['account_id'] != myself()->_getAccountId()) {
|
||||
if (!NftService::isEquipOwner(myself()->_getAddress(), $row['token_id'])) {
|
||||
$row = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $row;
|
||||
return empty($row) ? false : $row['in_use_item'] > 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user