Optimize and standardize tactical data formatting.
This commit is contained in:
parent
3cb2ed503f
commit
b727b537ef
4 changed files with 64 additions and 82 deletions
|
@ -33,6 +33,7 @@ end
|
|||
local function RenderBossTactics(frame, bossName)
|
||||
HideOtherContent()
|
||||
|
||||
local instanceType = 'raidu'
|
||||
local difficulty = 'lfg_raid' -- 17
|
||||
if DIFFICULTY == 14 then
|
||||
difficulty = 'normal_raid'
|
||||
|
@ -42,12 +43,16 @@ local function RenderBossTactics(frame, bossName)
|
|||
difficulty = 'mythic_raid'
|
||||
elseif DIFFICULTY == 1 then
|
||||
difficulty = 'normal_dungeon'
|
||||
instanceType = 'dungeonu'
|
||||
elseif DIFFICULTY == 2 then
|
||||
difficulty = 'heroic_dungeon'
|
||||
instanceType = 'dungeonu'
|
||||
elseif DIFFICULTY == 23 then
|
||||
difficulty = 'mythic_dungeon'
|
||||
instanceType = 'dungeonu'
|
||||
elseif DIFFICULTY == 8 then
|
||||
difficulty = 'mythicplus_dungeon'
|
||||
difficulty = 'mythicplus_dungeon'
|
||||
instanceType = 'dungeonu'
|
||||
end
|
||||
|
||||
local bossData = CzechQuestsAddon:GetData('tactic', bossName)
|
||||
|
@ -63,17 +68,16 @@ local function RenderBossTactics(frame, bossName)
|
|||
local description = ""
|
||||
for _, item in ipairs(data) do
|
||||
description = description
|
||||
.. item.name .. "\n"
|
||||
.. "|cff003366" .. item.description .. "|r "
|
||||
.. "|cff004400" .. item.howTo .. "|r "
|
||||
.. "|cff8b0000" .. item.dangerous .. "|r"
|
||||
.. "|cff003366" .. item[1] .. "|r\n"
|
||||
.. "" .. item[3] .. " "
|
||||
.. "|cff004400" .. item[4] .. "|r"
|
||||
.. "\n\n"
|
||||
end
|
||||
return description
|
||||
end
|
||||
|
||||
frame.summary:SetText(tactic.summary)
|
||||
frame.inform:SetText("|cffffffffVždy dodržuj pokyny raid leadera.|r")
|
||||
frame.inform:SetText("|cffffffffVždy dodržuj pokyny leadera " .. instanceType .. ".|r")
|
||||
|
||||
local tankHeader = frame:CreateHeader()
|
||||
tankHeader.button.title:SetText("Tank")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue