Compare commits

...

7 Commits

Author SHA1 Message Date
8d7646c83a Update TOC 2025-04-26 16:41:39 -05:00
4265d57599 Update TOCs 2025-04-02 07:25:05 -05:00
e970a958ac Update TOCs 2025-02-23 14:03:31 -06:00
bde510f09c Update TOCs 2024-12-20 22:18:37 -06:00
0c66028b9d Update TOCs 2024-11-13 08:56:33 -06:00
7a2e432488 fix: https://github.com/ascott18/TellMeWhen/issues/2088 UnitName can rarely return nil on a valid unit 2024-09-07 20:37:43 -07:00
fc9ba7ac27 Fix reported TooltipScanning error from reputation (#16)
I'm not sure why an index that's within range of GetNumFactions would
return nil data from GetFactionDataByIndex, so we probably need to
figure out what's up with that. Maybe the value returned by
GetNumFactions is only a valid input in some other GetFactionDataBy
variant?

Ref:
* https://www.wowace.com/projects/ice-hud/issues/366
* https://www.curseforge.com/projects/5394?comment=7333
2024-08-25 22:44:14 -05:00
3 changed files with 31 additions and 17 deletions

View File

@ -103,7 +103,7 @@ DogTag:AddTag("Unit", "SimpleName", {
arg = {
'unit', 'string;undef', 'player'
},
ret = "string",
ret = "string;nil",
events = "UNIT_NAME_UPDATE#$unit",
doc = L["Return the name of unit"],
example = ('[SimpleName] => %q'):format(UnitName("player")),

View File

@ -28,20 +28,22 @@ if C_Reputation and C_Reputation.GetNumFactions then
local function iter()
for i = 1, GetNumFactions() do
local data = GetFactionDataByIndex(i)
if data.isHeader == 1 then
if data.isCollapsed == 1 then
local NumFactions = GetNumFactions()
ExpandFactionHeader(i)
currentOpenHeader = i
NumFactions = GetNumFactions() - NumFactions
for j = i+1, i+NumFactions do
yield(GetFactionInfo(j))
if data then
if data.isHeader == 1 then
if data.isCollapsed == 1 then
local NumFactions = GetNumFactions()
ExpandFactionHeader(i)
currentOpenHeader = i
NumFactions = GetNumFactions() - NumFactions
for j = i+1, i+NumFactions do
yield(GetFactionInfo(j))
end
CollapseFactionHeader(i)
currentOpenHeader = nil
end
CollapseFactionHeader(i)
currentOpenHeader = nil
else
yield(data.name, data.description, data.reaction, data.currentReactionThreshold, data.nextReactionThreshold, data.currentStanding)
end
else
yield(data.name, data.description, data.reaction, data.currentReactionThreshold, data.nextReactionThreshold, data.currentStanding)
end
end
end

View File

@ -1,9 +1,9 @@
## Interface: 110002
## Interface-Retail: 110002
## Interface-Classic: 11503
## Interface: 110105
## Interface-Retail: 110105
## Interface-Classic: 11507
## Interface-BCC: 20504
## Interface-Wrath: 30403
## Interface-Cata: 40400
## Interface-Cata: 40402
## LoadOnDemand: 1
## Title: Lib: DogTag-Unit-3.0
## Notes: A library to provide unit-oriented tags to LibDogTag-3.0
@ -15,5 +15,17 @@
## X-Curse-Project-ID: 14282
## Dependencies: LibDogTag-3.0
## OptionalDeps: LibDruidMana-1.0, RangeCheck-1.0, LibTalentQuery-1.0
## Category-enUS: Libraries
## Category-deDE: Bibliotheken
## Category-esES: Bibliotecas
## Category-esMX: Bibliotecas
## Category-frFR: Bibliothèques
## Category-itIT:
## Category-koKR:
## Category-ptBR: Bibliotecas
## Category-ruRU: Библиотеки
## Category-zhCN: 函数库
## Category-zhTW: 函式庫
## Group: LibDogTag
lib.xml