1
This commit is contained in:
parent
b0cd82dd97
commit
9bc2e93721
34346
bin/marketserver/res/item@item.json
Normal file
34346
bin/marketserver/res/item@item.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,7 @@ package mt
|
||||
import (
|
||||
"q5"
|
||||
"f5"
|
||||
"os"
|
||||
"mtb"
|
||||
"jccommon"
|
||||
"strings"
|
||||
@ -29,7 +30,7 @@ func (this *ItemTable) Load() {
|
||||
func (this *ItemTable) PostInit1() {
|
||||
items := []*struct {
|
||||
Id int32 `json:"id"`
|
||||
Name int32 `json:"name"`
|
||||
Name string `json:"name"`
|
||||
Type int32 `json:"type"`
|
||||
SubType int32 `json:"sub_type"`
|
||||
}{}
|
||||
@ -37,11 +38,17 @@ func (this *ItemTable) PostInit1() {
|
||||
func (ele *Item) bool {
|
||||
if ele.GetType() == jccommon.ITEM_TYPE_HERO ||
|
||||
ele.GetType() == jccommon.ITEM_TYPE_GOLD_BULLION {
|
||||
p := q5.NewSliceElement(&items)
|
||||
p := *q5.NewSliceElement(&items)
|
||||
p.Id = ele.GetId()
|
||||
p.Name = ele.GetName()
|
||||
p.Type = ele.GetType()
|
||||
p.SubType = ele.GetSubType()
|
||||
}
|
||||
return true
|
||||
})
|
||||
data := q5.EncodeJson(&items)
|
||||
if err := os.WriteFile("item.json", []byte(data), 0644); err == nil {
|
||||
}
|
||||
}
|
||||
|
||||
func (this *ItemTable) Search(name string, itemIds map[int32]int32) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user