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

Problems With Multi-Rotations #426

Open
kirk24788 opened this issue Feb 2, 2015 · 2 comments
Open

Problems With Multi-Rotations #426

kirk24788 opened this issue Feb 2, 2015 · 2 comments

Comments

@kirk24788
Copy link
Contributor

When having multiple Rotations and OOC Rotations (i.e. Warlock Destro by default) you won't see the Rotation Dropdown.

from jprotations.lua:

function jps.activeRotation(rotationTable)
    if rotationTable == nil then
        local oocCount = tableCount(oocRotations, getCurrentKey())
        if not jps.Combat and oocCount > 0 then return jps.activeRotation(oocRotations) end
        if jps.PvP then return jps.activeRotation(pvpRotations) else return jps.activeRotation(pveRotations) end
    end

    if not rotationTable[getCurrentKey()] then return nil end
    local countRotations = 0

    for k,v in pairs(rotationTable[getCurrentKey()]) do
        countRotations = countRotations+1 
        jps.ToggleRotationName[k] = v.tooltip
    end

    if jps.initializedRotation == false then
        if countRotations > 1 and jps.getConfigVal("rotation dropdown visible") == 1 then
            jps.MultiRotation = true
            UIDropDownMenu_SetText(DropDownRotationGUI, jps.ToggleRotationName[activeRotation])
            rotationDropdownHolder:Show()
            jps.deleteFunctionFromQueue(hideDropdown,"gui_loaded")
        else  
            rotationDropdownHolder:Hide()
            jps.addTofunctionQueue(hideDropdown,"gui_loaded")
        end
        jps.firstInitializingLoop = true
    end

    jps.initializedRotation = true

    if not rotationTable[getCurrentKey()][activeRotation] then return nil end
    jps.Count = activeRotation
    jps.Tooltip = rotationTable[getCurrentKey()][activeRotation].tooltip
    return rotationTable[getCurrentKey()][activeRotation]
end

Here's the problem....if you have OOC Rotations this function gets called pretty early and will count the OOC Rotations:

    for k,v in pairs(rotationTable[getCurrentKey()]) do
        countRotations = countRotations+1 
        jps.ToggleRotationName[k] = v.tooltip
    end

Which should be one - so the next condition is always false an no DropDown is shown:

    if countRotations > 1 and jps.getConfigVal("rotation dropdown visible") == 1 then
            jps.MultiRotation = true
            UIDropDownMenu_SetText(DropDownRotationGUI, jps.ToggleRotationName[activeRotation])
            rotationDropdownHolder:Show()
            jps.deleteFunctionFromQueue(hideDropdown,"gui_loaded")
        else  

Any ideas? I'm using a third Destruction Rotation in a separate AddOn, but without DropDown it's pretty useless.

@ghost
Copy link

ghost commented Feb 2, 2015

We need a function that does the following: everytime a new rotation is registered there should be something that counts the rotations and toggles the visibility of the dropdown - not only once. I look later into

@ghost
Copy link

ghost commented Feb 2, 2015

this should fix the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant