mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
fix grade crafting
This commit is contained in:
@@ -40,8 +40,9 @@ function craftingMenu(data) local hasjob = false
|
||||
for k, v in pairs(Recipes[i]) do
|
||||
if k ~= "amount" and k ~= "job" and k ~= "gang" then
|
||||
if Recipes[i].job then hasjob = false
|
||||
for l, b in pairs(data.craftable.Recipes[i]["job"]) do
|
||||
for l, b in pairs(Recipes[i].job) do
|
||||
hasjob = hasJob(l, nil, b)
|
||||
if hasJob == true then break end
|
||||
end
|
||||
end
|
||||
local setheader, settext = "", ""
|
||||
|
||||
22
wrapper.lua
22
wrapper.lua
@@ -982,23 +982,23 @@ function hasJob(job, src, grade) local hasJob = false
|
||||
local jobinfo = exports[QBXExport]:GetPlayer(src).PlayerData.job
|
||||
if jobinfo.name == job then
|
||||
hasJob = true
|
||||
if grade and not jobinfo.grade.level then hasJob = false end
|
||||
if grade and not (grade <= jobinfo.grade.level) then hasJob = false end
|
||||
end
|
||||
local ganginfo = exports[QBXExport]:GetPlayer(src).PlayerData.gang
|
||||
if ganginfo.name == job then
|
||||
hasJob = true
|
||||
if grade and not ganginfo.grade.level then hasJob = false end
|
||||
if grade and not (grade <= ganginfo.grade.level) then hasJob = false end
|
||||
end
|
||||
else
|
||||
local jobinfo = exports[QBExport]:GetPlayer(src).PlayerData.job
|
||||
if jobinfo.name == job then
|
||||
hasJob = true
|
||||
if grade and not jobinfo.grade.level then hasJob = false end
|
||||
if grade and not (grade <= jobinfo.grade.level) then hasJob = false end
|
||||
end
|
||||
local ganginfo = exports[QBExport]:GetPlayer(src).PlayerData.gang
|
||||
if ganginfo.name == job then
|
||||
hasJob = true
|
||||
if grade and not ganginfo.grade.level then hasJob = false end
|
||||
if grade and not (grade <= ganginfo.grade.level) then hasJob = false end
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -1018,14 +1018,12 @@ function hasJob(job, src, grade) local hasJob = false
|
||||
|
||||
elseif GetResourceState(QBXExport):find("start") then
|
||||
local jobinfo = QBX.PlayerData.job
|
||||
if jobinfo.name == job then
|
||||
hasJob = true
|
||||
if grade and not jobinfo.grade.level then hasJob = false end
|
||||
if jobinfo.name == job then hasJob = true
|
||||
if grade and not (grade <= jobinfo.grade.level) then hasJob = false end
|
||||
end
|
||||
local ganginfo = QBX.PlayerData.gang
|
||||
if ganginfo.name == job then
|
||||
hasJob = true
|
||||
if grade and not ganginfo.grade.level then hasJob = false end
|
||||
if ganginfo.name == job then hasJob = true
|
||||
if grade and not (grade <= ganginfo.grade.level) then hasJob = false end
|
||||
end
|
||||
else
|
||||
local info = nil
|
||||
@@ -1035,12 +1033,12 @@ function hasJob(job, src, grade) local hasJob = false
|
||||
local jobinfo = info.job
|
||||
if jobinfo.name == job then
|
||||
hasJob = true
|
||||
if grade and not jobinfo.grade.level then hasJob = false end
|
||||
if grade and not (grade <= jobinfo.grade.level) then hasJob = false end
|
||||
end
|
||||
local ganginfo = info.gang
|
||||
if ganginfo.name == job then
|
||||
hasJob = true
|
||||
if grade and not ganginfo.grade.level then hasJob = false end
|
||||
if grade and not (grade <= ganginfo.grade.level) then hasJob = false end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user