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

Element not visible on entering world untill reputation window is shown #4

Closed
greven opened this issue Sep 19, 2016 · 2 comments
Closed
Assignees
Labels

Comments

@greven
Copy link

greven commented Sep 19, 2016

If you open the Blizzard factions window and then reload the game without doing anything else, the reputation bar will show up.

From what I found out inspecting the code, problem seems to be with the API function GetSelectedFaction().

If you enter the world and ouput the result of this API call you will see the output is incorrect.
Do the same after having opened the reputation window and reload. The ouput will actually be the correct faction index. That means till the reputation window is opened this API call is returning the wrong information.

Line 6:
local name, _, standingID, min, max, value, _, _, _, _, _, _, _, factionID = GetFactionInfo(GetSelectedFaction())

Line 85 on the Visibility function:
local selectedFaction = GetSelectedFaction()

@greven greven changed the title Element not visible on entering world and till reputation window is shown Element not visible on entering world untill reputation window is shown Sep 19, 2016
@S7orm89
Copy link

S7orm89 commented Oct 19, 2016

GetSelectedFaction() refers to the faction you are selecting in the reputation window and not the faction you are watching. Since the Selected Faction at login is the "Other" header, GetFactionInfo will return completely wrong values until you manually select a faction.

This should fix the issue:

Line 6:
local name, standingID, min, max, value, factionID = GetWatchedFactionInfo()

Line 91:
elseif GetWatchedFactionInfo() ~= nil then

@p3lim p3lim self-assigned this Oct 23, 2016
@p3lim p3lim added the bug label Oct 24, 2016
@p3lim
Copy link
Member

p3lim commented Oct 24, 2016

cd1d27e

@p3lim p3lim closed this as completed Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants