Skip to content

Commit

Permalink
Fixed bug with certain Difficulty groups
Browse files Browse the repository at this point in the history
  • Loading branch information
ImUnicke committed Mar 10, 2021
1 parent 339a520 commit 0540cb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AllTheThings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6646,18 +6646,18 @@ local fields = {
return t.locks;
end,
["locks"] = function(t)
local locks = t.parent.locks;
local locks = t.parent and t.parent.locks;
if locks then
if t.parent.isLockoutShared and not (t.difficultyID == 7 or t.difficultyID == 17) then
rawset(t, key, locks.shared);
rawset(t, "locks", locks.shared);
return locks.shared;
else
-- Look for this difficulty's lockout.
for difficultyKey, lock in pairs(locks) do
if difficultyKey == "shared" then
-- ignore this one
elseif difficultyKey == t.difficultyID then
rawset(t, key, lock);
rawset(t, "locks", lock);
return lock;
end
end
Expand Down

0 comments on commit 0540cb7

Please sign in to comment.