- testing the mercurial repo packpager.
This commit is contained in:
+57
-9
@@ -18,6 +18,28 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the full table with all data for the instance
|
||||
function _detalhes:GetRaidInfoFromEncounterID (encounterID, encounterEJID)
|
||||
for id, raidTable in pairs (_detalhes.EncounterInformation) do
|
||||
if (encounterID) then
|
||||
local ids = raidTable.encounter_ids2 --combatlog
|
||||
if (ids) then
|
||||
if (ids [encounterID]) then
|
||||
return raidTable
|
||||
end
|
||||
end
|
||||
end
|
||||
if (encounterEJID) then
|
||||
local ejids = raidTable.encounter_ids --encounter journal
|
||||
if (ejids) then
|
||||
if (ejids [encounterEJID]) then
|
||||
return raidTable
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> return the ids of trash mobs in the instance
|
||||
function _detalhes:GetInstanceTrashInfo (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].trash_ids
|
||||
@@ -213,8 +235,24 @@ do
|
||||
end
|
||||
end
|
||||
--> return the icon for the raid instance
|
||||
function _detalhes:GetRaidIcon (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].icon
|
||||
function _detalhes:GetRaidIcon (mapid, ejID, instanceType)
|
||||
local raidIcon = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].icon
|
||||
if (raidIcon) then
|
||||
return raidIcon
|
||||
end
|
||||
|
||||
if (ejID and ejID ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ejID)
|
||||
if (name) then
|
||||
if (instanceType == "party") then
|
||||
return loreImage --bgImage
|
||||
elseif (instanceType == "raid") then
|
||||
return loreImage
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--> return the boss icon
|
||||
@@ -227,15 +265,25 @@ do
|
||||
end
|
||||
|
||||
--> return the boss portrit
|
||||
function _detalhes:GetBossPortrait (mapid, bossindex)
|
||||
function _detalhes:GetBossPortrait (mapid, bossindex, encounterName, ejID)
|
||||
if (mapid and bossindex) then
|
||||
--print (_detalhes.EncounterInformation [mapid])
|
||||
--print (_detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters)
|
||||
--print (_detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters and _detalhes.EncounterInformation [mapid].encounters [bossindex])
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
|
||||
else
|
||||
return false
|
||||
local haveIcon = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
|
||||
if (haveIcon) then
|
||||
return haveIcon
|
||||
end
|
||||
end
|
||||
|
||||
if (encounterName and ejID and ejID ~= 0) then
|
||||
local index, name, description, encounterID, rootSectionID, link = _detalhes:GetEncounterInfoFromEncounterName (ejID, encounterName)
|
||||
if (index and name and encounterID) then
|
||||
local id, name, description, displayInfo, iconImage = EJ_GetCreatureInfo (1, encounterID)
|
||||
if (iconImage) then
|
||||
return iconImage
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--> return a list with names of adds and bosses
|
||||
|
||||
+340
-86
@@ -683,7 +683,7 @@
|
||||
["custom"] = "aura_env.reimaningTime = 5",
|
||||
},
|
||||
},
|
||||
["cooldown"] = true,
|
||||
["cooldown"] = false,
|
||||
["stacksContainment"] = "OUTSIDE",
|
||||
["zoom"] = 0.3,
|
||||
["auto"] = true,
|
||||
@@ -1252,7 +1252,7 @@
|
||||
},
|
||||
}
|
||||
|
||||
function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
|
||||
function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values, in_combat, cooldown_animation)
|
||||
|
||||
--print (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
|
||||
|
||||
@@ -1314,6 +1314,13 @@
|
||||
--> size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
|
||||
elseif (target == 42) then -- dispell
|
||||
|
||||
chat = nil
|
||||
@@ -1353,7 +1360,14 @@
|
||||
--> size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
|
||||
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then --boss mods
|
||||
|
||||
--> create the default aura table
|
||||
if (aura_type == "icon") then
|
||||
@@ -1529,6 +1543,13 @@
|
||||
end
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
else
|
||||
new_aura.trigger.spellId = tostring (spellid)
|
||||
new_aura.trigger.name = spellname
|
||||
@@ -1620,9 +1641,37 @@
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
if (cooldown_animation) then
|
||||
new_aura.cooldown = true
|
||||
new_aura.cooldownTextEnabled = true
|
||||
end
|
||||
|
||||
--> add the aura on a group
|
||||
if (group) then
|
||||
new_aura.parent = group
|
||||
|
||||
if (new_aura.regionType == "icon") then
|
||||
--> adjust the width and height of the new aura following the existing auras on the group
|
||||
local normalWidth, normalHeight, amount = 0, 0, 0
|
||||
local allAurasInTheGroup = WeakAurasSaved.displays [group].controlledChildren
|
||||
|
||||
for index, auraname in ipairs (allAurasInTheGroup) do
|
||||
local auraObject = WeakAurasSaved.displays [auraname]
|
||||
if (auraObject and auraObject.regionType == "icon") then
|
||||
amount = amount + 1
|
||||
normalWidth = normalWidth + auraObject.width
|
||||
normalHeight = normalHeight + auraObject.height
|
||||
end
|
||||
end
|
||||
|
||||
if (normalWidth > 0) then
|
||||
normalWidth = normalWidth / amount
|
||||
normalHeight = normalHeight / amount
|
||||
new_aura.width = normalWidth
|
||||
new_aura.height = normalHeight
|
||||
end
|
||||
end
|
||||
|
||||
tinsert (WeakAurasSaved.displays [group].controlledChildren, new_aura.id)
|
||||
else
|
||||
new_aura.parent = nil
|
||||
@@ -1679,41 +1728,64 @@
|
||||
end
|
||||
end
|
||||
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent, "ButtonFrameTemplate")
|
||||
f:SetSize (600, 488)
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent)
|
||||
f:SetSize (800, 600)
|
||||
f:SetPoint ("center", UIParent, "center", 0, 150)
|
||||
f:SetFrameStrata ("HIGH")
|
||||
f:SetToplevel (true)
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetToplevel (true)
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
tinsert (UISpecialFrames, "DetailsAuraPanel")
|
||||
--register to libwindow
|
||||
local LibWindow = LibStub ("LibWindow-1.1")
|
||||
LibWindow.RegisterConfig (f, _detalhes.createauraframe)
|
||||
LibWindow.RestorePosition (f)
|
||||
LibWindow.MakeDraggable (f)
|
||||
LibWindow.SavePosition (f)
|
||||
|
||||
f:SetScript ("OnMouseDown", function(self, button)
|
||||
if (self.isMoving) then
|
||||
return
|
||||
end
|
||||
if (button == "RightButton") then
|
||||
self:Hide()
|
||||
else
|
||||
self:StartMoving()
|
||||
self.isMoving = true
|
||||
end
|
||||
end)
|
||||
f:SetScript ("OnMouseUp", function(self, button)
|
||||
if (self.isMoving and button == "LeftButton") then
|
||||
self:StopMovingOrSizing()
|
||||
self.isMoving = nil
|
||||
end
|
||||
end)
|
||||
--titlebar
|
||||
f.TitleBar = CreateFrame ("frame", "$parentTitleBar", f)
|
||||
f.TitleBar:SetPoint ("topleft", f, "topleft", 2, -3)
|
||||
f.TitleBar:SetPoint ("topright", f, "topright", -2, -3)
|
||||
f.TitleBar:SetHeight (20)
|
||||
f.TitleBar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.TitleBar:SetBackdropColor (.2, .2, .2, 1)
|
||||
f.TitleBar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
f.TitleText:SetText ("Create Aura")
|
||||
f.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
|
||||
--close button
|
||||
f.Close = CreateFrame ("button", "$parentCloseButton", f)
|
||||
f.Close:SetPoint ("right", f.TitleBar, "right", -2, 0)
|
||||
f.Close:SetSize (16, 16)
|
||||
f.Close:SetNormalTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close:SetHighlightTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close:SetPushedTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:SetAlpha (0.7)
|
||||
f.Close:SetScript ("OnClick", function() f:Hide() end)
|
||||
|
||||
--title
|
||||
f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
|
||||
f.Title:SetPoint ("center", f.TitleBar, "center")
|
||||
f.Title:SetTextColor (.8, .8, .8, 1)
|
||||
f.Title:SetText ("Details! Create Aura")
|
||||
|
||||
local fw = _detalhes:GetFramework()
|
||||
|
||||
local text_template = fw:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local dropdown_template = fw:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local switch_template = fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
local slider_template = fw:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local button_template = fw:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
--aura name
|
||||
local name_label = fw:CreateLabel (f, "Aura Name: ", nil, nil, "GameFontNormal")
|
||||
local name_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraName", "$parentAuraName")
|
||||
name_textentry:SetTemplate (slider_template)
|
||||
name_textentry:SetPoint ("left", name_label, "right", 2, 0)
|
||||
f.name = name_textentry
|
||||
|
||||
@@ -1734,40 +1806,86 @@
|
||||
local aura_type = fw:CreateDropDown (f, aura_type_options, 1, 150, 20, "AuraTypeDropdown", "$parentAuraTypeDropdown")
|
||||
local aura_type_label = fw:CreateLabel (f, "Aura Type: ", nil, nil, "GameFontNormal")
|
||||
aura_type:SetPoint ("left", aura_type_label, "right", 2, 0)
|
||||
aura_type:Hide()
|
||||
|
||||
--spellname
|
||||
local spellname_label = fw:CreateLabel (f, "Spell Name: ", nil, nil, "GameFontNormal")
|
||||
local spellname_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SpellName", "$parentSpellName")
|
||||
spellname_textentry:SetPoint ("left", spellname_label, "right", 2, 0)
|
||||
f.spellname = spellname_textentry
|
||||
spellname_textentry.tooltip = "Spell/Debuff/Buff to be tracked."
|
||||
local Icon_IconAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {119/512, 151/512, 176/512, 208/512}, nil, nil)
|
||||
Icon_IconAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 10, -16)
|
||||
|
||||
--spellid
|
||||
local auraid_label = fw:CreateLabel (f, "Spell Id: ", nil, nil, "GameFontNormal")
|
||||
local auraid_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraSpellId", "$parentAuraSpellId")
|
||||
auraid_textentry:Disable()
|
||||
auraid_textentry:SetPoint ("left", auraid_label, "right", 2, 0)
|
||||
local Icon_StatusbarAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {154/512, 246/512, 176/512, 188/512}, nil, nil)
|
||||
Icon_StatusbarAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 60, -26)
|
||||
|
||||
local Icon_TextOnlyAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {169/512, 225/512, 200/512, 207/512}, nil, nil)
|
||||
Icon_TextOnlyAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 170, -28)
|
||||
|
||||
--use spellid
|
||||
local usespellid_label = fw:CreateLabel (f, "Use SpellId: ", nil, nil, "GameFontNormal")
|
||||
local aura_use_spellid = fw:CreateSwitch (f, function(_, _, state) if (state) then auraid_textentry:Enable() else auraid_textentry:Disable() end end, false, nil, nil, nil, nil, "UseSpellId")
|
||||
aura_use_spellid:SetPoint ("left", usespellid_label, "right", 2, 0)
|
||||
aura_use_spellid.tooltip = "Use the spell id instead of the spell name, for advanced users."
|
||||
local AuraTypeSelectedColor = {1, 1, 1, 0.3}
|
||||
local AuraTypeBorderColor = {.3, .3, .3, 0.5}
|
||||
local AuraTypeBorderSelectedColor = {1, 1, 1, 0.4}
|
||||
|
||||
--aura icon
|
||||
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_button_func = function (texture)
|
||||
f.IconButton.icon.texture = texture
|
||||
local OnSelectAuraType = function (self, fixedParam, auraType, noUpdate)
|
||||
|
||||
if (type (auraType) == "number") then
|
||||
if (auraType == 1) then
|
||||
auraType = "icon"
|
||||
elseif (auraType == 2) then
|
||||
auraType = "text"
|
||||
elseif (auraType == 3) then
|
||||
auraType = "aurabar"
|
||||
end
|
||||
end
|
||||
|
||||
f.IconAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
|
||||
f.IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
|
||||
if (auraType == "icon") then
|
||||
f.IconAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
elseif (auraType == "aurabar") then
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
elseif (auraType == "text") then
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
end
|
||||
|
||||
aura_type:SetValue (auraType)
|
||||
if (f.UpdateLabels and not noUpdate) then
|
||||
f:UpdateLabels()
|
||||
end
|
||||
end
|
||||
local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end)
|
||||
local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
icon_pick_button:InstallCustomTexture()
|
||||
f.OnSelectAuraType = OnSelectAuraType
|
||||
|
||||
icon_pick_button:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
icon_button_icon:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
local AuraTypeBackground = f:CreateTexture (nil, "border")
|
||||
AuraTypeBackground:SetColorTexture (.4, .4, .4, .1)
|
||||
AuraTypeBackground:SetHeight (64)
|
||||
AuraTypeBackground:SetPoint ("topleft", f, "topleft", 10, -79)
|
||||
AuraTypeBackground:SetPoint ("topright", f, "topright", -10, -79)
|
||||
|
||||
f.icon = icon_button_icon
|
||||
local Icon_IconAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 46, 46, "", "icon", nil, nil, "IconAuraTypeButton")
|
||||
local Icon_StatusbarAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 100, 46, "", "aurabar", nil, nil, "StatusbarAuraTypeButton")
|
||||
local Icon_TextOnlyAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 69, 46, "", "text", nil, nil, "TextOnlyAuraTypeButton")
|
||||
|
||||
Icon_IconAuraTypeButton:SetPoint ("center", Icon_IconAuraType, "center")
|
||||
Icon_StatusbarAuraTypeButton:SetPoint ("center", Icon_StatusbarAuraType, "center")
|
||||
Icon_TextOnlyAuraTypeButton:SetPoint ("center", Icon_TextOnlyAuraType, "center")
|
||||
|
||||
Icon_IconAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_IconAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
Icon_IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
|
||||
Icon_StatusbarAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_StatusbarAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
Icon_StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
|
||||
--trigger list
|
||||
--target
|
||||
local on_select_aura_trigger = function (_, _, aura_trigger)
|
||||
if (f.UpdateLabels) then
|
||||
@@ -1798,13 +1916,122 @@
|
||||
return aura_on_table
|
||||
end
|
||||
local aura_on = fw:CreateDropDown (f, aura_on_options, 1, 150, 20, "AuraOnDropdown", "$parentAuraOnDropdown")
|
||||
local aura_on_label = fw:CreateLabel (f, "Trigger: ", nil, nil, "GameFontNormal")
|
||||
local aura_on_label = fw:CreateLabel (f, "Trigger On: ", nil, nil, "GameFontNormal")
|
||||
aura_on:SetPoint ("left", aura_on_label, "right", 2, 0)
|
||||
aura_on:Hide()
|
||||
|
||||
local triggerList = {
|
||||
{name = "Debuff on You", value = 1},
|
||||
{name = "Debuff on Target", value = 2}, --2
|
||||
{name = "Debuff on Focus", value = 3},
|
||||
{name = "Buff on You", value = 11}, --4
|
||||
{name = "Buff on Target", value = 12},
|
||||
{name = "Buff on Focus", value = 13},
|
||||
{name = "Spell Cast Started", value = 21},
|
||||
{name = "Spell Cast Successful", value = 22},
|
||||
{name = "DBM Time Bar", value = 31},
|
||||
{name = "BigWigs Time Bar", value = 32},
|
||||
{name = "Spell Interrupt", value = 41},
|
||||
{name = "Spell Dispell", value = 42},
|
||||
}
|
||||
|
||||
local SetTriggerState = function (triggerID)
|
||||
for i = 1, #triggerList do
|
||||
triggerList[i].checkBox:SetValue (false)
|
||||
if (triggerList[i].value == triggerID) then
|
||||
triggerList[i].checkBox:SetValue (true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
f.SetTriggerState = SetTriggerState
|
||||
f.TriggerList = triggerList
|
||||
|
||||
local OnChangeTriggerState = function (self, triggerID, state)
|
||||
SetTriggerState (triggerID)
|
||||
aura_on:SetValue (triggerID)
|
||||
|
||||
if (f.UpdateLabels) then
|
||||
f:UpdateLabels()
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, #triggerList do
|
||||
local checkBox = fw:CreateSwitch (f, OnChangeTriggerState, i == 1)
|
||||
checkBox:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
checkBox:SetAsCheckBox()
|
||||
checkBox:SetFixedParameter (triggerList [i].value)
|
||||
|
||||
checkBox:SetSize (20, 20)
|
||||
checkBox:SetPoint ("topleft", aura_on_label, "bottomleft", 0, 12 + (-i*20))
|
||||
local label = fw:CreateLabel (f, triggerList [i].name)
|
||||
label:SetPoint ("left", checkBox, "right", 2, 0)
|
||||
|
||||
triggerList [i].checkBox = checkBox
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--spellname
|
||||
local spellname_label = fw:CreateLabel (f, "Spell Name: ", nil, nil, "GameFontNormal")
|
||||
local spellname_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SpellName", "$parentSpellName")
|
||||
spellname_textentry:SetTemplate (slider_template)
|
||||
spellname_textentry:SetPoint ("left", spellname_label, "right", 2, 0)
|
||||
f.spellname = spellname_textentry
|
||||
spellname_textentry.tooltip = "Spell/Debuff/Buff to be tracked."
|
||||
|
||||
--spellid
|
||||
local auraid_label = fw:CreateLabel (f, "Spell Id: ", nil, nil, "GameFontNormal")
|
||||
local auraid_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraSpellId", "$parentAuraSpellId")
|
||||
auraid_textentry:SetTemplate (slider_template)
|
||||
auraid_textentry:Disable()
|
||||
auraid_textentry:SetPoint ("left", auraid_label, "right", 2, 0)
|
||||
|
||||
--use spellid
|
||||
local usespellid_label = fw:CreateLabel (f, "Use SpellId: ", nil, nil, "GameFontNormal")
|
||||
local aura_use_spellid = fw:CreateSwitch (f, function(_, _, state) if (state) then auraid_textentry:Enable() else auraid_textentry:Disable() end end, false, nil, nil, nil, nil, "UseSpellId")
|
||||
aura_use_spellid:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_use_spellid:SetAsCheckBox()
|
||||
|
||||
aura_use_spellid:SetPoint ("left", usespellid_label, "right", 2, 0)
|
||||
aura_use_spellid.tooltip = "Use the spell id instead of the spell name, for advanced users."
|
||||
|
||||
--in combat only
|
||||
local incombat_label = fw:CreateLabel (f, "Only in Combat: ", nil, nil, "GameFontNormal")
|
||||
local aura_incombat = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "UseInCombat")
|
||||
aura_incombat:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_incombat:SetAsCheckBox()
|
||||
aura_incombat:SetPoint ("left", incombat_label, "right", 2, 0)
|
||||
aura_incombat.tooltip = "Only active when in combat."
|
||||
|
||||
--aura icon
|
||||
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_button_func = function (texture)
|
||||
f.IconButton.icon.texture = texture
|
||||
end
|
||||
local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end)
|
||||
local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
icon_pick_button:InstallCustomTexture()
|
||||
|
||||
icon_pick_button:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
icon_button_icon:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
|
||||
f.icon = icon_button_icon
|
||||
|
||||
--is cooldown
|
||||
local iscooldown_label = fw:CreateLabel (f, "Cooldown Animation: ", nil, nil, "GameFontNormal")
|
||||
local aura_iscooldown = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "IsCooldown")
|
||||
aura_iscooldown:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_iscooldown:SetAsCheckBox()
|
||||
aura_iscooldown:SetPoint ("left", iscooldown_label, "right", 2, 0)
|
||||
aura_iscooldown.tooltip = "Only active when in combat."
|
||||
|
||||
--stack
|
||||
local stack_slider = fw:NewSlider (f, f, "$parentStackSlider", "StackSlider", 150, 20, 0, 30, 1, 0, true)
|
||||
stack_slider.useDecimals = true
|
||||
local stack_label = fw:CreateLabel (f, "Stack Size: ", nil, nil, "GameFontNormal")
|
||||
stack_slider:SetTemplate (slider_template)
|
||||
local stack_label = fw:CreateLabel (f, "Trigger Stack Size: ", nil, nil, "GameFontNormal")
|
||||
stack_slider:SetPoint ("left", stack_label, "right", 2, 0)
|
||||
stack_slider.tooltip = "Minimum amount of stacks to trigger the aura."
|
||||
|
||||
@@ -1898,19 +2125,22 @@
|
||||
return t
|
||||
end
|
||||
local sound_effect = fw:CreateDropDown (f, sound_options, 1, 150, 20, "SoundEffectDropdown", "$parentSoundEffectDropdown")
|
||||
sound_effect:SetTemplate (slider_template)
|
||||
local sound_effect_label = fw:CreateLabel (f, "Play Sound: ", nil, nil, "GameFontNormal")
|
||||
sound_effect:SetPoint ("left", sound_effect_label, "right", 2, 0)
|
||||
sound_effect.tooltip = "Sound played when the aura triggers."
|
||||
|
||||
--say something
|
||||
local say_something_label = fw:CreateLabel (f, "/Say: ", nil, nil, "GameFontNormal")
|
||||
local say_something_label = fw:CreateLabel (f, "/Say on Trigger: ", nil, nil, "GameFontNormal")
|
||||
local say_something = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SaySomething", "$parentSaySomething")
|
||||
say_something:SetTemplate (slider_template)
|
||||
say_something:SetPoint ("left", say_something_label, "right", 2, 0)
|
||||
say_something.tooltip = "Your character /say this phrase when the aura triggers."
|
||||
|
||||
--aura text
|
||||
local aura_text_label = fw:CreateLabel (f, "Aura Text: ", nil, nil, "GameFontNormal")
|
||||
local aura_text = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraText", "$parentAuraText")
|
||||
aura_text:SetTemplate (slider_template)
|
||||
aura_text:SetPoint ("left", aura_text_label, "right", 2, 0)
|
||||
aura_text.tooltip = "Text shown at aura's icon right side."
|
||||
|
||||
@@ -1926,6 +2156,10 @@
|
||||
self.glow_test.animOut:Play()
|
||||
end
|
||||
end, false, nil, nil, nil, nil, "UseGlow")
|
||||
|
||||
useglow:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
useglow:SetAsCheckBox()
|
||||
|
||||
useglow:SetPoint ("left", useglow_label, "right", 2, 0)
|
||||
useglow.tooltip = "Do not rename the aura on WeakAuras options panel or the glow effect may not work."
|
||||
|
||||
@@ -1937,12 +2171,14 @@
|
||||
--encounter id
|
||||
local encounterid_label = fw:CreateLabel (f, "Encounter ID: ", nil, nil, "GameFontNormal")
|
||||
local encounterid = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "EncounterIdText", "$parentEncounterIdText")
|
||||
encounterid:SetTemplate (slider_template)
|
||||
encounterid:SetPoint ("left", encounterid_label, "right", 2, 0)
|
||||
encounterid.tooltip = "Only load this aura for this raid encounter."
|
||||
|
||||
--size
|
||||
local icon_size_slider = fw:NewSlider (f, f, "$parentIconSizeSlider", "IconSizeSlider", 150, 20, 8, 256, 1, 64)
|
||||
local icon_size_label = fw:CreateLabel (f, "Size: ", nil, nil, "GameFontNormal")
|
||||
icon_size_slider:SetTemplate (slider_template)
|
||||
icon_size_slider:SetPoint ("left", icon_size_label, "right", 2, 0)
|
||||
icon_size_slider.tooltip = "Icon size, width and height."
|
||||
|
||||
@@ -1955,6 +2191,7 @@
|
||||
return t
|
||||
end
|
||||
local aura_addon = fw:CreateDropDown (f, addon_options, 1, 150, 20, "AuraAddonDropdown", "$parentAuraAddonDropdown")
|
||||
aura_addon:SetTemplate (slider_template)
|
||||
local aura_addon_label = fw:CreateLabel (f, "Addon: ", nil, nil, "GameFontNormal")
|
||||
aura_addon:SetPoint ("left", aura_addon_label, "right", 2, 0)
|
||||
|
||||
@@ -1982,6 +2219,7 @@
|
||||
|
||||
local weakauras_folder_label = fw:CreateLabel (f, "Weak Auras Group: ", nil, nil, "GameFontNormal")
|
||||
local weakauras_folder = fw:CreateDropDown (f, weakauras_folder_options, 1, 150, 20, "WeakaurasFolderDropdown", "$parentWeakaurasFolder")
|
||||
weakauras_folder:SetTemplate (slider_template)
|
||||
weakauras_folder:SetPoint ("left", weakauras_folder_label, "right", 2, 0)
|
||||
|
||||
--create
|
||||
@@ -2000,6 +2238,8 @@
|
||||
local addon = f.AuraAddonDropdown.value
|
||||
local folder = f.WeakaurasFolderDropdown.value
|
||||
local iconsize = f.IconSizeSlider.value
|
||||
local incombat = f.UseInCombat.value
|
||||
local iscooldown = f.IsCooldown.value
|
||||
|
||||
local icon_text = f.AuraText.text
|
||||
local icon_glow = f.UseGlow.value
|
||||
@@ -2010,7 +2250,7 @@
|
||||
end
|
||||
|
||||
if (addon == "WA") then
|
||||
_detalhes:CreateWeakAura (aura_type_value, spellid, use_spellId, spellname, name, icon, target, stacksize, sound, chat, icon_text, icon_glow, eid, folder, iconsize, f.other_values)
|
||||
_detalhes:CreateWeakAura (aura_type_value, spellid, use_spellId, spellname, name, icon, target, stacksize, sound, chat, icon_text, icon_glow, eid, folder, iconsize, f.other_values, incombat, iscooldown)
|
||||
else
|
||||
_detalhes:Msg ("No Aura Addon selected. Addons currently supported: WeakAuras 2.")
|
||||
end
|
||||
@@ -2018,46 +2258,48 @@
|
||||
f:Hide()
|
||||
end
|
||||
|
||||
local create_button = fw:CreateButton (f, create_func, 106, 16, "Create Aura")
|
||||
create_button:InstallCustomTexture()
|
||||
local create_button = fw:CreateButton (f, create_func, 106, 20, "Create Aura")
|
||||
create_button:SetTemplate (slider_template)
|
||||
|
||||
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 16, "Cancel")
|
||||
cancel_button:InstallCustomTexture()
|
||||
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 20, "Cancel")
|
||||
cancel_button:SetTemplate (slider_template)
|
||||
|
||||
create_button:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
|
||||
cancel_button:SetIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
|
||||
|
||||
local x_start = 20
|
||||
local x2_start = 320
|
||||
local x2_start = 420
|
||||
local y_start = 21
|
||||
|
||||
|
||||
--aura name and the type
|
||||
name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (50)) * -1)
|
||||
aura_type_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (50)) * -1)
|
||||
name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (25)) * -1)
|
||||
aura_type_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (25)) * -1)
|
||||
|
||||
--triggers
|
||||
aura_on_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (45)) * -1)
|
||||
stack_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*5) + (45)) * -1)
|
||||
encounterid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*6) + (45)) * -1)
|
||||
aura_on_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (65)) * -1)
|
||||
stack_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*17) + (65)) * -1)
|
||||
encounterid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*18) + (65)) * -1)
|
||||
|
||||
--about the spell
|
||||
spellname_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*8) + (45)) * -1)
|
||||
auraid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*9) + (45)) * -1)
|
||||
usespellid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*10) + (45)) * -1)
|
||||
|
||||
--configuration
|
||||
icon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*1) + (50)) * -1)
|
||||
sound_effect_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*2) + (50)) * -1)
|
||||
say_something_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*3) + (50)) * -1)
|
||||
aura_text_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*4) + (50)) * -1)
|
||||
useglow_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*5) + (50)) * -1)
|
||||
icon_size_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*6) + (50)) * -1)
|
||||
|
||||
aura_addon_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*15) + (60)) * -1)
|
||||
weakauras_folder_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*16) + (60)) * -1)
|
||||
spellname_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*20) + (45)) * -1)
|
||||
usespellid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*21) + (45)) * -1)
|
||||
auraid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*22) + (45)) * -1)
|
||||
incombat_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*23) + (45)) * -1)
|
||||
|
||||
create_button:SetPoint ("topleft", f, "topleft", x_start, ((y_start*18) + (60)) * -1)
|
||||
cancel_button:SetPoint ("topright", f, "topright", x_start*-1, ((y_start*18) + (60)) * -1)
|
||||
--configuration
|
||||
icon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*6) + (47)) * -1)
|
||||
sound_effect_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*7) + (47)) * -1)
|
||||
say_something_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*8) + (47)) * -1)
|
||||
aura_text_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*9) + (47)) * -1)
|
||||
useglow_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*10) + (47)) * -1)
|
||||
iscooldown_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*11) + (47)) * -1)
|
||||
icon_size_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*12) + (47)) * -1)
|
||||
|
||||
aura_addon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*20) + (60)) * -1)
|
||||
weakauras_folder_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
|
||||
|
||||
create_button:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*23) + (60)) * -1)
|
||||
cancel_button:SetPoint ("left", create_button, "right", 20, 0)
|
||||
|
||||
function f:UpdateLabels()
|
||||
|
||||
@@ -2081,6 +2323,7 @@
|
||||
f.AuraText:SetText ("")
|
||||
aura_text_label.text = "Aura Text: "
|
||||
f.UseGlow:Enable()
|
||||
f.IsCooldown:Enable()
|
||||
|
||||
if (aura_type == "icon") then
|
||||
aura_text_label:SetText ("Icon Text: ")
|
||||
@@ -2091,22 +2334,24 @@
|
||||
aura_text_label:SetText ("Text: ")
|
||||
icon_size_label:SetText ("Font Size: ")
|
||||
f.IconSizeSlider:SetValue (12)
|
||||
f.IsCooldown:Disable()
|
||||
|
||||
elseif (aura_type == "aurabar") then
|
||||
aura_text_label:SetText ("Left Text: ")
|
||||
icon_size_label:SetText ("Bar Width: ")
|
||||
f.IconSizeSlider:SetValue (250)
|
||||
f.IsCooldown:Disable()
|
||||
end
|
||||
|
||||
if (trigger >= 1 and trigger <= 19) then --buff and debuff
|
||||
stack_label:SetText ("Stack Size: ")
|
||||
stack_label:SetText ("Trigger Stack Size: ")
|
||||
|
||||
elseif (trigger >= 20 and trigger <= 29) then --cast end cast start
|
||||
stack_label:SetText ("Duration: ")
|
||||
stack_label:SetText ("Cast Duration: ")
|
||||
f.StackSlider:SetValue (2)
|
||||
|
||||
elseif (trigger >= 30 and trigger <= 39) then --boss mods
|
||||
stack_label:SetText ("Remaining Time:")
|
||||
stack_label:SetText ("Trigger Remaining Time:")
|
||||
f.StackSlider:SetValue (4)
|
||||
f.StackSlider.tooltip = "Will trigger when the bar remaining time reach this value."
|
||||
f.SpellName:Disable()
|
||||
@@ -2117,6 +2362,9 @@
|
||||
f.SpellName:Disable()
|
||||
f.UseSpellId:Disable()
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (2, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, 2, true)
|
||||
f.IsCooldown:Disable()
|
||||
|
||||
f.SoundEffectDropdown:Disable()
|
||||
f.SaySomething:Disable()
|
||||
f.IconButton:Disable()
|
||||
@@ -2179,14 +2427,18 @@
|
||||
|
||||
if (triggertype and type (triggertype) == "number") then
|
||||
DetailsAuraPanel.AuraOnDropdown:Select (triggertype, true)
|
||||
DetailsAuraPanel.SetTriggerState (DetailsAuraPanel.TriggerList [triggertype].value) --passed by index not by the trigger ID
|
||||
else
|
||||
DetailsAuraPanel.AuraOnDropdown:Select (1, true)
|
||||
DetailsAuraPanel.SetTriggerState (1)
|
||||
end
|
||||
|
||||
if (auratype and type (auratype) == "number") then
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (auratype, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, auratype)
|
||||
else
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (1, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, "icon")
|
||||
end
|
||||
|
||||
DetailsAuraPanel:UpdateLabels()
|
||||
@@ -2591,6 +2843,8 @@
|
||||
f:SetToplevel (true)
|
||||
f:SetMovable (true)
|
||||
f.Title:SetTextColor (1, .8, .2)
|
||||
|
||||
f:SetBackdropColor (unpack (_detalhes.default_backdropcolor))
|
||||
|
||||
local have_plugins_enabled
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ do
|
||||
end
|
||||
|
||||
local class = _detalhes:GetClass (Actor.nome)
|
||||
if (class) then
|
||||
if (class and class ~= "UNKNOW") then
|
||||
Actor.classe = class
|
||||
Actor.need_refresh = true
|
||||
Actor.guessing_class = nil
|
||||
@@ -212,6 +212,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -236,6 +237,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
if (container) then
|
||||
container.need_refresh = true
|
||||
@@ -267,6 +269,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
if (container) then
|
||||
container.need_refresh = true
|
||||
@@ -307,6 +310,8 @@ do
|
||||
local spec = _detalhes.cached_specs [Actor.serial]
|
||||
if (spec) then
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -332,6 +337,8 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -354,6 +361,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -379,6 +387,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -410,6 +419,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
if (container) then
|
||||
@@ -434,6 +444,7 @@ do
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor.spec = spec
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.need_refresh = true
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
|
||||
+22
-1
@@ -1000,6 +1000,7 @@ local default_profile = {
|
||||
force_activity_time_pvp = true,
|
||||
death_tooltip_width = 300,
|
||||
override_spellids = true,
|
||||
all_players_are_group = false,
|
||||
|
||||
--> skins
|
||||
standard_skin = false,
|
||||
@@ -1073,6 +1074,7 @@ local default_player_data = {
|
||||
combat_counter = 0,
|
||||
last_instance_id = 0,
|
||||
last_instance_time = 0,
|
||||
mythic_dungeon_id = 0,
|
||||
--> nicktag cache
|
||||
nick_tag_cache = {},
|
||||
ignore_nicktag = false,
|
||||
@@ -1121,6 +1123,10 @@ local default_player_data = {
|
||||
enabled = true,
|
||||
channel = "SELF",
|
||||
},
|
||||
announce_damagerecord = {
|
||||
enabled = true,
|
||||
channel = "SELF",
|
||||
},
|
||||
--> benchmark
|
||||
benchmark_db = {
|
||||
frame = {},
|
||||
@@ -1143,7 +1149,7 @@ local default_global_data = {
|
||||
savedCustomSpells = {},
|
||||
savedTimeCaptures = {},
|
||||
lastUpdateWarning = 0,
|
||||
update_warning_timeout = 30,
|
||||
update_warning_timeout = 10,
|
||||
report_where = "SAY",
|
||||
realm_sync = true,
|
||||
spell_school_cache = {},
|
||||
@@ -1195,6 +1201,21 @@ local default_global_data = {
|
||||
},
|
||||
spell_pool = {},
|
||||
encounter_spell_pool = {},
|
||||
--> aura creation frame libwindow
|
||||
createauraframe = {},
|
||||
--> min health done on the death report
|
||||
deathlog_healingdone_min = 1,
|
||||
|
||||
--> mythic plus config
|
||||
mythic_plus = {
|
||||
always_in_combat = false, --
|
||||
merge_boss_trash = true, --
|
||||
delete_trash_after_merge = true, --
|
||||
--merge_boss_with_trash = false, --this won't be used
|
||||
boss_dedicated_segment = true, --
|
||||
make_overall_when_done = true, --
|
||||
make_overall_boss_only = false, --
|
||||
},
|
||||
|
||||
-- important auras
|
||||
--[=[
|
||||
|
||||
+11
-11
@@ -66,7 +66,7 @@ local _
|
||||
micro_frames = {left = "DETAILS_STATUSBAR_PLUGIN_THREAT"},
|
||||
|
||||
instance_cprops = {
|
||||
["menu_icons_size"] = 1,
|
||||
["menu_icons_size"] = 0.85,
|
||||
["color"] = {
|
||||
1, -- [1]
|
||||
1, -- [2]
|
||||
@@ -75,7 +75,7 @@ local _
|
||||
},
|
||||
["menu_anchor"] = {
|
||||
13, -- [1]
|
||||
2, -- [2]
|
||||
1, -- [2]
|
||||
["side"] = 2,
|
||||
},
|
||||
["bg_r"] = 0.0941,
|
||||
@@ -142,7 +142,7 @@ local _
|
||||
["bars_grow_direction"] = 1,
|
||||
["row_info"] = {
|
||||
["textR_outline"] = true,
|
||||
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha",
|
||||
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
|
||||
["textL_outline"] = true,
|
||||
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
|
||||
["textR_show_data"] = {
|
||||
@@ -162,7 +162,7 @@ local _
|
||||
["between"] = 1,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Fonts\\ARIALN.TTF",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -217,7 +217,7 @@ local _
|
||||
["textR_separator"] = ",",
|
||||
["textL_class_colors"] = false,
|
||||
},
|
||||
["show_statusbar"] = true,
|
||||
["show_statusbar"] = false,
|
||||
["bg_alpha"] = 0.699999988079071,
|
||||
["wallpaper"] = {
|
||||
["enabled"] = false,
|
||||
@@ -425,7 +425,7 @@ local _
|
||||
["between"] = 0,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -571,7 +571,7 @@ local _
|
||||
["between"] = 1,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Fonts\\ARIALN.TTF",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -848,7 +848,7 @@ local _
|
||||
["between"] = 0,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -1517,7 +1517,7 @@ local _
|
||||
["between"] = 1,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\FORCED SQUARE.ttf",
|
||||
["textL_custom_text"] = "{data1}. {data3}{data2}",
|
||||
["font_size"] = 10,
|
||||
@@ -1706,7 +1706,7 @@ local _
|
||||
["textL_enable_custom_text"] = false,
|
||||
["icon_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
|
||||
["texture_background_file"] = "Interface\\AddOns\\Details\\images\\BantoBar",
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
|
||||
["textR_enable_custom_text"] = false,
|
||||
["textR_custom_text"] = "{data1} ({data2}, {data3}%)",
|
||||
@@ -2207,7 +2207,7 @@ local _
|
||||
["between"] = 0,
|
||||
},
|
||||
["texture_background_class_color"] = false,
|
||||
["start_after_icon"] = false,
|
||||
["start_after_icon"] = true,
|
||||
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
|
||||
["backdrop"] = {
|
||||
["enabled"] = false,
|
||||
|
||||
@@ -907,6 +907,95 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
print (Loc ["STRING_DETAILS1"] .. "diagnostic for character " .. rest .. " turned on.")
|
||||
return
|
||||
end
|
||||
|
||||
local current_combat = _detalhes.tabela_vigente
|
||||
|
||||
if (not _detalhes.DebugWindow) then
|
||||
_detalhes.DebugWindow = _detalhes.gump:CreateSimplePanel (UIParent, 800, 600, "Details! Debug", "DetailsDebugPanel")
|
||||
local TextBox = _detalhes.gump:NewSpecialLuaEditorEntry (_detalhes.DebugWindow, 760, 560, "text", "$parentTextEntry", true)
|
||||
TextBox:SetPoint ("center", _detalhes.DebugWindow, "center", 0, -10)
|
||||
TextBox:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
TextBox:SetBackdropColor (0, 0, 0, 0.9)
|
||||
TextBox:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
_detalhes.DebugWindow.TextBox = TextBox
|
||||
end
|
||||
|
||||
local text = [[
|
||||
Hello World!
|
||||
Details! Damage Meter Debug
|
||||
Release Version: @VERSION Core Version: @CORE
|
||||
|
||||
Update Thread Status:
|
||||
Tick Rate: @TICKRATE
|
||||
Threat Health: @TICKHEALTH
|
||||
Last Tick: @TICKLAST
|
||||
Next Tick In: @TICKNEXT
|
||||
|
||||
Current Combat Status:
|
||||
ID: @COMBATID
|
||||
Container Status: @COMBATCONTAINERS
|
||||
Damage Container Actors: @COMBATDAMAGEACTORS actors found
|
||||
|
||||
Parser Status:
|
||||
Parser Health: @PARSERHEALTH
|
||||
Parser Capture Status: @PARSERCAPTURE
|
||||
|
||||
Lower Instance Status (window 1):
|
||||
Is Shown: @INSTANCESHOWN
|
||||
Segment Status: @INSTANCESEGMENT
|
||||
Damage Update Status: @INSTANCEDAMAGESTATUS
|
||||
|
||||
]]
|
||||
|
||||
text = text:gsub ([[@VERSION]], _detalhes.userversion)
|
||||
text = text:gsub ([[@CORE]], _detalhes.realversion)
|
||||
|
||||
text = text:gsub ([[@TICKRATE]], _detalhes.update_speed)
|
||||
text = text:gsub ([[@TICKHEALTH]], _detalhes:TimeLeft (_detalhes.atualizador) ~= 0 and "|cFF22FF22good|r" or "|cFFFF2222bad|r")
|
||||
text = text:gsub ([[@TICKLAST]], _detalhes.LastUpdateTick .. " (" .. _detalhes._tempo - _detalhes.LastUpdateTick .. " seconds ago)")
|
||||
text = text:gsub ([[@TICKNEXT]], _detalhes:TimeLeft (_detalhes.atualizador))
|
||||
|
||||
text = text:gsub ([[@COMBATID]], _detalhes.combat_id)
|
||||
text = text:gsub ([[@COMBATCONTAINERS]], _detalhes.tabela_vigente[1] and _detalhes.tabela_vigente[2] and _detalhes.tabela_vigente[3] and _detalhes.tabela_vigente[4] and "|cFF22FF22good|r" or "|cFFFF2222bad|r")
|
||||
text = text:gsub ([[@COMBATDAMAGEACTORS]], #_detalhes.tabela_vigente[1] and _detalhes.tabela_vigente[1]._ActorTable and #_detalhes.tabela_vigente[1]._ActorTable)
|
||||
|
||||
text = text:gsub ([[@PARSERHEALTH]], _detalhes.parser_frame:GetScript ("OnEvent") == _detalhes.OnParserEvent and "|cFF22FF22good|r" or "|cFFFF2222bad|r")
|
||||
|
||||
local captureStr = ""
|
||||
for _ , captureName in ipairs (_detalhes.capture_types) do
|
||||
if (_detalhes.capture_current [captureName]) then
|
||||
captureStr = captureStr .. " " .. captureName .. ": |cFF22FF22okay|r"
|
||||
else
|
||||
captureStr = captureStr .. " " .. captureName .. ": |cFFFF2222X|r"
|
||||
end
|
||||
end
|
||||
text = text:gsub ([[@PARSERCAPTURE]], captureStr)
|
||||
|
||||
local instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (instance) then
|
||||
instance = _detalhes:GetInstance (instance)
|
||||
end
|
||||
|
||||
if (instance) then
|
||||
if (instance:IsEnabled()) then
|
||||
text = text:gsub ([[@INSTANCESHOWN]], "|cFF22FF22good|r")
|
||||
else
|
||||
text = text:gsub ([[@INSTANCESHOWN]], "|cFFFFFF22not visible|r")
|
||||
end
|
||||
|
||||
text = text:gsub ([[@INSTANCESEGMENT]], (instance.showing == _detalhes.tabela_vigente and "|cFF22FF22good|r" or "|cFFFFFF22isn't the current combat object|r") .. (" window segment: " .. instance:GetSegment()))
|
||||
|
||||
text = text:gsub ([[@INSTANCEDAMAGESTATUS]], (_detalhes._tempo - (_detalhes.LastFullDamageUpdate or 0)) < 3 and "|cFF22FF22good|r" or "|cFFFF2222last update registered is > than 3 seconds, is there actors to show?|r")
|
||||
else
|
||||
text = text:gsub ([[@INSTANCESHOWN]], "|cFFFFFF22not found|r")
|
||||
text = text:gsub ([[@INSTANCESEGMENT]], "|cFFFFFF22not found|r")
|
||||
text = text:gsub ([[@INSTANCEDAMAGESTATUS]], "|cFFFFFF22not found|r")
|
||||
|
||||
end
|
||||
|
||||
_detalhes.DebugWindow.TextBox:SetText (text)
|
||||
|
||||
_detalhes.DebugWindow:Show()
|
||||
end
|
||||
|
||||
--> debug combat log
|
||||
@@ -1302,6 +1391,96 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
instance:InstanceAlert ("Boss Defeated! Show Ranking", icon, 10, func, true)
|
||||
|
||||
elseif (msg == "merge") then
|
||||
|
||||
--> at this point, details! should not be in combat
|
||||
if (_detalhes.in_combat) then
|
||||
_detalhes:Msg ("already in combat, closing current segment.")
|
||||
_detalhes:SairDoCombate()
|
||||
end
|
||||
|
||||
--> create a new combat to be the overall for the mythic run
|
||||
_detalhes:EntrarEmCombate()
|
||||
|
||||
--> get the current combat just created and the table with all past segments
|
||||
local newCombat = _detalhes:GetCurrentCombat()
|
||||
local segmentHistory = _detalhes:GetCombatSegments()
|
||||
local totalTime = 0
|
||||
local startDate, endDate = "", ""
|
||||
local lastSegment
|
||||
local segmentsAdded = 0
|
||||
|
||||
--> add all boss segments from this run to this new segment
|
||||
for i = 1, 25 do
|
||||
local pastCombat = segmentHistory [i]
|
||||
if (pastCombat and pastCombat ~= newCombat) then
|
||||
newCombat = newCombat + pastCombat
|
||||
totalTime = totalTime + pastCombat:GetCombatTime()
|
||||
if (i == 1) then
|
||||
local _, endedDate = pastCombat:GetDate()
|
||||
endDate = endedDate
|
||||
end
|
||||
lastSegment = pastCombat
|
||||
segmentsAdded = segmentsAdded + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (lastSegment) then
|
||||
startDate = lastSegment:GetDate()
|
||||
end
|
||||
|
||||
_detalhes:Msg ("done merging " .. segmentsAdded .. " segments.")
|
||||
|
||||
--[[ --mythic+ debug
|
||||
--> tag the segment as mythic overall segment
|
||||
newCombat.is_mythic_dungeon = {
|
||||
MapID = _detalhes.MythicPlus.Dungeon,
|
||||
StartedAt = _detalhes.MythicPlus.StartedAt, --the start of the run
|
||||
EndedAt = _detalhes.MythicPlus.EndedAt, --the end of the run
|
||||
SegmentID = "overall", --segment number within the dungeon
|
||||
--EncounterID = encounterID,
|
||||
--EncounterName = encounterName,
|
||||
RunID = _detalhes.MythicPlus.RunID,
|
||||
OverallSegment = true,
|
||||
}
|
||||
--]]
|
||||
|
||||
--> set some data
|
||||
newCombat:SetStartTime (GetTime() - totalTime)
|
||||
newCombat:SetEndTime (GetTime())
|
||||
|
||||
newCombat.data_inicio = startDate
|
||||
newCombat.data_fim = endDate
|
||||
|
||||
--> immediatly finishes the segment just started
|
||||
_detalhes:SairDoCombate()
|
||||
|
||||
--> cleanup the past segments table
|
||||
for i = 25, 1, -1 do
|
||||
local pastCombat = segmentHistory [i]
|
||||
if (pastCombat and pastCombat ~= newCombat) then
|
||||
wipe (pastCombat)
|
||||
segmentHistory [i] = nil
|
||||
end
|
||||
end
|
||||
|
||||
--> clear memory
|
||||
collectgarbage()
|
||||
|
||||
_detalhes:InstanciaCallFunction (_detalhes.gump.Fade, "in", nil, "barras")
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos)
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSoloMode_AfertReset)
|
||||
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump)
|
||||
_detalhes:AtualizaGumpPrincipal (-1, true)
|
||||
|
||||
elseif (msg == "record") then
|
||||
|
||||
|
||||
_detalhes.ScheduleLoadStorage()
|
||||
_detalhes.TellDamageRecord = C_Timer.NewTimer (0.6, _detalhes.PrintEncounterRecord)
|
||||
_detalhes.TellDamageRecord.Boss = 2032
|
||||
_detalhes.TellDamageRecord.Diff = 16
|
||||
|
||||
elseif (msg == "recordtest") then
|
||||
|
||||
local f = DetailsRecordFrameAnimation
|
||||
|
||||
@@ -502,6 +502,56 @@ do
|
||||
|
||||
}
|
||||
|
||||
_detalhes.SpecIDToClass = {
|
||||
[577] = "DEMONHUNTER", -- Havoc Demon Hunter
|
||||
[581] = "DEMONHUNTER", -- Vengeance Demon Hunter
|
||||
|
||||
[252] = "DEATHKNIGHT", -- Unholy Death Knight
|
||||
[251] = "DEATHKNIGHT", -- Frost Death Knight
|
||||
[250] = "DEATHKNIGHT", -- Blood Death Knight
|
||||
|
||||
[102] = "DRUID", -- Balance Druid
|
||||
[103] = "DRUID", -- Feral Druid
|
||||
[104] = "DRUID", -- Guardian Druid
|
||||
[105] = "DRUID", -- Restoration Druid
|
||||
|
||||
[253] = "HUNTER", -- Beast Mastery Hunter
|
||||
[254] = "HUNTER", -- Marksmanship Hunter
|
||||
[255] = "HUNTER", -- Survival Hunter
|
||||
|
||||
[62] = "MAGE", -- Arcane Mage
|
||||
[63] = "MAGE", -- Fire Mage
|
||||
[64] = "MAGE", -- Frost Mage
|
||||
|
||||
[268] = "MONK", -- Brewmaster Monk
|
||||
[269] = "MONK", -- Windwalker Monk
|
||||
[270] = "MONK", -- Mistweaver Monk
|
||||
|
||||
[65] = "PALADIN", -- Holy Paladin
|
||||
[66] = "PALADIN", -- Protection Paladin
|
||||
[70] = "PALADIN", -- Retribution Paladin
|
||||
|
||||
[256] = "PRIEST", -- Discipline Priest
|
||||
[257] = "PRIEST", -- Holy Priest
|
||||
[258] = "PRIEST", -- Shadow Priest
|
||||
|
||||
[259] = "ROGUE", -- Assassination Rogue
|
||||
[260] = "ROGUE", -- Outlaw Rogue
|
||||
[261] = "ROGUE", -- Subtlety Rogue
|
||||
|
||||
[262] = "SHAMAN", -- Elemental Shaman
|
||||
[263] = "SHAMAN", -- Enhancement Shaman
|
||||
[264] = "SHAMAN", -- Restoration Shaman
|
||||
|
||||
[265] = "WARLOCK", -- Affliction Warlock
|
||||
[266] = "WARLOCK", -- Demonology Warlock
|
||||
[267] = "WARLOCK", -- Destruction Warlock
|
||||
|
||||
[71] = "WARRIOR", -- Arms Warrior
|
||||
[72] = "WARRIOR", -- Fury Warrior
|
||||
[73] = "WARRIOR", -- Protection Warrior
|
||||
}
|
||||
|
||||
_detalhes.ClassSpellList = {
|
||||
|
||||
--death knight
|
||||
|
||||
Reference in New Issue
Block a user