1
This commit is contained in:
parent
da106673c8
commit
872fba5414
@ -29,4 +29,9 @@ const (
|
||||
|
||||
)
|
||||
|
||||
const (
|
||||
USER_ADD_GOLD_REASON_RETURN = 1
|
||||
USER_ADD_GOLD_REASON_USE = 2
|
||||
)
|
||||
|
||||
const BASE_SCORE = 2800
|
||||
|
@ -68,7 +68,7 @@ func OpenGoldBullion(accountId string, accountAddress string, netId int32, token
|
||||
}
|
||||
}
|
||||
{
|
||||
if !UserAddGold(accountId, goldNum) {
|
||||
if !UserAddGold(accountId, goldNum, netId, tokenId, constant.USER_ADD_GOLD_REASON_USE) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
@ -212,7 +212,7 @@ func ReturnGoldBullion(accountId string, netId int32, tokenId string) bool {
|
||||
}
|
||||
|
||||
{
|
||||
if !UserAddGold(accountId, goldNum) {
|
||||
if !UserAddGold(accountId, goldNum, netId, tokenId, constant.USER_ADD_GOLD_REASON_RETURN) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ func AccountIdExistsAndIgnoreError(accountId string) bool {
|
||||
return isExists
|
||||
}
|
||||
|
||||
func UserAddGold(accountId string, goldNum int32) bool {
|
||||
func UserAddGold(accountId string, goldNum int32, netId int32, tokenId string, reason int32) bool {
|
||||
result := false
|
||||
f5.GetGoStyleDb().Update(
|
||||
constant.GAME_DB,
|
||||
|
Loading…
x
Reference in New Issue
Block a user