Skip to content

Commit 3894026

Browse files
committed
Initial updates for Midnight Alpha
1 parent 20c1220 commit 3894026

File tree

6 files changed

+20
-22
lines changed

6 files changed

+20
-22
lines changed

TalentTreeTweaks.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Interface: @toc-version-retail@
1+
## Interface: @toc-version-retail@,@toc-version-midnight@
22
## Title: Talent Tree Tweaks
33
## Author: Numy
44
## IconTexture: Interface\Addons\TalentTreeTweaks\media\icon

modules/clickableExportStringsInChat.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ local Main = TTT.Main;
55
local Util = TTT.Util;
66
local L = TTT.L;
77

8+
local ChatEdit_InsertLink = ChatFrameUtil and ChatFrameUtil.InsertLink or ChatEdit_InsertLink
9+
local ChatFrame_AddMessageEventFilter = ChatFrameUtil and ChatFrameUtil.AddMessageEventFilter or ChatFrame_AddMessageEventFilter
10+
local ChatFrame_RemoveMessageEventFilter = ChatFrameUtil and ChatFrameUtil.RemoveMessageEventFilter or ChatFrame_RemoveMessageEventFilter
11+
812
--- @class TalentTreeTweaks_ClickableExportStringsInChat: AceModule, AceHook-3.0
913
local Module = Main:NewModule('ClickableExportStringsInChat', 'AceHook-3.0');
1014
Module.bitWidthHeaderVersion = 8;

modules/exportInspectedBuild.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ local Main = TTT.Main;
55
local Util = TTT.Util;
66
local L = TTT.L;
77

8+
local ChatEdit_InsertLink = ChatFrameUtil and ChatFrameUtil.InsertLink or ChatEdit_InsertLink
9+
local ChatFrame_OpenChat = ChatFrameUtil and ChatFrameUtil.OpenChat or ChatFrame_OpenChat
10+
811
local LEVEL_CAP = 80;
912

1013
--- @class TalentTreeTweaks_ExportInspectedBuild: AceModule, AceHook-3.0, AceEvent-3.0
@@ -251,11 +254,11 @@ function Module:MakeLinkButton(talentsTab)
251254
button:SetScript('OnClick', function()
252255
local specID = self.cachedInspectSpecID or talentsTab:GetSpecID();
253256
local classID = self.cachedInspectClassID or talentsTab:GetClassID();
254-
local unitSex = self.cachedInspectUnitSex or Util:GetTalentContainerFrame():GetUnitSex();
257+
local unitSex = self.cachedInspectUnitSex or Util:GetTalentContainerFrame():GetUnitSex();
255258
local exportString = self.cachedInspectExportString or Util:GetLoadoutExportString(talentsTab);
256259

257-
local specName = select(2, GetSpecializationInfoByID(specID, unitSex));
258-
local classInfo = C_CreatureInfo.GetClassInfo(classID);
260+
local specName = select(2, GetSpecializationInfoByID(specID, unitSex));
261+
local classInfo = C_CreatureInfo.GetClassInfo(classID);
259262
local className = classInfo and classInfo.className;
260263
local classColor = RAID_CLASS_COLORS[classInfo and classInfo.classFile];
261264
local level = LEVEL_CAP;

modules/miniTreeInTooltip.lua

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,6 @@ local DIFF_DEFAULT_RED = 2; -- you have a talent they don't
3434
local DIFF_DEFAULT_GREEN = 3; -- they have a talent you don't
3535
local DIFF_DEFAULT_ORANGE = 4; -- different talent choice/rank
3636

37-
local GetSpellInfo;
38-
do -- todo: remove after 11.0 release
39-
GetSpellInfo = _G.GetSpellInfo or function(spellID)
40-
if not spellID then
41-
return nil;
42-
end
43-
44-
local spellInfo = C_Spell.GetSpellInfo(spellID);
45-
if spellInfo then
46-
return spellInfo.name, nil, spellInfo.iconID, spellInfo.castTime, spellInfo.minRange, spellInfo.maxRange, spellInfo.spellID, spellInfo.originalIconID;
47-
end
48-
end
49-
end
50-
5137
function TalentTreeTweaks_EmbedMiniTreeIntoTooltip(tooltip, exportString, configID)
5238
if not exportString and configID then
5339
local ok, configInfo = pcall(C_Traits.GetConfigInfo, configID);
@@ -441,13 +427,13 @@ function Module:AddBuildToTooltip(tooltip, exportString)
441427
local entryInfo = LTT:GetEntryInfo(entryID);
442428
local definitionInfo = entryInfo.definitionID and C_Traits.GetDefinitionInfo(entryInfo.definitionID);
443429
local spellID = definitionInfo and definitionInfo.spellID;
444-
local spellIcon = spellID and select(8, GetSpellInfo(spellID));
430+
local spellIcon = spellID and C_Spell.GetSpellTexture(spellID);
445431
local isAtlas = false;
446432

447-
if (
433+
if
448434
(nodeSelectionInfo.isNodeSelected and not nodeSelectionInfo.isChoiceNode and not nodeSelectionInfo.isPartiallyRanked)
449435
or LTT:IsNodeGrantedForSpec(specID, nodeID)
450-
) then
436+
then
451437
style = VISUAL_STYLE_FULL;
452438
rank = nodeInfo.maxRanks;
453439
elseif nodeSelectionInfo.isPartiallyRanked then

modules/miscFixes.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ local Main = TTT.Main;
55
local Util = TTT.Util;
66
local L = TTT.L;
77

8-
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink;
8+
local ChatEdit_InsertLink = ChatFrameUtil and ChatFrameUtil.InsertLink or ChatEdit_InsertLink;
9+
local GetSpellLink = C_Spell and C_Spell.GetSpellLink or GetSpellLink;
910

1011
--- @class TalentTreeTweaks_MiscFixes: AceModule, AceHook-3.0
1112
local Module = Main:NewModule('MiscFixes', 'AceHook-3.0');

modules/reduceSpam.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ local Main = TTT.Main;
55
local Util = TTT.Util;
66
local L = TTT.L;
77

8+
local ChatFrame_AddMessageEventFilter = ChatFrameUtil and ChatFrameUtil.AddMessageEventFilter or ChatFrame_AddMessageEventFilter
9+
local ChatFrame_RemoveMessageEventFilter = ChatFrameUtil and ChatFrameUtil.RemoveMessageEventFilter or ChatFrame_RemoveMessageEventFilter
10+
11+
--- @class TTT_ReduceSpam: AceModule, AceHook-3.0
812
local Module = Main:NewModule("ReduceSpam", "AceHook-3.0");
913

1014
function Module:OnEnable()

0 commit comments

Comments
 (0)