- Add localized default names for boss units

- Added UNIT_TARGETABLE_CHANGED as a UnitChanged trigger
This commit is contained in:
nebula169
2013-07-30 07:52:54 +00:00
parent b18a7b964c
commit 7f9e912fe2
7 changed files with 16 additions and 2 deletions

View File

@ -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"