mirror of
https://github.com/parnic/LibDogTag-Unit-3.0.git
synced 2025-06-16 21:41:53 -05:00
- Add localized default names for boss units
- Added UNIT_TARGETABLE_CHANGED as a UnitChanged trigger
This commit is contained in:
@ -100,6 +100,10 @@ setmetatable(UnitToLocale, {__index=function(self, unit)
|
||||
local num = unit:match("^raid(%d%d?)$")
|
||||
self[unit] = L["Raid member #%d"]:format(num)
|
||||
return self[unit]
|
||||
elseif unit:find("^boss%d$") then
|
||||
local num = unit:match("^boss(%d)$")
|
||||
self[unit] = L["Boss #%d"]:format(num)
|
||||
return self[unit]
|
||||
elseif unit:find("^partypet%d$") then
|
||||
local num = unit:match("^partypet(%d)$")
|
||||
self[unit] = UnitToLocale["party" .. num .. "pet"]
|
||||
@ -432,6 +436,11 @@ DogTag:AddEventHandler("Unit", "UNIT_TARGET", function(event, unit)
|
||||
DogTag:FireEvent("UnitChanged", unit .. "target")
|
||||
end)
|
||||
|
||||
DogTag:AddEventHandler("Unit", "UNIT_TARGETABLE_CHANGED", function(event, unit)
|
||||
refreshGUID(unit)
|
||||
DogTag:FireEvent("UnitChanged", unit)
|
||||
end)
|
||||
|
||||
DogTag:AddEventHandler("Unit", "UNIT_PET", function(event, unit)
|
||||
if unit == "player" then unit = "" end
|
||||
local unit_pet = unit .. "pet"
|
||||
|
Reference in New Issue
Block a user