Add role message on login. (#7)

This commit is contained in:
salt-die
2022-10-31 20:27:19 -05:00
committed by GitHub
parent c1146d473d
commit 8f4463b46a
3 changed files with 6 additions and 15 deletions
+3 -8
View File
@@ -13,7 +13,7 @@ local UnitGroupRolesAssigned = UnitGroupRolesAssigned
local UnitHasVehicleUI = UnitHasVehicleUI
local IsInInstance = IsInInstance
E.Role = "Melee" -- TODO: Load locally, or save per specialization.
E.Role = "Melee" -- TODO: Save per specialization?
do -- other non-english locales require this
E.UnlocalizedClasses = {}
@@ -45,13 +45,8 @@ function E:ScanTooltipTextures(clean, grabTextures)
end
function E:GetPlayerRole()
local isTank, isHealer, isDamage = UnitGroupRolesAssigned("player")
if isTank or isHealer or isDamage then
return isTank and "TANK" or isHealer and "HEALER" or isDamage and "DAMAGER"
else
return "DAMAGER" -- Assume dps role; Nothing better for ascension.
end
local isTank, isHealer, _ = UnitGroupRolesAssigned("player")
return isTank and "TANK" or isHealer and "HEALER" or "DAMAGER"
end
do