Skip to content

Commit fc37752

Browse files
committed
Support for NDui
1 parent d3478fc commit fc37752

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

ConRO.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Title:-|cffFFFFFFConRO|r- Conflict Rotation Optimizer
22
## Notes: Rotation helper framework.
3-
## Version: 10.0.26
3+
## Version: 10.0.27
44
## Author: Vae
55
## Interface: 100005
66
## SavedVariables: ConROPreferences

buttons.lua

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,6 +2145,10 @@ function ConRO:Fetch()
21452145
self:FetchDominos();
21462146
end
21472147

2148+
if IsAddOnLoaded('NDui') then
2149+
self:FetchNDui();
2150+
end
2151+
21482152
if IsAddOnLoaded('DiabolicUI') then
21492153
self:FetchDiabolic();
21502154
end
@@ -2193,6 +2197,10 @@ function ConRO:FetchDef()
21932197
self:DefFetchDominos();
21942198
end
21952199

2200+
if IsAddOnLoaded('NDui') then
2201+
self:DefFetchNDui();
2202+
end
2203+
21962204
if IsAddOnLoaded('DiabolicUI') then
21972205
self:DefFetchDiabolic();
21982206
end
@@ -2288,6 +2296,40 @@ function ConRO:DefFetchDominos()
22882296
end
22892297
end
22902298

2299+
function ConRO:FetchNDui()
2300+
for i = 1, 8 do
2301+
for b = 1, 12 do
2302+
local button = _G['NDui_ActionBar' .. i .. 'Button' .. b];
2303+
local hotkey;
2304+
if i == 1 then
2305+
hotkey = 'ActionButton' .. i .. ':HOTKEY';
2306+
else
2307+
hotkey = 'ActionBar' .. i .. 'Button' .. b .. ':HOTKEY';
2308+
end
2309+
if button then
2310+
self:AddStandardButton(button, hotkey);
2311+
end
2312+
end
2313+
end
2314+
end
2315+
2316+
function ConRO:DefFetchNDui()
2317+
for i = 1, 8 do
2318+
for b = 1, 12 do
2319+
local button = _G['NDui_ActionBar' .. i .. 'Button' .. b];
2320+
local hotkey;
2321+
if i == 1 then
2322+
hotkey = 'ActionButton' .. i .. ':HOTKEY';
2323+
else
2324+
hotkey = 'ActionBar' .. i .. 'Button' .. b .. ':HOTKEY';
2325+
end
2326+
if button then
2327+
self:DefAddStandardButton(button, hotkey);
2328+
end
2329+
end
2330+
end
2331+
end
2332+
22912333
function ConRO:FetchButtonForge()
22922334
local i = 1;
22932335
while true do

core.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2957,7 +2957,7 @@ function ConRO:MeleeSpec()
29572957
[12] = 'DemonHunter',
29582958
[13] = 'Evoker', ]]
29592959

2960-
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
2960+
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
29612961
return true;
29622962
end
29632963
return false;

0 commit comments

Comments
 (0)