1
This commit is contained in:
parent
a6b98a067b
commit
7e540c2b7a
@ -7,43 +7,6 @@ import (
|
|||||||
"main/constant"
|
"main/constant"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetItemIdHeroQuality(netId int32, contractAddress string, tokenId string,
|
|
||||||
itemId *int32, heroQuality *int32) {
|
|
||||||
f5.GetGoStyleDb().OrmSelectOne(
|
|
||||||
constant.BCNFT_DB,
|
|
||||||
"t_nft",
|
|
||||||
[][]string {
|
|
||||||
{"net_id", q5.ToString(netId)},
|
|
||||||
{"contract_address", contractAddress},
|
|
||||||
{"token_id", tokenId},
|
|
||||||
},
|
|
||||||
func (err error, ds *f5.DataSet) {
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ds.Next() {
|
|
||||||
*itemId = q5.ToInt32(ds.GetByName("item_id"))
|
|
||||||
tokenType := q5.ToInt32(ds.GetByName("token_type"))
|
|
||||||
if tokenType == jccommon.NFT_TYPE_CFHERO {
|
|
||||||
f5.GetGoStyleDb().OrmSelectOne(
|
|
||||||
constant.GAME_DB,
|
|
||||||
"t_hero",
|
|
||||||
[][]string {
|
|
||||||
{"token_id", tokenId},
|
|
||||||
},
|
|
||||||
func (err error, ds *f5.DataSet) {
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ds.Next() {
|
|
||||||
*heroQuality = q5.ToInt32(ds.GetByName("quality"))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetHeroByTokenId(tokenId string, itemId *int32, heroQuality *int32) bool {
|
func GetHeroByTokenId(tokenId string, itemId *int32, heroQuality *int32) bool {
|
||||||
result := false
|
result := false
|
||||||
f5.GetGoStyleDb().OrmSelectOne(
|
f5.GetGoStyleDb().OrmSelectOne(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user