1
This commit is contained in:
parent
92e328f417
commit
ca1bf9d3f0
@ -19,10 +19,6 @@ func (this *Recharge) Init1() {
|
||||
panic("Recharge diamond <= 0")
|
||||
return
|
||||
}
|
||||
if this.GetDiamond() > constant.RECHARGE_CURRENCY_MAX_EXCHANGE_RAET {
|
||||
panic("Recharge diamond < upimit")
|
||||
return
|
||||
}
|
||||
if this.GetPrice() <= 0 {
|
||||
panic("Recharge price <= 0")
|
||||
return
|
||||
|
@ -96,3 +96,18 @@ func (this *RechargeCurrencyTable) Load() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (this *RechargeCurrencyTable) PostInit1() {
|
||||
this.netIdHash.Range(
|
||||
func (key int32, val *RechargeCurrency) bool {
|
||||
netId := key
|
||||
currencyMeta := val
|
||||
Table.Recharge.Traverse(func(ele *Recharge) bool {
|
||||
if int64(ele.GetPrice()) * currencyMeta.GetExchangeRate() != int64(ele.GetDiamond()) {
|
||||
panic(fmt.Sprintf("load metafile json decode error %s %s", "currency.json", netId))
|
||||
}
|
||||
return true
|
||||
})
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user