Skip to content

Commit

Permalink
Support for NDui
Browse files Browse the repository at this point in the history
  • Loading branch information
Vae2009 committed Jan 31, 2023
1 parent d3478fc commit fc37752
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ConRO.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Title:-|cffFFFFFFConRO|r- Conflict Rotation Optimizer
## Notes: Rotation helper framework.
## Version: 10.0.26
## Version: 10.0.27
## Author: Vae
## Interface: 100005
## SavedVariables: ConROPreferences
Expand Down
42 changes: 42 additions & 0 deletions buttons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2145,6 +2145,10 @@ function ConRO:Fetch()
self:FetchDominos();
end

if IsAddOnLoaded('NDui') then
self:FetchNDui();
end

if IsAddOnLoaded('DiabolicUI') then
self:FetchDiabolic();
end
Expand Down Expand Up @@ -2193,6 +2197,10 @@ function ConRO:FetchDef()
self:DefFetchDominos();
end

if IsAddOnLoaded('NDui') then
self:DefFetchNDui();
end

if IsAddOnLoaded('DiabolicUI') then
self:DefFetchDiabolic();
end
Expand Down Expand Up @@ -2288,6 +2296,40 @@ function ConRO:DefFetchDominos()
end
end

function ConRO:FetchNDui()
for i = 1, 8 do
for b = 1, 12 do
local button = _G['NDui_ActionBar' .. i .. 'Button' .. b];
local hotkey;
if i == 1 then
hotkey = 'ActionButton' .. i .. ':HOTKEY';
else
hotkey = 'ActionBar' .. i .. 'Button' .. b .. ':HOTKEY';
end
if button then
self:AddStandardButton(button, hotkey);
end
end
end
end

function ConRO:DefFetchNDui()
for i = 1, 8 do
for b = 1, 12 do
local button = _G['NDui_ActionBar' .. i .. 'Button' .. b];
local hotkey;
if i == 1 then
hotkey = 'ActionButton' .. i .. ':HOTKEY';
else
hotkey = 'ActionBar' .. i .. 'Button' .. b .. ':HOTKEY';
end
if button then
self:DefAddStandardButton(button, hotkey);
end
end
end
end

function ConRO:FetchButtonForge()
local i = 1;
while true do
Expand Down
2 changes: 1 addition & 1 deletion core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2957,7 +2957,7 @@ function ConRO:MeleeSpec()
[12] = 'DemonHunter',
[13] = 'Evoker', ]]

if classId == 1 or classId == 2 or classId == 3 or classId == 4 or classId == 5 or classId == 6 or classId == 7 or classId == 8 or classId == 10 or classId == 11 or classId == 12 or classId == 13 then
if classId == 1 or classId == 2 or classId == 3 or classId == 4 or classId == 5 or classId == 6 or classId == 7 or classId == 8 or classId == 9 or classId == 10 or classId == 11 or classId == 12 or classId == 13 then
return true;
end
return false;
Expand Down

0 comments on commit fc37752

Please sign in to comment.