1
This commit is contained in:
parent
9baa525afe
commit
79a8a1d676
@ -107,3 +107,9 @@ func (this *ContractTable) GetByNetIdAddress(netId int32, address string) *Contr
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *ContractTable) Traverse(cb func(*Contract) bool) {
|
||||||
|
this.netIdNameHash.Range(func (k string, v *Contract) bool {
|
||||||
|
return cb(v)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
package task
|
package task
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"mt"
|
||||||
|
"jccommon"
|
||||||
)
|
)
|
||||||
|
|
||||||
type recharge struct {
|
type recharge struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this* recharge) init() {
|
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() {
|
func (this* recharge) unInit() {
|
||||||
|
@ -8,14 +8,17 @@ type taskMgr struct {
|
|||||||
goldBullionReturn
|
goldBullionReturn
|
||||||
openGoldLock sync.Mutex
|
openGoldLock sync.Mutex
|
||||||
nftLock
|
nftLock
|
||||||
|
recharge
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *taskMgr) Init() {
|
func (this *taskMgr) Init() {
|
||||||
this.goldBullionReturn.init()
|
this.goldBullionReturn.init()
|
||||||
this.nftLock.init()
|
this.nftLock.init()
|
||||||
|
this.recharge.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *taskMgr) UnInit() {
|
func (this *taskMgr) UnInit() {
|
||||||
|
this.recharge.unInit()
|
||||||
this.nftLock.unInit()
|
this.nftLock.unInit()
|
||||||
this.goldBullionReturn.unInit()
|
this.goldBullionReturn.unInit()
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ const (
|
|||||||
CONTRACT_NAME_GoldBrick = "GoldBrick"
|
CONTRACT_NAME_GoldBrick = "GoldBrick"
|
||||||
CONTRACT_NAME_FounderTag = "FounderTag"
|
CONTRACT_NAME_FounderTag = "FounderTag"
|
||||||
CONTRACT_NAME_NFTLock = "NFTLock"
|
CONTRACT_NAME_NFTLock = "NFTLock"
|
||||||
|
CONTRACT_NAME_GameItemMall = "GameItemMall"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user