tweak(server/player): save inventory when character created

This commit is contained in:
Andyyy7666
2024-02-25 23:43:00 +01:00
parent d0d04ae282
commit 9d4708a1f8

View File

@@ -426,7 +426,7 @@ function NDCore.newCharacter(src, info)
inventory = info.inventory or {} inventory = info.inventory or {}
} }
charInfo.id = MySQL.insert.await("INSERT INTO nd_characters (identifier, name, firstname, lastname, dob, gender, cash, bank, phonenumber, `groups`, metadata) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", { charInfo.id = MySQL.insert.await("INSERT INTO nd_characters (identifier, name, firstname, lastname, dob, gender, cash, bank, phonenumber, `groups`, metadata, inventory) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", {
identifier, identifier,
charInfo.name, charInfo.name,
charInfo.firstname, charInfo.firstname,
@@ -437,7 +437,8 @@ function NDCore.newCharacter(src, info)
charInfo.bank, charInfo.bank,
charInfo.phonenumber, charInfo.phonenumber,
json.encode(charInfo.groups), json.encode(charInfo.groups),
json.encode(charInfo.metadata) json.encode(charInfo.metadata),
json.encode(charInfo.inventory)
}) })
return createCharacterTable(charInfo) return createCharacterTable(charInfo)