v1.9 - ButtonForge Support
Pawel [04-03-16 - 14:10]
v1.9 - ButtonForge Support
diff --git a/TDButtons.lua b/TDButtons.lua
index f183086..450be05 100644
--- a/TDButtons.lua
+++ b/TDButtons.lua
@@ -133,6 +133,12 @@ function TDButton_Fetch()
else
TDButton_FetchBlizzard();
end
+
+ -- It does not alter original button frames so it needs to be fetched too
+ if IsAddOnLoaded('ButtonForge') then
+ TDButton_FetchButtonForge();
+ end
+
print(_tdInfo .. TDDpsName .. ': Fetched action bars!');
end
@@ -167,6 +173,44 @@ function TDButton_FetchBlizzard()
end
----------------------------------------------
+-- Button spells on original button forge
+----------------------------------------------
+function TDButton_FetchButtonForge()
+ local i = 1;
+ while true do
+ local button = _G['ButtonForge' .. i];
+ if not button then
+ break;
+ end
+ i = i + 1;
+
+ local type = button:GetAttribute('type');
+ if type then
+ local actionType = button:GetAttribute(type);
+ local id;
+ local actionName;
+ if type == 'macro' then
+ local id = GetMacroSpell(actionType);
+ if id then
+ actionName = GetSpellInfo(id);
+ end
+ elseif type == 'item' then
+ actionName = GetItemInfo(actionType);
+ elseif type == 'spell' then
+ actionName = GetSpellInfo(actionType);
+ end
+ if actionName then
+ if TDButton_Spells[actionName] == nil then
+ TDButton_Spells[actionName] = {};
+ end
+
+ tinsert(TDButton_Spells[actionName], button);
+ end
+ end
+ end
+end
+
+----------------------------------------------
-- Button spells on ElvUI
----------------------------------------------
function TDButton_FetchElvUI()
diff --git a/TDDps.toc b/TDDps.toc
index 0877dce..f59568b 100644
--- a/TDDps.toc
+++ b/TDDps.toc
@@ -1,10 +1,10 @@
## Title: TDDps
## Notes: Rotation helper framework.
-## Version: 1.8
+## Version: 1.9
## Author: Kaminaris
## Interface: 60200
## SavedVariables: TDDps_Options
-## OptionalDependencies: Bartender4, ElvUI
+## OptionalDependencies: Bartender4, ElvUI, ButtonForge
Libs\LibStub\LibStub.lua
Libs\AceGUI-3.0\AceGUI-3.0.xml