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