33 lines
472 B
Go
33 lines
472 B
Go
package mt
|
|
|
|
import (
|
|
"q5"
|
|
"f5"
|
|
"mtb"
|
|
)
|
|
|
|
type Item struct {
|
|
mtb.Item
|
|
realName string
|
|
}
|
|
|
|
type ItemTable struct {
|
|
f5.IdMetaTable[Item]
|
|
itemIdHash *q5.ConcurrentMap[int64, *Item]
|
|
}
|
|
|
|
func (this *Item) GetRealName() string {
|
|
return this.realName
|
|
}
|
|
|
|
func (this *ItemTable) PostInit1() {
|
|
this.Traverse(
|
|
func (ele *Item) bool {
|
|
langMeta := Table.Language.GetByName(ele.GetName())
|
|
if langMeta != nil {
|
|
ele.realName = langMeta.GetEn()
|
|
}
|
|
return true
|
|
})
|
|
}
|