mirror of
https://github.com/parnic/LibDogTag-Unit-3.0.git
synced 2025-06-16 21:41:53 -05:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d7646c83a | |||
4265d57599
|
|||
e970a958ac | |||
bde510f09c | |||
0c66028b9d | |||
7a2e432488 | |||
fc9ba7ac27 | |||
7cf02c9037 |
@ -8,6 +8,17 @@ end
|
||||
local select, pairs, rawget, GetTime, setmetatable = select, pairs, rawget, GetTime, setmetatable
|
||||
local UnitAura, UnitIsFriend, UnitClass, UnitPowerType =
|
||||
UnitAura, UnitIsFriend, UnitClass, UnitPowerType
|
||||
|
||||
if not UnitAura and C_UnitAuras and C_UnitAuras.GetAuraDataByIndex then
|
||||
UnitAura = function(unitToken, index, filter)
|
||||
local auraData = C_UnitAuras.GetAuraDataByIndex(unitToken, index, filter)
|
||||
if not auraData then
|
||||
return nil
|
||||
end
|
||||
|
||||
return AuraUtil.UnpackAuraData(auraData)
|
||||
end
|
||||
end
|
||||
|
||||
-- GetSpellInfo removed in WoW 11.0
|
||||
local GetSpellName = C_Spell and C_Spell.GetSpellName or GetSpellInfo
|
||||
|
@ -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")),
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user