test
This commit is contained in:
parent
64ab463a92
commit
d481d63de9
5
def.go
5
def.go
@ -97,8 +97,9 @@ type ChatWarsUser struct {
|
||||
}
|
||||
|
||||
type ChatWarsItem struct {
|
||||
ObjID64 int64 `json:"obj_id"`
|
||||
ItemTypeID int64 `json:"item_type_id"`
|
||||
ObjID64 int64
|
||||
ItemTypeID int64
|
||||
ItemType string `json:"item_type"`
|
||||
Code string `json:"code"`
|
||||
Names []string `json:"names"`
|
||||
Weight int64 `json:"weight"`
|
||||
|
5
obj.go
5
obj.go
@ -758,7 +758,7 @@ func addObjItem(code string, name string, itemTypeID64 int64, weight int64, exch
|
||||
|
||||
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
|
||||
VALUES (` + strconv.FormatInt(cacheObjType[`item`], 10) + `,` + fmt.Sprintf("%d", itemTypeID64) + `);`)
|
||||
logOnError(err, "addObjItem : exec insert obj")
|
||||
logOnError(err, "addObjItem : exec insert obj ("+code+", "+name+")")
|
||||
if err != nil {
|
||||
err2 := tx.Rollback()
|
||||
logOnError(err2, "addObjItem : rollback insert obj")
|
||||
@ -941,7 +941,8 @@ func loadObjItem2() error {
|
||||
Auction: i.Auction,
|
||||
Code: i.Code,
|
||||
Exchange: i.Exchange,
|
||||
ItemTypeID: i.ItemTypeID,
|
||||
ItemType: i.ItemType
|
||||
ItemTypeID: cacheObjSubType[i.ItemType],
|
||||
Weight: i.Weight,
|
||||
Craft: ChatWarsItemCraft{},
|
||||
Names: make([]string, 0),
|
||||
|
Loading…
Reference in New Issue
Block a user