fix
This commit is contained in:
parent
1d0d0c9a01
commit
9c8ee7a4fa
8
item.go
8
item.go
@ -191,18 +191,18 @@ func setObjItemWeight(objID64 int64, weight int64) error {
|
||||
|
||||
func setObjItemCraft(objID64 int64, cmd string, mana int64) error {
|
||||
log.Printf("setObjItemCraft[%d] : %s - %d\n", objID64, cmd, mana)
|
||||
stmt, err := db.Prepare(`INSERT INTO obj_craft_item (obj_id, cmd, mana)
|
||||
VALUES (?, ?, ?)
|
||||
stmt, err := db.Prepare(`INSERT INTO obj_craft (obj_id, cmd, mana)
|
||||
VALUES (?, ?, ?)
|
||||
ON DUPLICATE KEY UPDATE cmd = ?, mana = ?;`)
|
||||
|
||||
logOnError(err, "setObjItemCraft : prepare update obj_craft_item")
|
||||
logOnError(err, "setObjItemCraft : prepare update obj_craft")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
_, err = stmt.Exec(objID64, cmd, mana, cmd, mana)
|
||||
logOnError(err, fmt.Sprintf("setObjItemCraft : update obj_craft_item(%d)", objID64))
|
||||
logOnError(err, fmt.Sprintf("setObjItemCraft : update obj_craft(%d)", objID64))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user