Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix full dps visual bug on gem dropdown #8087

Merged

Conversation

Paliak
Copy link
Contributor

@Paliak Paliak commented Aug 3, 2024

Description of the problem being solved:

When hovering over a gem in the gem selection dropdown while having anything other than full dps selected in the sort gems by dropdown the tooltip would show that the player loses all full dps (see screen shots). This was caused by a funky lua behaviour here:

if statData.stat == "FullDPS" and not GlobalCache.useFullDPS and not self.viewMode == "TREE" then
diff = 0
end

The above condition would return false even though self.viewMode was not "TREE" see below minimal repro:

test1 = "test1"
test2 = false
test3 = "justtest"

print(test1 == "test1" and not test2 and not test3 == "test3") -- false -- the condition currently
print((test1 == "test1" and not test2 and not test3) == "test3") -- false
print(test1 == "test1" and not test2 and not (test3 == "test3")) -- true
print(test1 == "test1" and not test2 and test3 ~= "test3") -- true -- the condition this pr changes it to

Before screenshot:

obraz

After screenshot:

obraz

@Paliak Paliak added the user-interface Changes that only affect the UI label Aug 3, 2024
@LocalIdentity LocalIdentity merged commit 0f522fe into PathOfBuildingCommunity:dev Aug 6, 2024
2 checks passed
@Paliak Paliak deleted the fix-fulldps-gemdropdown branch August 7, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user-interface Changes that only affect the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants