mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-11-17 10:58:33 +00:00
update: license functions
This commit is contained in:
1 parent
3ec20ea087
commit
d31be85fd8
2 files changed
+20
-11
No files matched your search
@@ -158,17 +158,7 @@ end
|
||||
function NDCore.Functions.EditPlayerLicense(characterId, identifier, newData)
|
||||
local player = NDCore.fetchCharacter(characterId)
|
||||
if not player then return end
|
||||
|
||||
local licenses = player.metadata.licenses
|
||||
if licenses then
|
||||
local license, key = NDCore.Functions.FindLicenseByIdentifier(licenses, identifier)
|
||||
for k, v in pairs(newData) do
|
||||
license[k] = v
|
||||
end
|
||||
licenses[key] = license
|
||||
player.setMetadata("licenses", licenses)
|
||||
end
|
||||
return licenses or {}
|
||||
player.updateLicense(identifier, newData)
|
||||
end
|
||||
|
||||
-- Set the players job and job rank.
|
||||
|
||||
Reference in new issue
Block a user