mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
tweak(server/player): save inventory when character created
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user