Skip to content

Commit

Permalink
fix count not count
Browse files Browse the repository at this point in the history
  • Loading branch information
tg123 committed May 6, 2020
1 parent caa7480 commit d771d7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,7 @@ function GUI:Init()
for _, item in pairs(items or {}) do
local c = item["cost"] or 0
local t = item["type"]
local cnt = item["detail"]["count"] or 1

if t == "CREDIT" and c == 0 then
local i = item["detail"]["item"] or ""
Expand All @@ -1830,7 +1831,7 @@ function GUI:Init()

if i ~= "" then
countby[i] = countby[i] or 0
countby[i] = countby[i] + 1
countby[i] = countby[i] + cnt
end

end
Expand Down

0 comments on commit d771d7a

Please sign in to comment.