Skip to content

Commit be71393

Browse files
committed
Fixed an error with the [Name] DogTag breaking when LibDogTag-Unit gets upgraded after TMW loads.
1 parent 2dcc250 commit be71393

File tree

5 files changed

+44
-21
lines changed

5 files changed

+44
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v9.0.5
2+
3+
### Bug Fixes
4+
* Fixed an error with the `[Name]` DogTag breaking when LibDogTag-Unit gets upgraded after TMW loads.
5+
* Fixed incorrect labels on Text Display editboxes after changing an icon's text layout.
6+
17
## v9.0.4
28
* New Condition: Torghast Anima Power Count
39
* New Condition: Soulbind Active

Components/Core/Common/PlayerNames.lua

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -226,24 +226,35 @@ end
226226

227227
NAMES:UpdateClassColors()
228228

229-
-- This tag is registered with LibDogTag-Unit-3.0's namespace instead of TMW's namespace because it requires the event processing that is provided by the Unit namespace
230-
DogTag:AddTag("Unit", "TMWName", {
231-
code = function(unit, color, server)
232-
if NAMES.dogTag_forceUncolored then
233-
color = false
234-
end
235-
236-
return NAMES:TryToAcquireName(unit, color, not server)
237-
end,
238-
arg = {
239-
'unit', 'string;undef', 'player',
240-
'color', 'boolean', true,
241-
'server', 'boolean', true,
242-
},
243-
ret = "string",
244-
events = "UNIT_NAME_UPDATE#$unit",
245-
noDoc = true,
246-
})
229+
TMW:RegisterCallback("TMW_GLOBAL_UPDATE", function()
230+
231+
-- This tag is registered with LibDogTag-Unit-3.0's namespace instead of TMW's namespace
232+
-- because it requires the event processing that is provided by the Unit namespace.
233+
234+
-- We re-check for its registration on global update because
235+
-- if another addon (like ThreatPlates) loads LDT-Unit after TMW,
236+
-- and if this other addon has a newer version of LDT-Unit than what
237+
-- was already loaded (by TMW or some other addon),
238+
-- then it'll wipe out this tag when it ugprades itself.
239+
if DogTag.Tags.Unit.TMWName then return end
240+
DogTag:AddTag("Unit", "TMWName", {
241+
code = function(unit, color, server)
242+
if NAMES.dogTag_forceUncolored then
243+
color = false
244+
end
245+
246+
return NAMES:TryToAcquireName(unit, color, not server)
247+
end,
248+
arg = {
249+
'unit', 'string;undef', 'player',
250+
'color', 'boolean', true,
251+
'server', 'boolean', true,
252+
},
253+
ret = "string",
254+
events = "UNIT_NAME_UPDATE#$unit",
255+
noDoc = true,
256+
})
257+
end)
247258
DogTag:AddTag("TMW", "Name", {
248259
alias = "TMWName(unit=unit, color=color, server=server)",
249260
arg = {

Options/CHANGELOG.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ if not TMW then return end
33
TMW.CHANGELOG_LASTVER="7.4.0"
44

55
TMW.CHANGELOG = [==[
6+
## v9.0.5
7+
8+
### Bug Fixes
9+
* Fixed an error with the `[Name]` DogTag breaking when LibDogTag-Unit gets upgraded after TMW loads.
10+
* Fixed incorrect labels on Text Display editboxes after changing an icon's text layout.
11+
612
## v9.0.4
713
* New Condition: Torghast Anima Power Count
814
* New Condition: Soulbind Active

TellMeWhen.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if wow_classic then
3333
return
3434
end
3535

36-
TELLMEWHEN_VERSION = "9.0.4"
36+
TELLMEWHEN_VERSION = "9.0.5"
3737

3838
TELLMEWHEN_VERSION_MINOR = ""
3939
local projectVersion = "@project-version@" -- comes out like "6.2.2-21-g4e91cee"
@@ -44,7 +44,7 @@ elseif strmatch(projectVersion, "%-%d+%-") then
4444
end
4545

4646
TELLMEWHEN_VERSION_FULL = TELLMEWHEN_VERSION .. " " .. TELLMEWHEN_VERSION_MINOR
47-
TELLMEWHEN_VERSIONNUMBER = 90403 -- NEVER DECREASE THIS NUMBER (duh?). IT IS ALSO ONLY INTERNAL (for versioning of)
47+
TELLMEWHEN_VERSIONNUMBER = 90501 -- NEVER DECREASE THIS NUMBER (duh?). IT IS ALSO ONLY INTERNAL (for versioning of)
4848

4949
TELLMEWHEN_FORCECHANGELOG = 86005 -- if the user hasn't seen the changelog until at least this version, show it to them.
5050

TellMeWhen.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
## X-Curse-Project-ID: 8025
2121
## X-WoWI-ID: 10855
2222

23-
## Version: 9.0.4
23+
## Version: 9.0.5
2424
## Author: Cybeloras of Aerie Peak
2525

2626
## Notes: Provides visual, auditory, and textual notifications about cooldowns, buffs, and pretty much every other element of combat.

0 commit comments

Comments
 (0)