Skip to content

Commit

Permalink
Version 2.55
Browse files Browse the repository at this point in the history
  • Loading branch information
dfherr committed Oct 3, 2024
1 parent 1daa917 commit 9d50f86
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v2.55
* update for classic 1.15.4 and cata 4.4.1
* replaced EasyMenu with new Blizzard Menu API

## v2.54
* update for classic 1.15.3

Expand Down
6 changes: 3 additions & 3 deletions ThreatClassic2.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 40400
## Interface-Vanilla: 11502
## Interface: 40401
## Interface-Vanilla: 11504
## Interface-TBC: 20504
## Interface-Wrath: 30403
## Interface-Cata: 40400
Expand All @@ -9,7 +9,7 @@
## X-Curse-Project-ID: 355497
## X-WoWI-ID: 25966
## X-Wago-ID: pkNM1ONz
## Version: 2.54
## Version: 2.55
## SavedVariables: ThreatClassic2DB
## SavedVariablesPerCharacter: TC2_Options

Expand Down
4 changes: 2 additions & 2 deletions ThreatClassic2_Cata.toc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Interface: 40400
## Interface: 40401
## Title: ThreatClassic2
## Notes: Simple threat meter for WoW Classic to Cataclsym.
## Author: Dennis-Florian Herr (dfherr)
## X-Curse-Project-ID: 355497
## X-WoWI-ID: 25966
## X-Wago-ID: pkNM1ONz
## Version: 2.54
## Version: 2.55
## SavedVariables: ThreatClassic2DB
## SavedVariablesPerCharacter: TC2_Options

Expand Down
2 changes: 1 addition & 1 deletion ThreatClassic2_TBC.toc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## X-Curse-Project-ID: 355497
## X-WoWI-ID: 25966
## X-Wago-ID: pkNM1ONz
## Version: 2.54
## Version: 2.55
## SavedVariables: ThreatClassic2DB
## SavedVariablesPerCharacter: TC2_Options

Expand Down
4 changes: 2 additions & 2 deletions ThreatClassic2_Vanilla.toc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Interface: 11503
## Interface: 11504
## Title: ThreatClassic2
## Notes: Simple threat meter for WoW Classic.
## Author: Dennis-Florian Herr (dfherr)
## X-Curse-Project-ID: 355497
## X-WoWI-ID: 25966
## X-Wago-ID: pkNM1ONz
## Version: 2.54
## Version: 2.55
## SavedVariables: ThreatClassic2DB
## SavedVariablesPerCharacter: TC2_Options

Expand Down
2 changes: 1 addition & 1 deletion ThreatClassic2_Wrath.toc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## X-Curse-Project-ID: 355497
## X-WoWI-ID: 25966
## X-Wago-ID: pkNM1ONz
## Version: 2.54
## Version: 2.55
## SavedVariables: ThreatClassic2DB
## SavedVariablesPerCharacter: TC2_Options

Expand Down
38 changes: 15 additions & 23 deletions core/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@ TC2.playerTarget = ""
local AceComm = LibStub("AceComm-3.0")
AceComm:Embed(TC2)

-- depreciation warning for ClassicThreatMeter
C_Timer.After(3,
function()
if IsAddOnLoaded("ClassicThreatMeter") then
print("Please disable |cFFFBB709ClassicThreatMeter|cFFFF6060 to avoid unnecessary syncing that can negatively impact |cFFFBB709ThreatClassic2|cFFFF6060 and other addons.")
end
end
)

local LSM = LibStub("LibSharedMedia-3.0")
-- Register some media
LSM:Register("sound", "You Will Die!", [[Sound\Creature\CThun\CThunYouWillDie.ogg]])
Expand Down Expand Up @@ -286,7 +277,7 @@ function TC2:UpdateThreatBars()
local igniteOwner = nil
local hasActiveIgnite = false
if C.bar.showIgniteIndicator or C.customBarColors.igniteEnabled then
igniteOwner = select(7, FindAuraByName(GetSpellInfo(12848), TC2.playerTarget, "HARMFUL"))
igniteOwner = select(7, FindAuraByName(C_Spell.GetSpellInfo(12848), TC2.playerTarget, "HARMFUL"))
end
-- update view
for i = 1, C.bar.count do
Expand Down Expand Up @@ -923,7 +914,6 @@ function TC2:PLAYER_LOGIN()
self:SetBarCount()
self:SetupUnits()
self:SetupFrame()
self:SetupMenu()

-- Get Colors
TC2.colorFallback = {0.8, 0, 0.8, C.bar.alpha}
Expand Down Expand Up @@ -993,7 +983,7 @@ function TC2:SetupFrame()
self.frame.header = CreateStatusBar(self.frame, true)
self.frame.header:SetScript("OnMouseUp", function(self, button)
if button == "RightButton" then
EasyMenu(TC2.menuTable, TC2.menu, "cursor", 0, 0, "MENU")
MenuUtil.CreateContextMenu(TC2.frame.header, TC2.MenuGenerator)
end
end)
self.frame.header:EnableMouse(true)
Expand All @@ -1005,26 +995,28 @@ function TC2:SetupFrame()
self:UpdateFrame()
end

function TC2:SetupMenu()
self.menu = CreateFrame("Frame", self.addonName.."MenuFrame", UIParent, "UIDropDownMenuTemplate")

TC2.menuTable = {
{text = L.frame_lock, notCheckable = false, checked = function() return C.frame.locked end, func = function()
function TC2.MenuGenerator(owner, rootDescription)
rootDescription:CreateCheckbox(L.frame_lock, function() return C.frame.locked end,
function()
C.frame.locked = not C.frame.locked
TC2:UpdateFrame()
end},
{text = L.frame_test, notCheckable = false, checked = function() return C.frame.test end, func = function()
end
)
rootDescription:CreateCheckbox(L.frame_test, function() return C.frame.test end,
function()
C.frame.test = not C.frame.test
if C.frame.test then
TC2:TestMode()
else
CheckStatus()
end
end},
{text = L.gui_config, notCheckable = true, func = function()
end
)
rootDescription:CreateButton(L.gui_config,
function()
LibStub("AceConfigDialog-3.0"):Open("ThreatClassic2")
end},
}
end
)
end

-----------------------------
Expand Down

0 comments on commit 9d50f86

Please sign in to comment.