This commit is contained in:
aozhiwei 2024-11-06 11:24:14 +08:00
parent 84a52b0729
commit 5ff979a6ac
2 changed files with 6 additions and 2 deletions

View File

@ -49,7 +49,7 @@ var Table = f5.New(func(this *table) {
this.Global = f5.New(func(this *GlobalTable) {
this.FileName = "../res/global@global.json"
this.PrimKey = "id"
this.PrimKey = "type"
})
this.Reward = f5.New(func(this *RewardTable) {

View File

@ -15,5 +15,9 @@ type GlobalTable struct {
func (this *GlobalTable) GetDice() int32 {
meta := this.GetById(1)
return meta.GetNumber()
if meta == nil {
return 0
} else {
return meta.GetNumber()
}
}