mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-11-21 19:38:33 +00:00
Fix stashRemoveItem for QS-Inv
This commit is contained in:
1 parent
2ca1cbd110
commit
0592c3ebc8
1 file changed
+15
-2
+15
-2
@@ -348,8 +348,21 @@ function stashRemoveItem(stashItems, stashName, items) local amount = amount and
|
||||
end
|
||||
elseif GetResourceState(QSInv):find("start") then
|
||||
for k, v in pairs(items) do
|
||||
exports[QSInv]:RemoveItemIntoStash(stashName, k, v)
|
||||
if Config.System.Debug then print("^6Bridge^7: ^2Removing item from ^3Stash^2 with ^7"..QSInv, k, v) end
|
||||
for l in pairs(stashItems) do
|
||||
if stashItems[l].name == k then
|
||||
if (stashItems[l].amount - v) <= 0 then
|
||||
if Config.System.Debug then
|
||||
print("^6Bridge^7: ^2None of this item left in stash ^3Stash^7", k, v)
|
||||
end
|
||||
stashItems[l] = nil
|
||||
else
|
||||
if Config.System.Debug then
|
||||
print("^6Bridge^7: ^2Removing item from ^3Stash^2 with ^7"..QBInv, k, v)
|
||||
end
|
||||
exports[QSInv]:RemoveItemIntoStash(stashName, k, v, l)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif GetResourceState(CodeMInv):find("start") then
|
||||
for k, v in pairs(items) do
|
||||
|
||||
Reference in new issue
Block a user