From 7ebe80d6e3649d11484769ce12be9b97076709fa Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 2 Jul 2023 17:24:15 -0500 Subject: [PATCH] fixed FinishPlayer assigning items to the wrong slots --- core/db/players.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/db/players.go b/core/db/players.go index 0e799b1..2e35f9a 100644 --- a/core/db/players.go +++ b/core/db/players.go @@ -70,7 +70,7 @@ func (db *DBHandler) FinishPlayer(character *protocol.SP_CL2LS_REQ_CHAR_CREATE, // update Inventory items := [3]int16{character.SOn_Item.IEquipUBID, character.SOn_Item.IEquipLBID, character.SOn_Item.IEquipFootID} for i := 0; i < len(items); i++ { - _, err = tx.Exec("INSERT INTO Inventory (PlayerID, Slot, ID, Type, Opt) VALUES ($1, $2, $3, $4, 1)", character.PCStyle.IPC_UID, i, items[i], i+1) + _, err = tx.Exec("INSERT INTO Inventory (PlayerID, Slot, ID, Type, Opt) VALUES ($1, $2, $3, $4, 1)", character.PCStyle.IPC_UID, i+1, items[i], i+1) if err != nil { return err }