1
This commit is contained in:
parent
444aa2c403
commit
51763fc58a
@ -1,6 +1,7 @@
|
|||||||
package mt
|
package mt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"q5"
|
||||||
"f5"
|
"f5"
|
||||||
"mtb"
|
"mtb"
|
||||||
"strings"
|
"strings"
|
||||||
@ -13,12 +14,17 @@ type Item struct {
|
|||||||
|
|
||||||
type ItemTable struct {
|
type ItemTable struct {
|
||||||
f5.IdMetaTable[Item]
|
f5.IdMetaTable[Item]
|
||||||
|
itemIdHash *q5.ConcurrentMap[int64, *Item]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Item) Init1() {
|
func (this *Item) Init1() {
|
||||||
this.lowerName = strings.ToLower(this.GetName())
|
this.lowerName = strings.ToLower(this.GetName())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *ItemTable) Load() {
|
||||||
|
this.itemIdHash = new(q5.ConcurrentMap[int64, *Item])
|
||||||
|
}
|
||||||
|
|
||||||
func (this *ItemTable) Search(name string, itemIds map[int32]int32) {
|
func (this *ItemTable) Search(name string, itemIds map[int32]int32) {
|
||||||
name = strings.ToLower(name)
|
name = strings.ToLower(name)
|
||||||
this.Traverse(
|
this.Traverse(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user