This commit is contained in:
aozhiwei 2024-07-27 09:18:35 +08:00
parent 9baa525afe
commit 79a8a1d676
4 changed files with 18 additions and 0 deletions

View File

@ -107,3 +107,9 @@ func (this *ContractTable) GetByNetIdAddress(netId int32, address string) *Contr
return nil
}
}
func (this *ContractTable) Traverse(cb func(*Contract) bool) {
this.netIdNameHash.Range(func (k string, v *Contract) bool {
return cb(v)
})
}

View File

@ -1,12 +1,20 @@
package task
import (
"mt"
"jccommon"
)
type recharge struct {
}
func (this* recharge) init() {
mt.Table.Contract.Traverse(func (ele *mt.Contract) bool {
if ele.GetName() == jccommon.CONTRACT_NAME_GameItemMall {
//go this.processLockAndUnLockEvent(ele.GetNetId(), ele.GetAddress())
}
return true
})
}
func (this* recharge) unInit() {

View File

@ -8,14 +8,17 @@ type taskMgr struct {
goldBullionReturn
openGoldLock sync.Mutex
nftLock
recharge
}
func (this *taskMgr) Init() {
this.goldBullionReturn.init()
this.nftLock.init()
this.recharge.init()
}
func (this *taskMgr) UnInit() {
this.recharge.unInit()
this.nftLock.unInit()
this.goldBullionReturn.unInit()
}

View File

@ -33,6 +33,7 @@ const (
CONTRACT_NAME_GoldBrick = "GoldBrick"
CONTRACT_NAME_FounderTag = "FounderTag"
CONTRACT_NAME_NFTLock = "NFTLock"
CONTRACT_NAME_GameItemMall = "GameItemMall"
)
const (