test
This commit is contained in:
parent
0e777c55b5
commit
a1875b160f
8
obj.go
8
obj.go
@ -935,7 +935,7 @@ func loadObjItem2() error {
|
|||||||
log.Printf("loadObjItems2 : %s : name missing.\n", i.Code)
|
log.Printf("loadObjItems2 : %s : name missing.\n", i.Code)
|
||||||
} else {
|
} else {
|
||||||
if obj, ok := cacheObjItem[i.Code]; ok {
|
if obj, ok := cacheObjItem[i.Code]; ok {
|
||||||
log.Printf("loadObjItem2 : %s : duplicate code found. Belong to %s\n", i.Code, n, obj.Code)
|
log.Printf("loadObjItem2 : %s : duplicate code found. Belong to %s\n", i.Code, obj.Names[0])
|
||||||
} else {
|
} else {
|
||||||
i2 := ChatWarsItem{
|
i2 := ChatWarsItem{
|
||||||
Auction: i.Auction,
|
Auction: i.Auction,
|
||||||
@ -988,7 +988,7 @@ func loadObjItem2() error {
|
|||||||
if weight != obj.Weight {
|
if weight != obj.Weight {
|
||||||
log.Printf("loadObjItem2 : %s : weight changed : %d => %d\n", weight, obj.Weight)
|
log.Printf("loadObjItem2 : %s : weight changed : %d => %d\n", weight, obj.Weight)
|
||||||
}
|
}
|
||||||
cacheObjItemID[id] = obj
|
cacheObjItemId[id] = obj
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1016,11 +1016,11 @@ func loadObjItem2() error {
|
|||||||
if i.ObjID64 == 0 {
|
if i.ObjID64 == 0 {
|
||||||
id, err := addObjItem(i.Code, i.Names[0], i.ItemTypeID, i.Weight, i.Exchange, i.Auction)
|
id, err := addObjItem(i.Code, i.Names[0], i.ItemTypeID, i.Weight, i.Exchange, i.Auction)
|
||||||
i.ObjID64 = id
|
i.ObjID64 = id
|
||||||
cacheObjItemID[id] = obj
|
cacheObjItemId[id] = obj
|
||||||
count := 0
|
count := 0
|
||||||
for _, n := range i.Names {
|
for _, n := range i.Names {
|
||||||
if count == 0 {
|
if count == 0 {
|
||||||
cacheObjItemID[n] = obj
|
cacheObjItemId[n] = obj
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
objAddName(id, n)
|
objAddName(id, n)
|
||||||
|
Loading…
Reference in New Issue
Block a user