debug
This commit is contained in:
parent
9f61d483ae
commit
f68f7665bc
7
item.go
7
item.go
@ -315,16 +315,16 @@ func loadObjItem() error {
|
||||
var k int64
|
||||
for k = 0; k < int64(len(objItems)); k++ {
|
||||
if len(objItems[k].Names) == 0 {
|
||||
log.Printf("loadObjItems : %s : name missing.\n", objItems[k].Code)
|
||||
log.Printf("loadObjItem : %s : name missing.\n", objItems[k].Code)
|
||||
} else {
|
||||
if id, ok := cacheObjItem[objItems[k].Code]; ok {
|
||||
if idc, okc := cacheObjItem[objItems[k].Code]; okc {
|
||||
log.Printf("loadObjItem : %s : duplicate code found. Belong to %s\n", objItems[id].Code, objItems[id].Names[0])
|
||||
} else {
|
||||
cacheObjItem[objItems[k].Code] = k
|
||||
objItems[k].ItemTypeID = cacheObjSubType[objItems[k].ItemType]
|
||||
|
||||
for _, n := range objItems[k].Names {
|
||||
if id, ok := cacheObjItem[n]; ok {
|
||||
if idn, okn := cacheObjItem[n]; okn {
|
||||
log.Printf("loadObjItem : %s - %s : duplicate name found. Belongs to %s\n", objItems[k].Code, n, objItems[id].Code)
|
||||
} else {
|
||||
cacheObjItem[n] = k
|
||||
@ -389,6 +389,7 @@ func loadObjItem() error {
|
||||
|
||||
for _, i := range cacheObjItem {
|
||||
if objItems[i].ObjID64 == 0 {
|
||||
log.Printf("loadObjItem : adding %s (%s)\n", objItems[i].Names[0], objItems[i].Code)
|
||||
id, err := addObjItem(objItems[i].Code, objItems[i].Names[0], objItems[i].ItemTypeID, objItems[i].Weight, objItems[i].Exchange, objItems[i].Auction, objItems[i].Craftable)
|
||||
logOnError(err, "loadObjItem : addObjItem")
|
||||
objItems[i].ObjID64 = id
|
||||
|
Loading…
Reference in New Issue
Block a user