Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. local locale = GetLocale()
  2. local classTextFormat =
  3. locale == "deDE" and "Stufe %s %s%s %s" or
  4. locale == "ruRU" and "%2$s%4$s (%3$s)|r %1$s-го уровня" or
  5. locale == "frFR" and "%2$s%4$s %3$s|r de niveau %1$s" or
  6. locale == "koKR" and "%s 레벨 %s%s %s|r" or
  7. locale == "zhCN" and "等级%s %s%s %s|r" or
  8. locale == "zhTW" and "等級%s%s%s%s|r" or
  9. locale == "esES" and "%2$s%4$s %3$s|r de nivel %1$s" or
  10. locale == "ptBR" and "%2$s%4$s (%3$s)|r Nível %1$s" or
  11. "Level %s %s%s %s|r"
  12.  
  13. function mod:PaperDollFrame_SetLevel()
  14. local talentTree = E:GetTalentSpecInfo()
  15. local classDisplayName, class = UnitClass("player")
  16. local classColor = RAID_CLASS_COLORS[class]
  17. local classColorString = format("|cFF%02x%02x%02x", classColor.r*255, classColor.g*255, classColor.b*255)
  18. local specName
  19.  
  20. if talentTree then
  21. specName = GetTalentTabInfo(talentTree)
  22. end
  23.  
  24. if specName and specName ~= "" then
  25. CharacterLevelText:SetFormattedText(classTextFormat, UnitLevel("player"), classColorString, specName, classDisplayName)
  26. else
  27. CharacterLevelText:SetFormattedText(PLAYER_LEVEL, UnitLevel("player"), classColorString, classDisplayName)
  28. end
  29.  
  30. --[[if (CharacterLevelText:GetWidth() > 210) then
  31. if (CharacterFrameInsetRight:IsVisible()) then
  32. CharacterLevelText:SetPoint("TOP", -10, -36)
  33. else
  34. CharacterLevelText:SetPoint("TOP", 10, -36)
  35. end
  36. else
  37. CharacterLevelText:SetPoint("TOP", 0, -36)
  38. end]]
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement