Skip to content

Commit 9d4708a

Browse files
committed
tweak(server/player): save inventory when character created
1 parent d0d04ae commit 9d4708a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/player.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ function NDCore.newCharacter(src, info)
426426
inventory = info.inventory or {}
427427
}
428428

429-
charInfo.id = MySQL.insert.await("INSERT INTO nd_characters (identifier, name, firstname, lastname, dob, gender, cash, bank, phonenumber, `groups`, metadata) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", {
429+
charInfo.id = MySQL.insert.await("INSERT INTO nd_characters (identifier, name, firstname, lastname, dob, gender, cash, bank, phonenumber, `groups`, metadata, inventory) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", {
430430
identifier,
431431
charInfo.name,
432432
charInfo.firstname,
@@ -437,7 +437,8 @@ function NDCore.newCharacter(src, info)
437437
charInfo.bank,
438438
charInfo.phonenumber,
439439
json.encode(charInfo.groups),
440-
json.encode(charInfo.metadata)
440+
json.encode(charInfo.metadata),
441+
json.encode(charInfo.inventory)
441442
})
442443

443444
return createCharacterTable(charInfo)

0 commit comments

Comments
 (0)