test
This commit is contained in:
parent
13591b9eda
commit
74c72e90d4
19
obj.go
19
obj.go
@ -968,7 +968,7 @@ func loadObjItem2() error {
|
||||
if id == 0 {
|
||||
id = getSilentObjItemID(i.Code, ``)
|
||||
if id == 0 {
|
||||
id, err = addObjItem(i.Code, n, i.ItemTypeID, i.Weight, (i.Exchange != ``), i.Auction)
|
||||
id, err = addObjItem(i.Code, n, i.ItemTypeID, i.Weight, i.Exchange, i.Auction)
|
||||
logOnError(err, "loadObjItem2 : addObjItem")
|
||||
}
|
||||
} else {
|
||||
@ -1014,7 +1014,9 @@ func loadObjItem() error {
|
||||
c.ObjID64 = id
|
||||
c.ItemTypeID = type_id
|
||||
c.Code = intl_id
|
||||
c.Name = name
|
||||
n := make([]string, 1)
|
||||
n = append(n, name)
|
||||
c.Names = n
|
||||
c.Weight = weight
|
||||
|
||||
muxObjItem.Lock()
|
||||
@ -1039,14 +1041,15 @@ func loadObjItem() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := cacheObjItem[intl_id]; ok {
|
||||
c := new(ChatWarsItem)
|
||||
c.ObjID64 = id
|
||||
c.Code = intl_id
|
||||
c.Name = name
|
||||
c.Weight = weight
|
||||
if c, ok := cacheObjItem[intl_id]; ok {
|
||||
n := c.Names
|
||||
n = append(n, name)
|
||||
c.Names = n
|
||||
muxObjItem.Lock()
|
||||
cacheObjItem[intl_id] = *c
|
||||
for _, n := range c.Names {
|
||||
cacheObjItem[name] = *c
|
||||
}
|
||||
muxObjItem.Unlock()
|
||||
} else {
|
||||
log.Printf("loadObjItem : orphaned obj_name for `%s` : %s.\n", intl_id, name)
|
||||
|
Loading…
Reference in New Issue
Block a user