- Damage -> Enemies now also show neutral creatures.
- Added support to dungeons, bosses and trash mobs are now recognized. - Added target information for each spell in Player Detail Window. - Added options for change the location of tooltips. - Added options for change the Overall Data functionality. - Added tooltips for lock and detach buttons. - Added new row texture: 'Details Vidro'. - Revamp on death log tooltips. - Improved the visual effect for the instance which current moving window can snap to. - Fixed issue where warlocks soul link was counting as damage done. - Fixed the attributes shown on Player Detail Window, now when showing Dps for example, all spells and targets also show Dps amount. - Fixed issue with Hotcorners where the quick click functionality wasn't changing on options panel. - Fixed a Hotcorner issue with window mode where the mouse goes outside the wow window. - Fixed bug where new rows created after resize the window was coming with borders. - Fixed bug where resize buttons was below the bars when setting the strata level to Dialog. - You are not prepared plugin had the time alert time increased to 30 seconds, up from 20.
This commit is contained in:
@@ -60,14 +60,14 @@ local tinsert = tinsert
|
||||
|
||||
savedtable = savedtable or {}
|
||||
|
||||
tinsert (LibHotCorners [corner], {name = name, fname = fname, savedtable = savedtable, icon = icon, tooltip = tooltip, click = clickfunc, menus = menus, quickfunc = quickclick, onenter = onenter, onleave = onleave})
|
||||
tinsert (LibHotCorners [corner], {name = name, fname = fname, savedtable = savedtable, icon = icon, tooltip = tooltip, click = clickfunc, menus = menus, quickfunc = quickfunc, onenter = onenter, onleave = onleave})
|
||||
LibHotCorners [corner].map [name] = #LibHotCorners [corner]
|
||||
|
||||
if (not savedtable.hide) then
|
||||
LibHotCorners [corner].is_enabled = true
|
||||
end
|
||||
|
||||
if (quickfunc and savedtable [corner .. "_quick_click"]) then
|
||||
if (quickfunc and savedtable [corner .. "_quickclick"]) then
|
||||
LibHotCorners [corner].quickfunc = quickfunc
|
||||
end
|
||||
|
||||
@@ -82,8 +82,8 @@ local tinsert = tinsert
|
||||
local corner_table = LibHotCorners [corner]
|
||||
local addon_table = corner_table [corner_table.map [name]]
|
||||
|
||||
addon_table.savedtable.quickclick = value
|
||||
|
||||
addon_table.savedtable [corner .. "_quickclick"] = value
|
||||
|
||||
if (value and addon_table.quickfunc) then
|
||||
corner_table.quickfunc = addon_table.quickfunc
|
||||
else
|
||||
@@ -157,6 +157,16 @@ local tinsert = tinsert
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> scripts
|
||||
|
||||
--> background (window mode fix)
|
||||
function HotCornersBackgroundOnEnter (self)
|
||||
if (LibHotCornersTopLeft and LibHotCornersTopLeft:IsShown()) then
|
||||
if (LibHotCornersTopLeft:GetWidth() > 2) then
|
||||
HotCornersOnLeave (LibHotCornersTopLeft)
|
||||
end
|
||||
end
|
||||
self:EnableMouse (false)
|
||||
end
|
||||
|
||||
--> set size
|
||||
local function set_size (self)
|
||||
if (self.position == "topleft" or self.position == "topright") then
|
||||
@@ -195,6 +205,8 @@ local tinsert = tinsert
|
||||
|
||||
set_size (self)
|
||||
|
||||
HotCornersBackgroundFrame:EnableMouse (true)
|
||||
|
||||
local i = 1
|
||||
|
||||
local sort = {}
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
|
||||
|
||||
<Frame name="HotCornersBackgroundFrame" frameStrata="MEDIUM" parent="UIParent">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="0" y="0"/>
|
||||
<Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
|
||||
</Anchors>
|
||||
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:EnableMouse (false)
|
||||
</OnLoad>
|
||||
<OnEnter>
|
||||
HotCornersBackgroundOnEnter (self)
|
||||
</OnEnter>
|
||||
</Scripts>
|
||||
|
||||
</Frame>
|
||||
|
||||
<Frame name="HotCornersFrameCornerTemplate" frameStrata="FULLSCREEN" virtual="true" parent="UIParent">
|
||||
<Size x="1" y="1"/>
|
||||
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" tile="true">
|
||||
@@ -42,7 +59,6 @@
|
||||
|
||||
<Frame name="HotCornersButtonTemplate" frameStrata="FULLSCREEN" hidden="true" virtual="true">
|
||||
<Size x="32" y="32"/>
|
||||
|
||||
<Scripts>
|
||||
<OnCreate>
|
||||
self:SetFrameLevel (self:GetParent():GetFrameLevel()+2)
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
-- 27/07/2013: Finished alpha version.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> global name declaration
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
|
||||
_detalhes.userversion = "v1.15.0"
|
||||
_detalhes.userversion = "v1.15.3" --tirar guardian of ancient kingss
|
||||
_detalhes.version = "Alpha 019"
|
||||
_detalhes.realversion = 19
|
||||
|
||||
@@ -203,6 +203,7 @@ do
|
||||
--> register textures and fonts for shared media
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
SharedMedia:Register ("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]])
|
||||
SharedMedia:Register ("statusbar", "Details Vidro", [[Interface\AddOns\Details\images\bar4_vidro]])
|
||||
SharedMedia:Register ("statusbar", "Details D'ictum (reverse)", [[Interface\AddOns\Details\images\bar4_reverse]])
|
||||
SharedMedia:Register ("statusbar", "Details Serenity", [[Interface\AddOns\Details\images\bar_serenity]])
|
||||
SharedMedia:Register ("background", "Details Ground", [[Interface\AddOns\Details\images\background]])
|
||||
|
||||
@@ -196,8 +196,8 @@ end
|
||||
end
|
||||
|
||||
local sortEnemies = function (t1, t2)
|
||||
local a = _bit_band (t1.flag_original, 0x00000040)
|
||||
local b = _bit_band (t2.flag_original, 0x00000040)
|
||||
local a = _bit_band (t1.flag_original, 0x00000060)
|
||||
local b = _bit_band (t2.flag_original, 0x00000060)
|
||||
|
||||
if (a ~= 0 and b ~= 0) then
|
||||
return t1.total > t2.total
|
||||
@@ -219,8 +219,7 @@ end
|
||||
local total = 0
|
||||
|
||||
for index, player in _ipairs (container) do
|
||||
|
||||
if (_bit_band (player.flag_original, 0x00000040) ~= 0) then --> é um inimigo
|
||||
if (_bit_band (player.flag_original, 0x00000060) ~= 0) then --> é um inimigo
|
||||
total = total + player [keyName]
|
||||
else
|
||||
amount = index-1
|
||||
@@ -1226,13 +1225,18 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
forcar = true
|
||||
end
|
||||
|
||||
|
||||
if (self.owner) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.owner.classe])
|
||||
|
||||
elseif (self.monster) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors.ENEMY)
|
||||
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
if (_bit_band (self.flag_original, 0x00000020) ~= 0) then --> neutral
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = 1, 1, 0
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
end
|
||||
|
||||
return self:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, qual_barra, barras_container)
|
||||
@@ -1318,7 +1322,11 @@ end
|
||||
elseif (self.monster) then
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors.ENEMY)
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
if (_bit_band (self.flag_original, 0x00000020) ~= 0) then --> neutral
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = 1, 1, 0
|
||||
else
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (_detalhes.class_colors [self.classe])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -18,9 +18,12 @@ local _table_insert = table.insert
|
||||
local _bit_band = bit.band
|
||||
local _math_min = math.min
|
||||
--api locals
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
local _GetSpellInfo = _detalhes.getspellinfo
|
||||
local _IsInRaid = IsInRaid
|
||||
local _IsInGroup = IsInGroup
|
||||
local _UnitName = UnitName
|
||||
local _GetNumGroupMembers = GetNumGroupMembers
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _
|
||||
@@ -801,6 +804,36 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:CloseShields()
|
||||
|
||||
if (not _IsInRaid()) then
|
||||
return
|
||||
end
|
||||
|
||||
local name_table = {}
|
||||
for i = 1, _GetNumGroupMembers() do
|
||||
name_table [_UnitName ("raid" .. i)] = "raid" .. i
|
||||
end
|
||||
|
||||
local spells_table = {}
|
||||
|
||||
--não da de fechar os escudos, precisa saber o total dele, unitaura nao retorna o valor do escudo
|
||||
for alvo_name, spellid_table in _pairs (escudos) do
|
||||
for spellid, caster_table in _pairs (spellid_table) do
|
||||
if (not spells_table [spellid]) then
|
||||
local spellname = GetSpellInfo (spellid)
|
||||
spells_table [spellid] = spellname
|
||||
end
|
||||
for caster_name, amount in _pairs (caster_table) do
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (name_table [alvo_name], buffIndex, nil, "HELPFUL")
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--escudo [alvo_name] [spellid] [who_name]
|
||||
end
|
||||
|
||||
--------------------------------------------- // TOOLTIPS // ---------------------------------------------
|
||||
|
||||
|
||||
|
||||
@@ -695,7 +695,7 @@ function _detalhes:agrupar_janelas (lados)
|
||||
end
|
||||
end
|
||||
|
||||
gump:Fade (instancia.botao_separar, 0)
|
||||
instancia.botao_separar:Show()
|
||||
|
||||
if (_detalhes.tutorial.unlock_button < 4) then
|
||||
|
||||
@@ -703,7 +703,7 @@ function _detalhes:agrupar_janelas (lados)
|
||||
_detalhes.temp_table1.TextHeightMod = -6
|
||||
_detalhes.popup:ShowMe (instancia.botao_separar, "tooltip", "Interface\\Buttons\\LockButton-Unlocked-Up", Loc ["STRING_UNLOCK"], 150, _detalhes.temp_table1)
|
||||
|
||||
UIFrameFlash (instancia.botao_separar, .5, .5, 5, false, 0, 0)
|
||||
--UIFrameFlash (instancia.botao_separar, .5, .5, 5, false, 0, 0)
|
||||
_detalhes.tutorial.unlock_button = _detalhes.tutorial.unlock_button + 1
|
||||
end
|
||||
|
||||
@@ -774,7 +774,7 @@ function _detalhes:Desagrupar (instancia, lado)
|
||||
end
|
||||
end
|
||||
|
||||
gump:Fade (instancia.botao_separar, 1)
|
||||
instancia.botao_separar:Hide()
|
||||
|
||||
instancia.verticalSnap = false
|
||||
instancia.horizontalSnap = false
|
||||
@@ -800,7 +800,7 @@ function _detalhes:Desagrupar (instancia, lado)
|
||||
esta_instancia.snap [2] = nil
|
||||
end
|
||||
|
||||
gump:Fade (instancia.botao_separar, 1)
|
||||
instancia.botao_separar:Hide()
|
||||
|
||||
if (instancia.iniciada) then
|
||||
instancia:SaveMainWindowPosition()
|
||||
|
||||
+39
-27
@@ -162,14 +162,18 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
local hp_max = morte [5]
|
||||
|
||||
local battleress = false
|
||||
local lastcooldown = false
|
||||
|
||||
local GameCooltip = GameCooltip
|
||||
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:SetType ("tooltipbar")
|
||||
GameCooltip:SetOwner (esta_barra)
|
||||
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color))
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
|
||||
for index, evento in _ipairs (eventos) do
|
||||
|
||||
local hp = _math_floor (evento[5]/hp_max*100)
|
||||
@@ -177,7 +181,7 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
hp = 100
|
||||
end
|
||||
|
||||
if (evento [1]) then --> DANO
|
||||
if (evento [1]) then --> Dano
|
||||
--print ("DANO|"..evento [4]-hora_da_morte.."|"..evento [2].."|"..evento [3]) --> {true, spellid, amount, _tempo}
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (evento [2])
|
||||
|
||||
@@ -190,17 +194,12 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
end
|
||||
|
||||
if (type (evento [1]) ~= "boolean" and evento [1] == 2) then --> last cooldown
|
||||
if (evento[3] == 1) then
|
||||
GameCooltip:AddLine (_cstr ("%.1f", evento[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
|
||||
GameCooltip:AddIcon (icone_magia)
|
||||
else
|
||||
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
|
||||
end
|
||||
lastcooldown = evento
|
||||
else
|
||||
--> [1] left text [2] right text [3] main 1 or sub 2 [...] color
|
||||
GameCooltip:AddLine ("".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..amt_golpes..nome_magia.." ("..evento[6]..")", "-".._detalhes:ToK (evento[3]).." (".. hp .."%)", 1, "white", "white")
|
||||
--> [1] icon [2] main 1 or sub 2 [3] left or right [4,5] width height [...] texcoord
|
||||
GameCooltip:AddIcon (icone_magia)
|
||||
GameCooltip:AddIcon (icone_magia) --, 1, 1, nil, nil, 0.078125, 0.921875, 0.078125, 0.921875
|
||||
|
||||
--> [1] value [2] main 1 or sub 2 [...] color [4] glow
|
||||
if (type (evento [1]) ~= "boolean" and evento [1] == 1) then --> cooldown
|
||||
@@ -211,35 +210,47 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
end
|
||||
|
||||
elseif (not battleress) then --> battle ress
|
||||
GameCooltip:AddLine ("+".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..nome_magia.." ("..evento[6]..")", "", 1, "white")
|
||||
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
GameCooltip:AddStatusBar (100, 1, "silver", false)
|
||||
battleress = true
|
||||
battleress = evento
|
||||
|
||||
end
|
||||
else
|
||||
|
||||
else --> Cura
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (evento [2])
|
||||
GameCooltip:AddLine ("".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..nome_magia.." ("..evento[6]..")", "+".._detalhes:ToK (evento[3]).." (".. hp .."%)", 1, "white", "white")
|
||||
GameCooltip:AddIcon (icone_magia, 1, 1)
|
||||
GameCooltip:AddIcon (icone_magia) --, 1, 1, nil, nil, 0.0625, 0.9375, 0.0625, 0.9375
|
||||
GameCooltip:AddStatusBar (hp, 1, "green", true)
|
||||
end
|
||||
end
|
||||
|
||||
--GameCooltip:AddLine (" ", " ", 1, "white", "white")
|
||||
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, "white")
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||
|
||||
--_table_insert (linhas, 2, {{"Interface\\AddOns\\Details\\images\\small_icons", .75, 1, 0, 1}, morte [6] .. " Morreu", "-- -- -- ", 100, {75/255, 75/255, 75/255, 1}, {noglow = true}}) --> localize-me
|
||||
GameCooltip:AddLine (morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
|
||||
--GameCooltip:AddSpecial ("line", 2, nil, morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
|
||||
--GameCooltip:AddSpecial ("icon", 2, nil, "Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
--GameCooltip:AddSpecial ("statusbar", 2, nil, 100, 1, "darkgray", false)
|
||||
|
||||
if (battleress) then
|
||||
--_table_insert (linhas, 2, {{"Interface\\AddOns\\Details\\images\\small_icons", .75, 1, 0, 1}, morte [6] .. " Morreu", "-- -- -- ", 100, {75/255, 75/255, 75/255, 1}, {noglow = true}}) --> localize-me
|
||||
GameCooltip:AddSpecial ("line", 2, nil, morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
|
||||
GameCooltip:AddSpecial ("icon", 2, nil, "Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
GameCooltip:AddSpecial ("statusbar", 2, nil, 100, 1, "darkgray", false)
|
||||
else
|
||||
GameCooltip:AddSpecial ("line", 1, nil, morte [6] .. " Morreu", "-- -- -- ", 1, "white")
|
||||
GameCooltip:AddSpecial ("icon", 1, nil, "Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
GameCooltip:AddSpecial ("statusbar", 1, nil, 100, 1, "darkgray", false)
|
||||
--_table_insert (linhas, 1, {{, .75, 1, 0, 1}, , 100, {75/255, 75/255, 75/255, 1}, {noglow = true}}) --> localize-me
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (battleress [2])
|
||||
GameCooltip:AddLine ("+" .. _cstr ("%.1f", battleress[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. battleress[6] .. ")", "", 1, "white")
|
||||
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
|
||||
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
|
||||
end
|
||||
|
||||
if (lastcooldown) then
|
||||
if (lastcooldown[3] == 1) then
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (lastcooldown [2])
|
||||
GameCooltip:AddLine (_cstr ("%.1f", lastcooldown[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
|
||||
GameCooltip:AddIcon (icone_magia)
|
||||
else
|
||||
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
|
||||
GameCooltip:AddIcon ([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]], 1, 1, 18, 18)
|
||||
end
|
||||
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
|
||||
end
|
||||
|
||||
--GameCooltip:AddLine (" ", " ", 1, "white", "white")
|
||||
|
||||
GameCooltip:SetOption ("StatusBarHeightMod", -6)
|
||||
GameCooltip:SetOption ("FixedWidth", 300)
|
||||
@@ -247,6 +258,7 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
|
||||
GameCooltip:SetOption ("LeftBorderSize", -4)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_reverse]])
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
|
||||
|
||||
GameCooltip:ShowCooltip()
|
||||
|
||||
|
||||
@@ -58,15 +58,8 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
|
||||
local nome, realm = _UnitName ("raid"..i)
|
||||
if (realm and realm ~= "") then
|
||||
nome = nome.."-"..realm
|
||||
--print ("tem realm: ", realm, nome)
|
||||
end
|
||||
dono_nome = nome
|
||||
|
||||
--if (nome:find ("Unknown")) then
|
||||
--print ("owner name with Unknown: ", nome)
|
||||
--end
|
||||
|
||||
--print ("Dono encontrado na raide",nome,realm)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -78,13 +71,10 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
|
||||
|
||||
local nome, realm = _UnitName ("party"..i)
|
||||
if (realm and realm ~= "") then
|
||||
--print ("tem realm: ", realm)
|
||||
nome = nome.."-"..realm
|
||||
end
|
||||
|
||||
dono_nome = nome
|
||||
--print ("Dono encontrado na party",nome,realm)
|
||||
--print ("DEBUG Dono encontrado na party")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -102,14 +92,9 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
|
||||
end
|
||||
|
||||
if (dono_nome) then
|
||||
--print ("dono encontrado, adicionando ao cache")
|
||||
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true} --> adicionada a flag emulada
|
||||
return pet_nome .." <"..dono_nome..">", dono_nome, dono_serial, dono_flags
|
||||
else
|
||||
--if (_GetNumGroupMembers() > 0) then
|
||||
--print ("DEBUG: Pet sem dono: "..pet_nome)
|
||||
--end
|
||||
--print ("DEBUG Nao foi possivel achar o dono de "..pet_nome)
|
||||
|
||||
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0) then --> é um pet
|
||||
if (not _detalhes.pets_no_owner [pet_serial] and _bit_band (pet_flags, EM_GRUPO) ~= 0) then
|
||||
@@ -138,14 +123,10 @@ function container_pets:BuscarPets()
|
||||
local nome, realm = _UnitName ("raid"..i)
|
||||
if (nome == "Unknown Entity") then
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
--print ("unknown owner name, rescheduling...")
|
||||
else
|
||||
if (realm and realm ~= "") then
|
||||
nome = nome.."-"..realm
|
||||
--print ("tem realm: ", realm, nome)
|
||||
end
|
||||
--print ("pet found: ", nome)
|
||||
--print ("bp dono encontrado na raide:",nome, realm)
|
||||
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, _UnitGUID ("raid"..i), nome, 0x514)
|
||||
end
|
||||
end
|
||||
@@ -159,13 +140,10 @@ function container_pets:BuscarPets()
|
||||
local nome, realm = _UnitName ("party"..i)
|
||||
if (nome == "Unknown Entity") then
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
--print ("unknown owner name, rescheduling...")
|
||||
else
|
||||
if (realm and realm ~= "") then
|
||||
nome = nome.."-"..realm
|
||||
end
|
||||
--print ("pet found: ", nome)
|
||||
--print ("bp dono encontrado no grupo:",nome, realm)
|
||||
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID ("party"..i), nome, 0x514)
|
||||
end
|
||||
end
|
||||
@@ -178,31 +156,18 @@ end
|
||||
|
||||
function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial, dono_nome, dono_flags)
|
||||
|
||||
--if (pet_nome == "Guardian of Ancient Kings") then --remover
|
||||
-- print ("Summon GAK 2", dono_nome)
|
||||
--end
|
||||
|
||||
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0 and _bit_band (pet_flags, EM_GRUPO) ~= 0) then
|
||||
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true}
|
||||
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true, pet_nome, pet_serial}
|
||||
--if (pet_nome == "Guardian of Ancient Kings") then --remover
|
||||
-- print ("Summon GAK 3 - TRUE", dono_nome)
|
||||
-- print ("SUMMON", "Adicionou ao container")
|
||||
--end
|
||||
else
|
||||
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo}
|
||||
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, false, pet_nome, pet_serial}
|
||||
--if (pet_nome == "Guardian of Ancient Kings") then --remover
|
||||
-- print ("Summon GAK 3 - FALSE", dono_nome)
|
||||
-- print ("SUMMON", "Adicionou ao container")
|
||||
--end
|
||||
end
|
||||
|
||||
--if (fromSearch) then
|
||||
-- local d = self.pets [pet_serial]
|
||||
--print ("dono nome:",d[1], "dono serial:", d[2], "dono flags:", d[3], "tempo:", d[4])
|
||||
--end
|
||||
|
||||
--if (self.pets [dono_serial]) then
|
||||
--print ("debug: a owner is a pet, Owner: ", dono_nome, " Pet: ", pet_nome)
|
||||
--end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:WipePets()
|
||||
|
||||
+23
-1
@@ -387,6 +387,18 @@
|
||||
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_OUT")
|
||||
_detalhes:CloseEnemyDebuffsUptime()
|
||||
|
||||
--> ugly fix for warlocks soul link, need to rewrite friendly fire code.
|
||||
for index, actor in pairs (_detalhes.tabela_vigente[1]._ActorTable) do
|
||||
if (actor.classe == "WARLOCK") then
|
||||
local soullink = actor.spell_tables._ActorTable [108446]
|
||||
if (soullink) then
|
||||
actor.total = actor.total - soullink.total
|
||||
actor.total_without_pet = actor.total_without_pet - soullink.total
|
||||
soullink.total = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> pega a zona do jogador e vê se foi uma luta contra um Boss -- identifica se a luta foi com um boss
|
||||
if (not _detalhes.tabela_vigente.is_boss) then
|
||||
--> function which runs after a boss encounter to try recognize a encounter
|
||||
@@ -927,7 +939,17 @@
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("MinWidth", 180)
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]]) --[[Interface\Addons\Details\images\bar_flat]]
|
||||
GameCooltip:SetOwner (frame)
|
||||
|
||||
local myPoint = _detalhes.tooltip.anchor_point
|
||||
local anchorPoint = _detalhes.tooltip.anchor_relative
|
||||
local x_Offset = _detalhes.tooltip.anchor_offset[1]
|
||||
local y_Offset = _detalhes.tooltip.anchor_offset[2]
|
||||
|
||||
if (_detalhes.tooltip.anchored_to == 1) then
|
||||
GameCooltip:SetHost (frame, myPoint, anchorPoint, x_Offset, y_Offset)
|
||||
else
|
||||
GameCooltip:SetHost (DetailsTooltipAnchor, myPoint, anchorPoint, x_Offset, y_Offset)
|
||||
end
|
||||
|
||||
local esta_barra = self.barras [qual_barra] --> barra que o mouse passou em cima e irá mostrar o tooltip
|
||||
local objeto = esta_barra.minha_tabela --> pega a referencia da tabela --> retorna a classe_damage ou classe_heal
|
||||
|
||||
+283
-313
@@ -190,6 +190,10 @@
|
||||
|
||||
end
|
||||
|
||||
--if (who_name:find ("Guardian of Ancient Kings")) then --remover
|
||||
-- print ("PARSER:", who_name, este_jogador.nome, este_jogador.owner, meu_dono.nome)
|
||||
--end
|
||||
|
||||
--> his target
|
||||
local jogador_alvo, alvo_dono = damage_cache [alvo_name] or damage_cache_pets [alvo_serial], damage_cache_petsOwners [alvo_serial]
|
||||
|
||||
@@ -483,14 +487,24 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
function parser:summon (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellName)
|
||||
|
||||
--if (alvo_name == "Guardian of Ancient Kings") then
|
||||
-- print ("SUMMON", who_name, alvo_serial)
|
||||
--end
|
||||
|
||||
--> pet summon another pet
|
||||
local sou_pet = _detalhes.tabela_pets.pets [who_serial]
|
||||
if (sou_pet) then --> okey, ja é um pet
|
||||
--if (alvo_name == "Guardian of Ancient Kings") then
|
||||
-- print ("SUMMON", "inverteu")
|
||||
--end
|
||||
who_name, who_serial, who_flags = sou_pet[1], sou_pet[2], sou_pet[3]
|
||||
end
|
||||
|
||||
local alvo_pet = _detalhes.tabela_pets.pets [alvo_serial]
|
||||
if (alvo_pet) then
|
||||
--if (alvo_name == "Guardian of Ancient Kings") then
|
||||
-- print ("SUMMON", "inverteu 2")
|
||||
--end
|
||||
who_name, who_serial, who_flags = alvo_pet[1], alvo_pet[2], alvo_pet[3]
|
||||
end
|
||||
|
||||
@@ -755,10 +769,6 @@
|
||||
|
||||
elseif (tipo == "DEBUFF") then
|
||||
|
||||
--if (who_name == "Ditador") then
|
||||
-- print (spellname, alvo_name, "IN")
|
||||
--end
|
||||
|
||||
if (_in_combat) then
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -862,8 +872,6 @@
|
||||
|
||||
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
|
||||
|
||||
--print ("refresh", escudo [alvo_name][spellid][who_name], amount)
|
||||
|
||||
local absorb = escudo [alvo_name][spellid][who_name] - amount
|
||||
local overheal = amount - absorb
|
||||
escudo [alvo_name][spellid][who_name] = amount
|
||||
@@ -901,10 +909,6 @@
|
||||
|
||||
elseif (tipo == "DEBUFF") then
|
||||
|
||||
--if (who_name == "Ditador") then
|
||||
-- print (spellname, alvo_name, "REFRESH")
|
||||
--end
|
||||
|
||||
if (_in_combat) then
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> buff uptime
|
||||
@@ -992,8 +996,6 @@
|
||||
if (amount) then
|
||||
-- o amount é o que sobrou do escudo
|
||||
local escudo_antigo = escudo [alvo_name][spellid][who_name] --> quantidade total do escudo que foi colocado
|
||||
--print (escudo_antigo, amount)
|
||||
--if (escudo_antigo and escudo_antigo > amount) then
|
||||
|
||||
local absorb = escudo_antigo - amount
|
||||
local overheal = escudo_antigo - absorb
|
||||
@@ -1024,10 +1026,6 @@
|
||||
--> recording debuffs applied by player
|
||||
elseif (tipo == "DEBUFF") then
|
||||
|
||||
--if (who_name == "Ditador") then
|
||||
-- print (spellname, alvo_name, "OUT")
|
||||
--end
|
||||
|
||||
if (_in_combat) then
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> buff uptime
|
||||
@@ -1917,8 +1915,6 @@
|
||||
--serach key: ~cc
|
||||
function parser:break_cc (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool, auraType)
|
||||
|
||||
--print ("CCBREAK: ",spellid, spellname,extraSpellID, extraSpellName, auraType)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> early checks and fixes
|
||||
if (not cc_spell_list [spellid]) then
|
||||
@@ -1926,7 +1922,6 @@
|
||||
end
|
||||
|
||||
if (_bit_band (who_flags, AFFILIATION_GROUP) == 0) then
|
||||
--print (who_name.. " nao eh do grupo")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1944,7 +1939,7 @@
|
||||
--[[
|
||||
local este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
|
||||
--]]
|
||||
--[
|
||||
--[
|
||||
local este_jogador, meu_dono = misc_cache [who_name]
|
||||
if (not este_jogador) then --> pode ser um desconhecido ou um pet
|
||||
este_jogador, meu_dono, who_name = _current_misc_container:PegarCombatente (who_serial, who_name, who_flags, true)
|
||||
@@ -2109,7 +2104,30 @@
|
||||
end
|
||||
end
|
||||
|
||||
_table_sort (esta_morte, _detalhes.Sort4)
|
||||
--_table_sort (esta_morte, _detalhes.Sort4)
|
||||
_table_sort (esta_morte, function (table1, table2)
|
||||
|
||||
if (not table1) then return false end
|
||||
if (not table2) then return true end
|
||||
|
||||
if (table1 [4] == table2 [4]) then --> os 2 tem o mesmo tempo
|
||||
if (type (table1 [1]) == "boolean" and table1 [1] and type (table2 [1]) == "boolean" and table2) then --> ambos sao dano
|
||||
return table1 [5] > table2 [5] --> joga pra cima quem tem mais vida
|
||||
elseif (type (table1 [1]) == "boolean" and not table1 [1] and type (table2 [1]) == "boolean" and not table2) then --> ambos sao cura
|
||||
return table1 [5] < table2 [5] --> joga pra cima quem tem menos vida
|
||||
else
|
||||
if (type (table1 [1]) == "boolean" and table1 and type (table2 [1]) == "boolean" and table2) then --> primeiro é dano e segundo é heal
|
||||
return true --> passa o dano pra frente
|
||||
elseif (type (table2 [1]) == "boolean" and table2 and type (table1 [1]) == "boolean" and table1) then --> primeiro é heal e o segundo é dano
|
||||
return false --> passa o heal pra frente
|
||||
else
|
||||
return table1 [5] < table2 [5] --> passa quem tem menos vida
|
||||
end
|
||||
end
|
||||
else
|
||||
return table1 [4] < table2 [4]
|
||||
end
|
||||
end)
|
||||
|
||||
if (_hook_deaths) then
|
||||
--> send event to registred functions
|
||||
@@ -2351,324 +2369,276 @@
|
||||
-- PARSER
|
||||
--serach key: ~parser ~event ~start ~inicio
|
||||
|
||||
function _detalhes:OnEvent (evento, ...)
|
||||
_detalhes.parser_functions = {}
|
||||
|
||||
--print (evento, select (1, ...))
|
||||
|
||||
if (evento == "ZONE_CHANGED_NEW_AREA" or evento == "PLAYER_ENTERING_WORLD") then
|
||||
function _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA (...)
|
||||
local zoneName, zoneType, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
|
||||
local zoneName, zoneType, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
_detalhes.zone_type = zoneType
|
||||
_detalhes.zone_id = zoneMapID
|
||||
_detalhes.zone_name = zoneName
|
||||
|
||||
if (zoneType == "pvp") then
|
||||
if (not _current_combat.pvp) then
|
||||
|
||||
_detalhes.zone_type = zoneType
|
||||
_detalhes.zone_id = zoneMapID
|
||||
_detalhes.zone_name = zoneName
|
||||
|
||||
if (zoneType == "pvp") then
|
||||
if (not _current_combat.pvp) then
|
||||
--print ("Battleground found, starting new combat table")
|
||||
_detalhes:EntrarEmCombate()
|
||||
--> sinaliza que esse combate é pvp
|
||||
_current_combat.pvp = true
|
||||
_current_combat.is_pvp = {name = zoneName, zone = ZoneName, mapid = ZoneMapID}
|
||||
_detalhes.listener:RegisterEvent ("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||
end
|
||||
else
|
||||
|
||||
if (_detalhes:IsInInstance()) then
|
||||
_detalhes.last_instance = zoneMapID
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) battleground found, starting new combat table.")
|
||||
end
|
||||
|
||||
if (_current_combat.pvp) then
|
||||
_current_combat.pvp = false
|
||||
end
|
||||
_detalhes:EntrarEmCombate()
|
||||
--> sinaliza que esse combate é pvp
|
||||
_current_combat.pvp = true
|
||||
_current_combat.is_pvp = {name = zoneName, zone = ZoneName, mapid = ZoneMapID}
|
||||
_detalhes.listener:RegisterEvent ("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||
end
|
||||
else
|
||||
if (_detalhes:IsInInstance()) then
|
||||
_detalhes.last_instance = zoneMapID
|
||||
end
|
||||
|
||||
_detalhes:SchedulePetUpdate (7)
|
||||
|
||||
return
|
||||
|
||||
elseif (evento == "ENCOUNTER_START") then
|
||||
--~encounter
|
||||
|
||||
_table_wipe (_detalhes.encounter_table)
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
|
||||
local zoneName, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
|
||||
--print (encounterID, encounterName, difficultyID, raidSize)
|
||||
|
||||
_detalhes.encounter_table ["start"] = time()
|
||||
_detalhes.encounter_table ["end"] = nil
|
||||
|
||||
_detalhes.encounter_table.id = encounterID
|
||||
_detalhes.encounter_table.name = encounterName
|
||||
_detalhes.encounter_table.diff = difficultyID
|
||||
_detalhes.encounter_table.size = raidSize
|
||||
_detalhes.encounter_table.zone = zoneName
|
||||
_detalhes.encounter_table.mapid = zoneMapID
|
||||
|
||||
local encounter_start_table = _detalhes:GetEncounterStartInfo (zoneMapID, encounterID)
|
||||
if (encounter_start_table) then
|
||||
if (encounter_start_table.delay) then
|
||||
if (type (encounter_start_table.delay) == "function") then
|
||||
local delay = encounter_start_table.delay()
|
||||
if (delay) then
|
||||
_detalhes.encounter_table ["start"] = time() + delay
|
||||
end
|
||||
else
|
||||
_detalhes.encounter_table ["start"] = time() + encounter_start_table.delay
|
||||
if (_current_combat.pvp) then
|
||||
_current_combat.pvp = false
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SchedulePetUpdate (7)
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_ENTERING_WORLD (...)
|
||||
return _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA (...)
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:ENCOUNTER_START (...)
|
||||
_table_wipe (_detalhes.encounter_table)
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize = _select (1, ...)
|
||||
local zoneName, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
|
||||
--print (encounterID, encounterName, difficultyID, raidSize)
|
||||
|
||||
_detalhes.encounter_table ["start"] = time()
|
||||
_detalhes.encounter_table ["end"] = nil
|
||||
|
||||
_detalhes.encounter_table.id = encounterID
|
||||
_detalhes.encounter_table.name = encounterName
|
||||
_detalhes.encounter_table.diff = difficultyID
|
||||
_detalhes.encounter_table.size = raidSize
|
||||
_detalhes.encounter_table.zone = zoneName
|
||||
_detalhes.encounter_table.mapid = zoneMapID
|
||||
|
||||
local encounter_start_table = _detalhes:GetEncounterStartInfo (zoneMapID, encounterID)
|
||||
if (encounter_start_table) then
|
||||
if (encounter_start_table.delay) then
|
||||
if (type (encounter_start_table.delay) == "function") then
|
||||
local delay = encounter_start_table.delay()
|
||||
if (delay) then
|
||||
_detalhes.encounter_table ["start"] = time() + delay
|
||||
end
|
||||
end
|
||||
if (encounter_start_table.func) then
|
||||
encounter_start_table:func()
|
||||
else
|
||||
_detalhes.encounter_table ["start"] = time() + encounter_start_table.delay
|
||||
end
|
||||
end
|
||||
|
||||
local encounter_table, boss_index = _detalhes:GetBossEncounterDetailsFromEncounterId (zoneMapID, encounterID)
|
||||
if (encounter_table) then
|
||||
_detalhes.encounter_table.index = boss_index
|
||||
if (encounter_start_table.func) then
|
||||
encounter_start_table:func()
|
||||
end
|
||||
end
|
||||
|
||||
local encounter_table, boss_index = _detalhes:GetBossEncounterDetailsFromEncounterId (zoneMapID, encounterID)
|
||||
if (encounter_table) then
|
||||
_detalhes.encounter_table.index = boss_index
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:ENCOUNTER_END (...)
|
||||
if (not _detalhes.encounter_table.start) then
|
||||
return
|
||||
end
|
||||
|
||||
_detalhes.encounter_table ["end"] = time() - 0.4
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize, endStatus = _select (1, ...)
|
||||
local _, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
|
||||
if (_in_combat) then
|
||||
if (endStatus == 1) then
|
||||
_detalhes.encounter_table.kill = true
|
||||
_detalhes:SairDoCombate (true, true) --killed
|
||||
else
|
||||
_detalhes.encounter_table.kill = false
|
||||
_detalhes:SairDoCombate (false, true) --wipe
|
||||
end
|
||||
else
|
||||
if (_detalhes.tabela_vigente.end_time + 2 >= _detalhes.encounter_table ["end"]) then
|
||||
--_detalhes.tabela_vigente.start_time = _detalhes.encounter_table ["start"]
|
||||
_detalhes.tabela_vigente.end_time = _detalhes.encounter_table ["end"]
|
||||
_detalhes:AtualizaGumpPrincipal (-1, true)
|
||||
end
|
||||
end
|
||||
|
||||
_table_wipe (_detalhes.encounter_table)
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:CHAT_MSG_BG_SYSTEM_NEUTRAL (...)
|
||||
local frase = _select (1, ...)
|
||||
--> reset combat timer
|
||||
if ( (frase:find ("The battle") and frase:find ("has begun!") ) and _current_combat.pvp) then
|
||||
local tempo_do_combate = _tempo - _current_combat.start_time
|
||||
_detalhes.tabela_overall.start_time = _detalhes.tabela_overall.start_time + tempo_do_combate
|
||||
_current_combat.start_time = _tempo
|
||||
_detalhes.listener:UnregisterEvent ("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:UNIT_PET (...)
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_REGEN_DISABLED (...)
|
||||
if (_detalhes.EncounterInformation [_detalhes.zone_id]) then
|
||||
_detalhes:ScheduleTimer ("ReadBossFrames", 1)
|
||||
_detalhes:ScheduleTimer ("ReadBossFrames", 30)
|
||||
end
|
||||
|
||||
if (not _detalhes:CaptureGet ("damage")) then
|
||||
_detalhes:EntrarEmCombate()
|
||||
end
|
||||
|
||||
--> essa parte do solo mode ainda sera usada?
|
||||
if (_detalhes.solo and _detalhes.PluginCount.SOLO > 0) then --> solo mode
|
||||
local esta_instancia = _detalhes.tabela_instancias[_detalhes.solo]
|
||||
esta_instancia.atualizando = true
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_REGEN_ENABLED (...)
|
||||
--> aqui, tentativa de fazer o timer da janela do Solo funcionar corretamente:
|
||||
if (_detalhes.solo and _detalhes.PluginCount.SOLO > 0) then
|
||||
if (_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Stop) then
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Stop()
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_flag_boss_components) then
|
||||
_detalhes.schedule_flag_boss_components = false
|
||||
_detalhes:FlagActorsOnBossFight()
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_remove_overall) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) found schedule overall data deletion.")
|
||||
end
|
||||
_detalhes.schedule_remove_overall = false
|
||||
_detalhes.tabela_historico:resetar_overall()
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_add_to_overall) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) found schedule overall data addition.")
|
||||
end
|
||||
_detalhes.schedule_add_to_overall = false
|
||||
|
||||
_detalhes.historico:adicionar_overall (_detalhes.tabela_vigente)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:GROUP_ROSTER_UPDATE (...)
|
||||
if (not _detalhes.in_group) then
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
if (_detalhes.in_group) then
|
||||
--> entrou num grupo
|
||||
_detalhes:IniciarColetaDeLixo (true)
|
||||
_detalhes:WipePets()
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
|
||||
end
|
||||
else
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
if (not _detalhes.in_group) then
|
||||
--> saiu do grupo
|
||||
_detalhes:IniciarColetaDeLixo (true)
|
||||
_detalhes:WipePets()
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
_table_wipe (_detalhes.details_users)
|
||||
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
|
||||
else
|
||||
_detalhes:SchedulePetUpdate (2)
|
||||
_detalhes:CheckDetailsUsers()
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SchedulePetUpdate (6)
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:START_TIMER (...)
|
||||
if (C_Scenario.IsChallengeMode() and _detalhes.overall_clear_newchallenge) then
|
||||
_detalhes.historico:resetar_overall()
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_LOGOUT (...)
|
||||
--> close info window
|
||||
_detalhes:FechaJanelaInfo()
|
||||
|
||||
--> leave combat start save tables
|
||||
if (_detalhes.in_combat) then
|
||||
_detalhes:SairDoCombate()
|
||||
_detalhes.can_panic_mode = true
|
||||
end
|
||||
|
||||
elseif (evento == "ENCOUNTER_END") then
|
||||
|
||||
if (not _detalhes.encounter_table.start) then
|
||||
if (_detalhes.wipe_full_config) then
|
||||
_detalhes_global = nil
|
||||
_detalhes_database = nil
|
||||
return
|
||||
end
|
||||
|
||||
_detalhes.encounter_table ["end"] = time() - 0.4
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize, endStatus = _select (1, ...)
|
||||
local _, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
|
||||
--[[
|
||||
local encounter_end_table = _detalhes:GetEncounterStartInfo (zoneMapID, encounterID)
|
||||
if (encounter_end_table) then
|
||||
if (encounter_end_table.delay) then
|
||||
_detalhes.encounter_table ["end"] = _detalhes.encounter_table ["end"] + encounter_end_table.delay
|
||||
end
|
||||
if (encounter_end_table.func) then
|
||||
encounter_end_table:func (_detalhes.tabela_vigente, endStatus)
|
||||
end
|
||||
end
|
||||
--]]
|
||||
|
||||
if (_in_combat) then
|
||||
if (endStatus == 1) then
|
||||
_detalhes.encounter_table.kill = true
|
||||
_detalhes:SairDoCombate (true, true) --killed
|
||||
else
|
||||
_detalhes.encounter_table.kill = false
|
||||
_detalhes:SairDoCombate (false, true) --wipe
|
||||
end
|
||||
else
|
||||
if (_detalhes.tabela_vigente.end_time + 2 >= _detalhes.encounter_table ["end"]) then
|
||||
--_detalhes.tabela_vigente.start_time = _detalhes.encounter_table ["start"]
|
||||
_detalhes.tabela_vigente.end_time = _detalhes.encounter_table ["end"]
|
||||
_detalhes:AtualizaGumpPrincipal (-1, true)
|
||||
end
|
||||
end
|
||||
_detalhes:SaveConfig()
|
||||
_detalhes:SaveProfile()
|
||||
|
||||
_table_wipe (_detalhes.encounter_table)
|
||||
_detalhes_database.nick_tag_cache = table_deepcopy (_detalhes_database.nick_tag_cache)
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:ADDON_LOADED (...)
|
||||
|
||||
local addon_name = _select (1, ...)
|
||||
|
||||
elseif (evento == "CHAT_MSG_BG_SYSTEM_NEUTRAL") then
|
||||
local frase = _select (1, ...)
|
||||
|
||||
--> reset combat timer
|
||||
if ( (frase:find ("The battle") and frase:find ("has begun!") ) and _current_combat.pvp) then
|
||||
local tempo_do_combate = _tempo - _current_combat.start_time
|
||||
_detalhes.tabela_overall.start_time = _detalhes.tabela_overall.start_time + tempo_do_combate
|
||||
_current_combat.start_time = _tempo
|
||||
_detalhes.listener:UnregisterEvent ("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
elseif (evento == "UNIT_PET") then
|
||||
--_detalhes.container_pets:BuscarPets()
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
if (addon_name == "Details") then
|
||||
|
||||
elseif (evento == "PLAYER_REGEN_DISABLED") then -- Entrou em Combate
|
||||
--> inicia um timer para pegar qual é a luta:
|
||||
|
||||
if (_detalhes.EncounterInformation [_detalhes.zone_id]) then
|
||||
_detalhes:ScheduleTimer ("ReadBossFrames", 1)
|
||||
_detalhes:ScheduleTimer ("ReadBossFrames", 30)
|
||||
end
|
||||
|
||||
if (not _detalhes:CaptureGet ("damage")) then
|
||||
_detalhes:EntrarEmCombate()
|
||||
end
|
||||
|
||||
--> essa parte do solo mode ainda sera usada?
|
||||
if (_detalhes.solo and _detalhes.PluginCount.SOLO > 0) then --> solo mode
|
||||
local esta_instancia = _detalhes.tabela_instancias[_detalhes.solo]
|
||||
esta_instancia.atualizando = true
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
elseif (evento == "PLAYER_REGEN_ENABLED") then
|
||||
--> essa parte do solo mode ainda sera usada?
|
||||
if (_detalhes.solo and _detalhes.PluginCount.SOLO > 0) then --> aqui, tentativa de fazer o timer da janela do Solo funcionar corretamente:
|
||||
if (_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Stop) then
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Stop()
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_flag_boss_components) then
|
||||
_detalhes.schedule_flag_boss_components = false
|
||||
_detalhes:FlagActorsOnBossFight()
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_remove_overall) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) found schedule overall data deletion.")
|
||||
end
|
||||
_detalhes.schedule_remove_overall = false
|
||||
_detalhes.tabela_historico:resetar_overall()
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_add_to_overall) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) found schedule overall data addition.")
|
||||
end
|
||||
_detalhes.schedule_add_to_overall = false
|
||||
|
||||
_detalhes.historico:adicionar_overall (_detalhes.tabela_vigente)
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
elseif (evento == "GROUP_ROSTER_UPDATE") then
|
||||
|
||||
if (not _detalhes.in_group) then
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
if (_detalhes.in_group) then
|
||||
--> entrou num grupo
|
||||
_detalhes:IniciarColetaDeLixo (true)
|
||||
_detalhes:WipePets()
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
|
||||
end
|
||||
else
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
if (not _detalhes.in_group) then
|
||||
--> saiu do grupo
|
||||
_detalhes:IniciarColetaDeLixo (true)
|
||||
_detalhes:WipePets()
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
_table_wipe (_detalhes.details_users)
|
||||
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
|
||||
else
|
||||
_detalhes:SchedulePetUpdate (2)
|
||||
_detalhes:CheckDetailsUsers()
|
||||
end
|
||||
end
|
||||
|
||||
--_detalhes.container_pets:BuscarPets()
|
||||
_detalhes:SchedulePetUpdate (6)
|
||||
|
||||
return
|
||||
|
||||
elseif (evento == "PARTY_MEMBERS_CHANGED") then
|
||||
--> Nothing to do here
|
||||
return
|
||||
|
||||
elseif (evento == "PARTY_CONVERTED_TO_RAID") then
|
||||
--> Nothing to do here
|
||||
return
|
||||
|
||||
elseif (evento == "INSTANCE_ENCOUNTER_ENGAGE_UNIT") then
|
||||
--> Nothing to do here
|
||||
return
|
||||
|
||||
elseif (evento == "START_TIMER") then
|
||||
|
||||
if (C_Scenario.IsChallengeMode() and _detalhes.overall_clear_newchallenge) then
|
||||
_detalhes.historico:resetar_overall()
|
||||
end
|
||||
|
||||
elseif (evento == "WORLD_STATE_TIMER_START") then
|
||||
--> Nothing to do here
|
||||
return
|
||||
|
||||
elseif (evento == "PLAYER_LOGOUT") then
|
||||
|
||||
--> close info window
|
||||
_detalhes:FechaJanelaInfo()
|
||||
|
||||
--> leave combat start save tables
|
||||
if (_detalhes.in_combat) then
|
||||
_detalhes:SairDoCombate()
|
||||
_detalhes.can_panic_mode = true
|
||||
end
|
||||
|
||||
if (_detalhes.wipe_full_config) then
|
||||
_detalhes_global = nil
|
||||
_detalhes_database = nil
|
||||
return
|
||||
end
|
||||
|
||||
--if (UnitName ("player") == "Tiranaa" or UnitName ("player") == "Triciclo") then
|
||||
_detalhes:SaveConfig()
|
||||
_detalhes:SaveProfile()
|
||||
|
||||
_detalhes_database.nick_tag_cache = table_deepcopy (_detalhes_database.nick_tag_cache)
|
||||
|
||||
--_detalhes_global = nil
|
||||
--_detalhes_database = nil
|
||||
|
||||
--else
|
||||
-- return _detalhes:SaveData()
|
||||
--end
|
||||
|
||||
elseif (evento == "ADDON_LOADED") then
|
||||
|
||||
local addon_name = _select (1, ...)
|
||||
|
||||
if (addon_name == "Details") then
|
||||
|
||||
--> cooltip
|
||||
if (not _G.GameCooltip) then
|
||||
_detalhes.popup = DetailsCreateCoolTip()
|
||||
else
|
||||
_detalhes.popup = _G.GameCooltip
|
||||
end
|
||||
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
|
||||
--_detalhes:ApplyBasicKeys()
|
||||
|
||||
--if (_detalhes_global and _detalhes_global.profile_pool and _detalhes_global.profile_pool [UnitGUID ("player")]) then
|
||||
--> write into details object all basic keys
|
||||
_detalhes:ApplyBasicKeys()
|
||||
--> check if is first run
|
||||
_detalhes:LoadGlobalAndCharacterData()
|
||||
--> load all the saved combats
|
||||
_detalhes:LoadCombatTables()
|
||||
--> load the profiles
|
||||
_detalhes:LoadConfig()
|
||||
|
||||
--else
|
||||
--> load the addon
|
||||
-- _detalhes:LoadData()
|
||||
--end
|
||||
|
||||
_detalhes:UpdateParserGears()
|
||||
_detalhes:Start()
|
||||
if (not _G.GameCooltip) then
|
||||
_detalhes.popup = DetailsCreateCoolTip()
|
||||
else
|
||||
_detalhes.popup = _G.GameCooltip
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
||||
--> check group
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
|
||||
--> write into details object all basic keys
|
||||
_detalhes:ApplyBasicKeys()
|
||||
--> check if is first run
|
||||
_detalhes:LoadGlobalAndCharacterData()
|
||||
--> load all the saved combats
|
||||
_detalhes:LoadCombatTables()
|
||||
--> load the profiles
|
||||
_detalhes:LoadConfig()
|
||||
|
||||
_detalhes:UpdateParserGears()
|
||||
_detalhes:Start()
|
||||
end
|
||||
end
|
||||
|
||||
local parser_functions = _detalhes.parser_functions
|
||||
|
||||
function _detalhes:OnEvent (evento, ...)
|
||||
local func = parser_functions [evento]
|
||||
if (func) then
|
||||
return func (nil, ...)
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.listener:SetScript ("OnEvent", _detalhes.OnEvent)
|
||||
|
||||
function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...)
|
||||
|
||||
--print (alvo_name, alvo_flags2)
|
||||
|
||||
local funcao = token_list [token]
|
||||
if (funcao) then
|
||||
return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, ... )
|
||||
|
||||
+28
-21
@@ -467,9 +467,7 @@
|
||||
|
||||
end
|
||||
|
||||
|
||||
--> work around to solve the UI Frame Flashes
|
||||
|
||||
local onFinish = function (self)
|
||||
if (self.showWhenDone) then
|
||||
self.frame:SetAlpha (1)
|
||||
@@ -477,57 +475,66 @@
|
||||
self.frame:SetAlpha (0)
|
||||
self.frame:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
local onLoop = function (self)
|
||||
if (self.finishAt < GetTime()) then
|
||||
self:Stop()
|
||||
|
||||
if (frame.FlashAnimation.onFinishFunc) then
|
||||
frame.FlashAnimation:onFinishFunc (frame)
|
||||
end
|
||||
end
|
||||
|
||||
local stop = function (self)
|
||||
local FlashAnimation = self.FlashAnimation
|
||||
FlashAnimation:Stop()
|
||||
end
|
||||
|
||||
local flash = function (self, fadeInTime, fadeOutTime, flashDuration, showWhenDone, flashInHoldTime, flashOutHoldTime)
|
||||
local flash = function (self, fadeInTime, fadeOutTime, flashDuration, showWhenDone, flashInHoldTime, flashOutHoldTime, loopType)
|
||||
|
||||
local FlashAnimation = self.FlashAnimation
|
||||
|
||||
local fadeIn = FlashAnimation.fadeIn
|
||||
local fadeOut = FlashAnimation.fadeOut
|
||||
|
||||
fadeIn:Stop()
|
||||
fadeOut:Stop()
|
||||
|
||||
fadeIn:SetDuration (fadeInTime)
|
||||
fadeIn:SetDuration (fadeInTime or 1)
|
||||
fadeIn:SetEndDelay (flashInHoldTime or 0)
|
||||
|
||||
fadeOut:SetDuration (fadeOutTime)
|
||||
fadeOut:SetDuration (fadeOutTime or 1)
|
||||
fadeOut:SetEndDelay (flashOutHoldTime or 0)
|
||||
|
||||
fadeIn:SetOrder (1)
|
||||
fadeOut:SetOrder (2)
|
||||
|
||||
fadeIn:SetChange (-1)
|
||||
fadeOut:SetChange (1)
|
||||
|
||||
|
||||
FlashAnimation.duration = flashDuration
|
||||
FlashAnimation.loopTime = FlashAnimation:GetDuration()
|
||||
FlashAnimation.finishAt = GetTime() + flashDuration
|
||||
FlashAnimation.showWhenDone = showWhenDone
|
||||
|
||||
FlashAnimation:SetLooping ("REPEAT")
|
||||
FlashAnimation:SetLooping (loopType or "REPEAT")
|
||||
|
||||
self:Show()
|
||||
self:SetAlpha (0)
|
||||
FlashAnimation:Play()
|
||||
end
|
||||
|
||||
function gump:CreateFlashAnimation (frame)
|
||||
function gump:CreateFlashAnimation (frame, onFinishFunc, onLoopFunc)
|
||||
|
||||
local FlashAnimation = frame:CreateAnimationGroup()
|
||||
|
||||
FlashAnimation.fadeIn = FlashAnimation:CreateAnimation ("Alpha") --> fade in anime
|
||||
FlashAnimation.fadeOut = FlashAnimation:CreateAnimation ("Alpha") --> fade out anime
|
||||
FlashAnimation.fadeOut:SetOrder (1)
|
||||
FlashAnimation.fadeOut:SetChange (1)
|
||||
|
||||
FlashAnimation.fadeIn = FlashAnimation:CreateAnimation ("Alpha") --> fade in anime
|
||||
FlashAnimation.fadeIn:SetOrder (2)
|
||||
FlashAnimation.fadeIn:SetChange (-1)
|
||||
|
||||
frame.FlashAnimation = FlashAnimation
|
||||
FlashAnimation.frame = frame
|
||||
FlashAnimation.onFinishFunc = onFinishFunc
|
||||
|
||||
FlashAnimation:SetScript ("OnLoop", onLoop)
|
||||
FlashAnimation:SetScript ("OnLoop", onLoopFunc)
|
||||
FlashAnimation:SetScript ("OnFinished", onFinish)
|
||||
|
||||
frame.Flash = flash
|
||||
frame.Stop = stop
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -452,16 +452,16 @@ local ButtonMetaFunctions = {}
|
||||
--> scripts
|
||||
|
||||
local OnEnter = function (button)
|
||||
|
||||
|
||||
if (button.MyObject.OnEnterHook) then
|
||||
local interrupt = button.MyObject.OnEnterHook (button)
|
||||
if (interrupt) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
button.MyObject.is_mouse_over = true
|
||||
|
||||
|
||||
if (button.texture) then
|
||||
if (button.texture.coords) then
|
||||
button.texture:SetTexCoord (_unpack (button.texture.coords.Highlight))
|
||||
@@ -469,7 +469,7 @@ local ButtonMetaFunctions = {}
|
||||
button.texture:SetTexCoord (0, 1, 0.24609375, 0.49609375)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (button.MyObject.have_tooltip) then
|
||||
_detalhes:CooltipPreset (1)
|
||||
GameCooltip:AddLine (button.MyObject.have_tooltip)
|
||||
|
||||
@@ -2504,7 +2504,7 @@ function DetailsCreateCoolTip()
|
||||
elseif (menu.statusbar) then
|
||||
CoolTip:AddStatusBar (menu.value, menu.type or 1, menu.color, true)
|
||||
elseif (menu.icon) then
|
||||
CoolTip:AddIcon (menu.icon, menu.type or 1, menu.side or 1, menu.width, menu.height, menu.l, menu.r, menu.t, menu.b)
|
||||
CoolTip:AddIcon (menu.icon, menu.type or 1, menu.side or 1, menu.width, menu.height, menu.l, menu.r, menu.t, menu.b, menu.color)
|
||||
elseif (menu.textleft or menu.textright or menu.text) then
|
||||
CoolTip:AddLine (menu.text, "", menu.type, menu.color, menu.color)
|
||||
end
|
||||
|
||||
@@ -363,7 +363,7 @@ function DropDownMetaFunctions:Select (optionName, byOptionNumber)
|
||||
end
|
||||
|
||||
for _, thisMenu in ipairs (menu) do
|
||||
if (thisMenu.label == optionName and isOptionVisible (thisMenu)) then
|
||||
if ( ( thisMenu.label == optionName or thisMenu.value == optionName ) and isOptionVisible (thisMenu)) then
|
||||
self:Selected (thisMenu)
|
||||
return true
|
||||
end
|
||||
|
||||
+30
-5
@@ -695,13 +695,17 @@ local SwitchOnClick = function (self, button, forced_value, value)
|
||||
|
||||
local slider = self.MyObject
|
||||
|
||||
if (_rawget (slider, "lockdown")) then
|
||||
return
|
||||
end
|
||||
|
||||
if (forced_value) then
|
||||
rawset (slider, "value", not value)
|
||||
_rawset (slider, "value", not value)
|
||||
end
|
||||
|
||||
if (rawget (slider, "value")) then --actived
|
||||
if (_rawget (slider, "value")) then --actived
|
||||
|
||||
rawset (slider, "value", false)
|
||||
_rawset (slider, "value", false)
|
||||
slider._text:SetText (slider._ltext)
|
||||
slider._thumb:ClearAllPoints()
|
||||
|
||||
@@ -710,7 +714,7 @@ local SwitchOnClick = function (self, button, forced_value, value)
|
||||
|
||||
else
|
||||
|
||||
rawset (slider, "value", true)
|
||||
_rawset (slider, "value", true)
|
||||
slider._text:SetText (slider._rtext)
|
||||
slider._thumb:ClearAllPoints()
|
||||
|
||||
@@ -720,7 +724,7 @@ local SwitchOnClick = function (self, button, forced_value, value)
|
||||
end
|
||||
|
||||
if (slider.OnSwitch and not forced_value) then
|
||||
local value = rawget (slider, "value")
|
||||
local value = _rawget (slider, "value")
|
||||
if (slider.return_func) then
|
||||
value = slider:return_func (value)
|
||||
end
|
||||
@@ -753,6 +757,25 @@ local switch_set_fixparameter = function (self, value)
|
||||
_rawset (self, "FixedValue", value)
|
||||
end
|
||||
|
||||
local switch_disable = function (self)
|
||||
if (not self.lock_texture) then
|
||||
gump:NewImage (self, [[Interface\PetBattles\PetBattle-LockIcon]], 12, 12, "overlay", {0.0546875, 0.9453125, 0.0703125, 0.9453125}, "lock_texture", "$parentLockTexture")
|
||||
self.lock_texture:SetDesaturated (true)
|
||||
self.lock_texture:SetPoint ("center", self._thumb, "center")
|
||||
end
|
||||
|
||||
self.lock_texture:Show()
|
||||
self._text:Hide()
|
||||
self:SetAlpha (.4)
|
||||
_rawset (self, "lockdown", true)
|
||||
end
|
||||
local switch_enable = function (self)
|
||||
self.lock_texture:Hide()
|
||||
self._text:Show()
|
||||
self:SetAlpha (1)
|
||||
return _rawset (self, "lockdown", false)
|
||||
end
|
||||
|
||||
function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, default_value, color_inverted, switch_func, return_func)
|
||||
|
||||
--> early checks
|
||||
@@ -778,6 +801,8 @@ function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, de
|
||||
slider.SetValue = switch_set_value
|
||||
slider.GetValue = switch_get_value
|
||||
slider.SetFixedParameter = switch_set_fixparameter
|
||||
slider.Disable = switch_disable
|
||||
slider.Enable = switch_enable
|
||||
|
||||
if (member) then
|
||||
parent [member] = slider
|
||||
|
||||
+51
-43
@@ -154,53 +154,61 @@ function _detalhes:LoadCombatTables()
|
||||
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
else
|
||||
|
||||
--> build basic containers
|
||||
-- segments
|
||||
_detalhes.tabela_historico = _detalhes_database.tabela_historico or _detalhes.historico:NovoHistorico()
|
||||
-- overall
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
-- pets
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
if (_detalhes_database.tabela_pets) then
|
||||
_detalhes.tabela_pets.pets = _detalhes_database.tabela_pets
|
||||
end
|
||||
|
||||
--> if the core revision was incremented, reset all combat data
|
||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < _detalhes.realversion) then
|
||||
--> details was been hard upgraded
|
||||
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
end
|
||||
|
||||
--> re-build all indexes and metatables
|
||||
_detalhes:RestauraMetaTables()
|
||||
|
||||
--> get last combat table
|
||||
local historico_UM = _detalhes.tabela_historico.tabelas[1]
|
||||
|
||||
if (historico_UM) then
|
||||
_detalhes.tabela_vigente = historico_UM --> significa que elas eram a mesma tabela, então aqui elas se tornam a mesma tabela
|
||||
else
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
end
|
||||
|
||||
--> build basic containers
|
||||
-- segments
|
||||
_detalhes.tabela_historico = _detalhes_database.tabela_historico or _detalhes.historico:NovoHistorico()
|
||||
-- overall
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
|
||||
-- pets
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
if (_detalhes_database.tabela_pets) then
|
||||
_detalhes.tabela_pets.pets = table_deepcopy (_detalhes_database.tabela_pets)
|
||||
end
|
||||
|
||||
--> if the core revision was incremented, reset all combat data
|
||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < _detalhes.realversion) then
|
||||
--> details was been hard upgraded
|
||||
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
end
|
||||
|
||||
--> re-build all indexes and metatables
|
||||
_detalhes:RestauraMetaTables()
|
||||
|
||||
--> get last combat table
|
||||
local historico_UM = _detalhes.tabela_historico.tabelas[1]
|
||||
|
||||
if (historico_UM) then
|
||||
_detalhes.tabela_vigente = historico_UM --> significa que elas eram a mesma tabela, então aqui elas se tornam a mesma tabela
|
||||
else
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
end
|
||||
|
||||
--> need refresh for all containers
|
||||
for _, container in ipairs (_detalhes.tabela_overall) do
|
||||
container.need_refresh = true
|
||||
end
|
||||
for _, container in ipairs (_detalhes.tabela_vigente) do
|
||||
container.need_refresh = true
|
||||
end
|
||||
|
||||
--> erase combat data from the database
|
||||
_detalhes_database.tabela_vigente = nil
|
||||
_detalhes_database.tabela_historico = nil
|
||||
_detalhes_database.tabela_pets = nil
|
||||
|
||||
-- double check for pet container
|
||||
if (not _detalhes.tabela_pets or not _detalhes.tabela_pets.pets) then
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
end
|
||||
|
||||
--> need refresh for all containers
|
||||
for _, container in ipairs (_detalhes.tabela_overall) do
|
||||
container.need_refresh = true
|
||||
end
|
||||
for _, container in ipairs (_detalhes.tabela_vigente) do
|
||||
container.need_refresh = true
|
||||
end
|
||||
|
||||
--> erase combat data from the database
|
||||
_detalhes_database.tabela_vigente = nil
|
||||
_detalhes_database.tabela_historico = nil
|
||||
_detalhes_database.tabela_pets = nil
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+19
-3
@@ -493,9 +493,9 @@ local default_profile = {
|
||||
},
|
||||
|
||||
--> minimap
|
||||
minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1},
|
||||
minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1, HotCornerIgnore = true},
|
||||
--> horcorner
|
||||
hotcorner_topleft = {hide = false, onclick_what_todo = 1, quickclick = true, quickclick_what_todo = 2},
|
||||
hotcorner_topleft = {hide = false, onclick_what_todo = 1, topleft_quickclick = true, quickclick_what_todo = 2},
|
||||
|
||||
--> PvP
|
||||
only_pvp_frags = false,
|
||||
@@ -576,7 +576,23 @@ local default_profile = {
|
||||
skin = "Default Skin", --?
|
||||
|
||||
--> tooltip
|
||||
tooltip = {fontface = "Friz Quadrata TT", fontsize = 10, fontcolor = {1, 1, 1, 1}, fontshadow = false, background = {.1, .1, .1, .3}, abbreviation = 8, maximize_method = 1, show_amount = false, commands = {}},
|
||||
tooltip = {
|
||||
fontface = "Friz Quadrata TT",
|
||||
fontsize = 10,
|
||||
fontcolor = {1, 1, 1, 1},
|
||||
fontshadow = false,
|
||||
background = {.1, .1, .1, .3},
|
||||
abbreviation = 8,
|
||||
maximize_method = 1,
|
||||
show_amount = false,
|
||||
commands = {},
|
||||
|
||||
anchored_to = 1,
|
||||
anchor_screen_pos = {507.700, -350.500},
|
||||
anchor_point = "bottom",
|
||||
anchor_relative = "top",
|
||||
anchor_offset = {0, 0},
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -157,8 +157,10 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
local i = 1
|
||||
for k, v in pairs (_detalhes.tabela_pets.pets) do
|
||||
_detalhes.ListPanel:add (k..": " .. v[1] .. " | " .. v[2] .. " | " .. v[3], i)
|
||||
i = i + 1
|
||||
if (v[6] == "Guardian of Ancient Kings") then
|
||||
_detalhes.ListPanel:add ( k.. ": " .. v[1] .. " | " .. v[2] .. " | " .. v[3] .. " | " .. v[6], i)
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
|
||||
f:Show()
|
||||
|
||||
+187
-15
@@ -1087,12 +1087,152 @@ function window:CreateFrame20()
|
||||
|
||||
window:CreateLineBackground2 (frame20, "TooltipShowAmountSlider", "TooltipShowAmountLabel", Loc ["STRING_OPTIONS_TOOLTIPS_SHOWAMT_DESC"])
|
||||
|
||||
--> tooltip anchors
|
||||
|
||||
--unlock screen anchor
|
||||
g:NewLabel (frame20, _, "$parentUnlockAnchorButtonLabel", "UnlockAnchorButtonLabel", "", "GameFontHighlightLeft")
|
||||
|
||||
local unlock_function = function()
|
||||
DetailsTooltipAnchor:MoveAnchor()
|
||||
end
|
||||
local unlock_anchor_button = g:NewButton (frame20, nil, "$parentUnlockAnchorButton", "UnlockAnchorButton", 160, 20, unlock_function, nil, nil, nil, Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_CHOOSE"])
|
||||
unlock_anchor_button:InstallCustomTexture()
|
||||
|
||||
if (_detalhes.tooltip.anchored_to == 1) then
|
||||
unlock_anchor_button:Disable()
|
||||
else
|
||||
unlock_anchor_button:Enable()
|
||||
end
|
||||
|
||||
frame20.UnlockAnchorButton:SetPoint ("left", frame20.UnlockAnchorButtonLabel, "right", 0, 0)
|
||||
window:CreateLineBackground2 (frame20, "UnlockAnchorButton", "UnlockAnchorButtonLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_CHOOSE_DESC"])
|
||||
|
||||
--main anchor
|
||||
g:NewLabel (frame20, _, "$parentTooltipAnchorLabel", "TooltipAnchorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO"], "GameFontHighlightLeft")
|
||||
local onSelectAnchor = function (_, _, selected_anchor)
|
||||
_detalhes.tooltip.anchored_to = selected_anchor
|
||||
if (selected_anchor == 1) then
|
||||
unlock_anchor_button:Disable()
|
||||
else
|
||||
unlock_anchor_button:Enable()
|
||||
end
|
||||
end
|
||||
|
||||
local anchorOptions = {
|
||||
{value = 1, label = Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO1"], onclick = onSelectAnchor, icon = [[Interface\Buttons\UI-GuildButton-OfficerNote-Disabled]]},
|
||||
{value = 2, label = Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO2"], onclick = onSelectAnchor, icon = [[Interface\Buttons\UI-GuildButton-OfficerNote-Disabled]]},
|
||||
}
|
||||
local buildAnchorMenu = function()
|
||||
return anchorOptions
|
||||
end
|
||||
|
||||
local d = g:NewDropDown (frame20, _, "$parentTooltipAnchorDropdown", "TooltipAnchorDropdown", 160, 20, buildAnchorMenu, _detalhes.tooltip.anchored_to)
|
||||
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||
d.onleave_backdrop = dropdown_backdrop_onleave
|
||||
d:SetBackdrop (dropdown_backdrop)
|
||||
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
|
||||
|
||||
frame20.TooltipAnchorDropdown:SetPoint ("left", frame20.TooltipAnchorLabel, "right", 2, 0)
|
||||
|
||||
window:CreateLineBackground2 (frame20, "TooltipAnchorDropdown", "TooltipAnchorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_DESC"])
|
||||
|
||||
unlock_anchor_button:SetWidth (frame20.TooltipAnchorLabel:GetStringWidth() + 2 + frame20.TooltipAnchorDropdown:GetWidth())
|
||||
|
||||
--tooltip side
|
||||
g:NewLabel (frame20, _, "$parentTooltipAnchorSideLabel", "TooltipAnchorSideLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_ATTACH"], "GameFontHighlightLeft")
|
||||
local onSelectAnchorPoint = function (_, _, selected_anchor)
|
||||
_detalhes.tooltip.anchor_point = selected_anchor
|
||||
end
|
||||
|
||||
local anchorPointOptions = {
|
||||
{value = "top", label = Loc ["STRING_ANCHOR_TOP"], onclick = onSelectAnchorPoint, icon = [[Interface\Buttons\Arrow-Up-Up]], texcoord = {0, 0.8125, 0.1875, 0.875}},
|
||||
{value = "bottom", label = Loc ["STRING_ANCHOR_BOTTOM"], onclick = onSelectAnchorPoint, icon = [[Interface\Buttons\Arrow-Up-Up]], texcoord = {0, 0.875, 1, 0.1875}},
|
||||
{value = "left", label = Loc ["STRING_ANCHOR_LEFT"], onclick = onSelectAnchorPoint, icon = [[Interface\CHATFRAME\UI-InChatFriendsArrow]], texcoord = {0.5, 0, 0, 0.8125}},
|
||||
{value = "right", label = Loc ["STRING_ANCHOR_RIGHT"], onclick = onSelectAnchorPoint, icon = [[Interface\CHATFRAME\UI-InChatFriendsArrow]], texcoord = {0, 0.5, 0, 0.8125}},
|
||||
{value = "topleft", label = Loc ["STRING_ANCHOR_TOPLEFT"], onclick = onSelectAnchorPoint, icon = [[Interface\Buttons\UI-AutoCastableOverlay]], texcoord = {0.796875, 0.609375, 0.1875, 0.375}},
|
||||
{value = "bottomleft", label = Loc ["STRING_ANCHOR_BOTTOMLEFT"], onclick = onSelectAnchorPoint, icon = [[Interface\Buttons\UI-AutoCastableOverlay]], texcoord = {0.796875, 0.609375, 0.375, 0.1875}},
|
||||
{value = "topright", label = Loc ["STRING_ANCHOR_TOPRIGHT"], onclick = onSelectAnchorPoint, icon = [[Interface\Buttons\UI-AutoCastableOverlay]], texcoord = {0.609375, 0.796875, 0.1875, 0.375}},
|
||||
{value = "bottomright", label = Loc ["STRING_ANCHOR_BOTTOMRIGHT"], onclick = onSelectAnchorPoint, icon = [[Interface\Buttons\UI-AutoCastableOverlay]], texcoord = {0.609375, 0.796875, 0.375, 0.1875}},
|
||||
}
|
||||
|
||||
local buildAnchorPointMenu = function()
|
||||
return anchorPointOptions
|
||||
end
|
||||
|
||||
local d = g:NewDropDown (frame20, _, "$parentTooltipAnchorSideDropdown", "TooltipAnchorSideDropdown", 160, 20, buildAnchorPointMenu, _detalhes.tooltip.anchor_point)
|
||||
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||
d.onleave_backdrop = dropdown_backdrop_onleave
|
||||
d:SetBackdrop (dropdown_backdrop)
|
||||
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
|
||||
|
||||
frame20.TooltipAnchorSideDropdown:SetPoint ("left", frame20.TooltipAnchorSideLabel, "right", 2, 0)
|
||||
|
||||
window:CreateLineBackground2 (frame20, "TooltipAnchorSideDropdown", "TooltipAnchorSideLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_ATTACH_DESC"])
|
||||
|
||||
--tooltip relative side
|
||||
g:NewLabel (frame20, _, "$parentTooltipRelativeSideLabel", "TooltipRelativeSideLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_RELATIVE"], "GameFontHighlightLeft")
|
||||
local onSelectAnchorRelative = function (_, _, selected_anchor)
|
||||
_detalhes.tooltip.anchor_relative = selected_anchor
|
||||
end
|
||||
|
||||
local anchorRelativeOptions = {
|
||||
{value = "top", label = Loc ["STRING_ANCHOR_TOP"], onclick = onSelectAnchorRelative, icon = [[Interface\Buttons\Arrow-Up-Up]], texcoord = {0, 0.8125, 0.1875, 0.875}},
|
||||
{value = "bottom", label = Loc ["STRING_ANCHOR_BOTTOM"], onclick = onSelectAnchorRelative, icon = [[Interface\Buttons\Arrow-Up-Up]], texcoord = {0, 0.875, 1, 0.1875}},
|
||||
{value = "left", label = Loc ["STRING_ANCHOR_LEFT"], onclick = onSelectAnchorRelative, icon = [[Interface\CHATFRAME\UI-InChatFriendsArrow]], texcoord = {0.5, 0, 0, 0.8125}},
|
||||
{value = "right", label = Loc ["STRING_ANCHOR_RIGHT"], onclick = onSelectAnchorRelative, icon = [[Interface\CHATFRAME\UI-InChatFriendsArrow]], texcoord = {0, 0.5, 0, 0.8125}},
|
||||
{value = "topleft", label = Loc ["STRING_ANCHOR_TOPLEFT"], onclick = onSelectAnchorRelative, icon = [[Interface\Buttons\UI-AutoCastableOverlay]], texcoord = {0.796875, 0.609375, 0.1875, 0.375}},
|
||||
{value = "bottomleft", label = Loc ["STRING_ANCHOR_BOTTOMLEFT"], onclick = onSelectAnchorRelative, icon = [[Interface\Buttons\UI-AutoCastableOverlay]], texcoord = {0.796875, 0.609375, 0.375, 0.1875}},
|
||||
{value = "topright", label = Loc ["STRING_ANCHOR_TOPRIGHT"], onclick = onSelectAnchorRelative, icon = [[Interface\Buttons\UI-AutoCastableOverlay]], texcoord = {0.609375, 0.796875, 0.1875, 0.375}},
|
||||
{value = "bottomright", label = Loc ["STRING_ANCHOR_BOTTOMRIGHT"], onclick = onSelectAnchorRelative, icon = [[Interface\Buttons\UI-AutoCastableOverlay]], texcoord = {0.609375, 0.796875, 0.375, 0.1875}},
|
||||
}
|
||||
|
||||
local buildAnchorRelativeMenu = function()
|
||||
return anchorRelativeOptions
|
||||
end
|
||||
|
||||
local d = g:NewDropDown (frame20, _, "$parentTooltipRelativeSideDropdown", "TooltipRelativeSideDropdown", 160, 20, buildAnchorRelativeMenu, _detalhes.tooltip.anchor_relative)
|
||||
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||
d.onleave_backdrop = dropdown_backdrop_onleave
|
||||
d:SetBackdrop (dropdown_backdrop)
|
||||
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
|
||||
|
||||
frame20.TooltipRelativeSideDropdown:SetPoint ("left", frame20.TooltipRelativeSideLabel, "right", 2, 0)
|
||||
|
||||
window:CreateLineBackground2 (frame20, "TooltipRelativeSideDropdown", "TooltipRelativeSideLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_RELATIVE_DESC"])
|
||||
|
||||
--tooltip offset
|
||||
g:NewLabel (frame20, _, "$parentTooltipOffsetXLabel", "TooltipOffsetXLabel", Loc ["STRING_OPTIONS_TOOLTIPS_OFFSETX"], "GameFontHighlightLeft")
|
||||
local s = g:NewSlider (frame20, _, "$parentTooltipOffsetXSlider", "TooltipOffsetXSlider", SLIDER_WIDTH, 20, -100, 100, 1, tonumber (_detalhes.tooltip.anchor_offset[1]))
|
||||
s:SetBackdrop (slider_backdrop)
|
||||
s:SetBackdropColor (unpack (slider_backdrop_color))
|
||||
s:SetThumbSize (50)
|
||||
|
||||
frame20.TooltipOffsetXSlider:SetPoint ("left", frame20.TooltipOffsetXLabel, "right", 2)
|
||||
frame20.TooltipOffsetXSlider:SetHook ("OnValueChange", function (self, _, amount)
|
||||
_detalhes.tooltip.anchor_offset[1] = amount
|
||||
end)
|
||||
window:CreateLineBackground2 (frame20, "TooltipOffsetXSlider", "TooltipOffsetXLabel", Loc ["STRING_OPTIONS_TOOLTIPS_OFFSETX_DESC"])
|
||||
|
||||
g:NewLabel (frame20, _, "$parentTooltipOffsetYLabel", "TooltipOffsetYLabel", Loc ["STRING_OPTIONS_TOOLTIPS_OFFSETY"], "GameFontHighlightLeft")
|
||||
local s = g:NewSlider (frame20, _, "$parentTooltipOffsetYSlider", "TooltipOffsetYSlider", SLIDER_WIDTH, 20, -100, 100, 1, tonumber (_detalhes.tooltip.anchor_offset[2]))
|
||||
s:SetBackdrop (slider_backdrop)
|
||||
s:SetBackdropColor (unpack (slider_backdrop_color))
|
||||
s:SetThumbSize (50)
|
||||
|
||||
frame20.TooltipOffsetYSlider:SetPoint ("left", frame20.TooltipOffsetYLabel, "right", 2)
|
||||
frame20.TooltipOffsetYSlider:SetHook ("OnValueChange", function (self, _, amount)
|
||||
_detalhes.tooltip.anchor_offset[2] = amount
|
||||
end)
|
||||
window:CreateLineBackground2 (frame20, "TooltipOffsetYSlider", "TooltipOffsetYLabel", Loc ["STRING_OPTIONS_TOOLTIPS_OFFSETY_DESC"])
|
||||
|
||||
--> anchors:
|
||||
|
||||
--general anchor
|
||||
g:NewLabel (frame20, _, "$parentTooltipsTextsAnchor", "TooltipsTextsAnchorLabel", Loc ["STRING_OPTIONS_TOOLTIP_ANCHORTEXTS"], "GameFontNormal")
|
||||
g:NewLabel (frame20, _, "$parentTooltipsAnchor", "TooltipsAnchorLabel", Loc ["STRING_OPTIONS_TOOLTIP_ANCHOR"], "GameFontNormal")
|
||||
|
||||
g:NewLabel (frame20, _, "$parentTooltipsAnchorPoint", "TooltipsAnchorPointLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_POINT"], "GameFontNormal")
|
||||
|
||||
local x = window.left_start_at
|
||||
|
||||
titulo_tooltips:SetPoint (x, -30)
|
||||
@@ -1114,6 +1254,20 @@ function window:CreateFrame20()
|
||||
|
||||
window:arrange_menu (frame20, left_side, x, -90)
|
||||
|
||||
x = window.right_start_at
|
||||
|
||||
local right_side = {
|
||||
{"TooltipsAnchorPointLabel", 1, true},
|
||||
{"TooltipAnchorLabel", 2},
|
||||
{"UnlockAnchorButtonLabel", 3, true},
|
||||
{"TooltipAnchorSideLabel", 4},
|
||||
{"TooltipRelativeSideLabel", 5},
|
||||
{"TooltipOffsetXLabel", 6},
|
||||
{"TooltipOffsetYLabel", 7},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame20, right_side, x, -90)
|
||||
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Advanced Settings - Externals Widgets ~19
|
||||
@@ -2734,7 +2888,7 @@ function window:CreateFrame1()
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- General Settings - Combat ~2
|
||||
-- General Settings - Combat ~2
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function window:CreateFrame2()
|
||||
@@ -2793,9 +2947,9 @@ function window:CreateFrame2()
|
||||
frame2.OverallDataRaidBossSlider:SetPoint ("left", frame2.OverallDataRaidBossLabel, "right", 2, 0)
|
||||
--
|
||||
frame2.OverallDataRaidBossSlider.OnSwitch = function (self, _, value)
|
||||
if (value) then
|
||||
if (value and bit.band (_detalhes.overall_flag, 0x1) == 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag + 0x1
|
||||
else
|
||||
elseif (not value and bit.band (_detalhes.overall_flag, 0x1) ~= 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag - 0x1
|
||||
end
|
||||
end
|
||||
@@ -2805,13 +2959,13 @@ function window:CreateFrame2()
|
||||
--raid cleanup
|
||||
g:NewLabel (frame2, _, "$parentOverallDataRaidCleaupLabel", "OverallDataRaidCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDCLEAN"], "GameFontHighlightLeft")
|
||||
--
|
||||
g:NewSwitch (frame2, _, "$parentOverallDataRaidCleaupSlider", "OverallDataRaidCleaupSlider", 60, 20, _, _, false)
|
||||
local raid_cleanup = g:NewSwitch (frame2, _, "$parentOverallDataRaidCleaupSlider", "OverallDataRaidCleaupSlider", 60, 20, _, _, false)
|
||||
frame2.OverallDataRaidCleaupSlider:SetPoint ("left", frame2.OverallDataRaidCleaupLabel, "right", 2, 0)
|
||||
--
|
||||
frame2.OverallDataRaidCleaupSlider.OnSwitch = function (self, _, value)
|
||||
if (value) then
|
||||
if (value and bit.band (_detalhes.overall_flag, 0x2) == 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag + 0x2
|
||||
else
|
||||
elseif (not value and bit.band (_detalhes.overall_flag, 0x2) ~= 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag - 0x2
|
||||
end
|
||||
end
|
||||
@@ -2825,9 +2979,9 @@ function window:CreateFrame2()
|
||||
frame2.OverallDataDungeonBossSlider:SetPoint ("left", frame2.OverallDataDungeonBossLabel, "right", 2, 0)
|
||||
--
|
||||
frame2.OverallDataDungeonBossSlider.OnSwitch = function (self, _, value)
|
||||
if (value) then
|
||||
if (value and bit.band (_detalhes.overall_flag, 0x4) == 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag + 0x4
|
||||
else
|
||||
elseif (not value and bit.band (_detalhes.overall_flag, 0x4) ~= 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag - 0x4
|
||||
end
|
||||
end
|
||||
@@ -2841,9 +2995,9 @@ function window:CreateFrame2()
|
||||
frame2.OverallDataDungeonCleaupSlider:SetPoint ("left", frame2.OverallDataDungeonCleaupLabel, "right", 2, 0)
|
||||
--
|
||||
frame2.OverallDataDungeonCleaupSlider.OnSwitch = function (self, _, value)
|
||||
if (value) then
|
||||
if (value and bit.band (_detalhes.overall_flag, 0x8) == 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag + 0x8
|
||||
else
|
||||
elseif (not value and bit.band (_detalhes.overall_flag, 0x8) ~= 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag - 0x8
|
||||
end
|
||||
end
|
||||
@@ -2857,10 +3011,21 @@ function window:CreateFrame2()
|
||||
frame2.OverallDataAllSlider:SetPoint ("left", frame2.OverallDataAllLabel, "right", 2, 0)
|
||||
--
|
||||
frame2.OverallDataAllSlider.OnSwitch = function (self, _, value)
|
||||
if (value) then
|
||||
if (value and bit.band (_detalhes.overall_flag, 0x10) == 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag + 0x10
|
||||
else
|
||||
|
||||
frame2.OverallDataRaidBossSlider:Disable()
|
||||
frame2.OverallDataRaidCleaupSlider:Disable()
|
||||
frame2.OverallDataDungeonBossSlider:Disable()
|
||||
frame2.OverallDataDungeonCleaupSlider:Disable()
|
||||
|
||||
elseif (not value and bit.band (_detalhes.overall_flag, 0x10) ~= 0) then
|
||||
_detalhes.overall_flag = _detalhes.overall_flag - 0x10
|
||||
|
||||
frame2.OverallDataRaidBossSlider:Enable()
|
||||
frame2.OverallDataRaidCleaupSlider:Enable()
|
||||
frame2.OverallDataDungeonBossSlider:Enable()
|
||||
frame2.OverallDataDungeonCleaupSlider:Enable()
|
||||
end
|
||||
end
|
||||
--
|
||||
@@ -3658,7 +3823,7 @@ function window:CreateFrame4()
|
||||
frame4.noIconButton:SetHighlightTexture ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GROUPLOOT-PASS-HIGHLIGHT]])
|
||||
frame4.noIconButton:SetPushedTexture ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GroupLoot-Pass-Up]])
|
||||
frame4.noIconButton:GetNormalTexture():SetDesaturated (true)
|
||||
frame4.noIconButton.tooltip = "Clear icon file."
|
||||
frame4.noIconButton.tooltip = "Clear icon file / Restore default"
|
||||
|
||||
--bar start at
|
||||
g:NewSwitch (frame4, _, "$parentBarStartSlider", "barStartSlider", 60, 20, nil, nil, instance.row_info.start_after_icon)
|
||||
@@ -5806,7 +5971,7 @@ end
|
||||
local percent_string = g:NewLabel (window, nil, nil, "percent_string", "loading: 0%", "GameFontNormal", 12)
|
||||
percent_string.textcolor = "white"
|
||||
percent_string:SetPoint ("bottomleft", window, "bottomleft", 340, 12)
|
||||
local step = 5.8823
|
||||
local step = 5 -- 100/quantidade de menus
|
||||
|
||||
function _detalhes:create_options_panels()
|
||||
|
||||
@@ -6083,7 +6248,7 @@ function window:update_all (editing_instance)
|
||||
_G.DetailsOptionsWindow19MinimapActionDropdown.MyObject:Select (_detalhes.minimap.onclick_what_todo)
|
||||
_G.DetailsOptionsWindow19HotcornerSlider.MyObject:SetValue (not _detalhes.hotcorner_topleft.hide)
|
||||
_G.DetailsOptionsWindow19HotcornerActionDropdown.MyObject:Select (_detalhes.hotcorner_topleft.onclick_what_todo)
|
||||
_G.DetailsOptionsWindow19HotcornerQuickClickSlider.MyObject:SetValue (_detalhes.hotcorner_topleft.topleft_quick_click)
|
||||
_G.DetailsOptionsWindow19HotcornerQuickClickSlider.MyObject:SetValue (_detalhes.hotcorner_topleft.topleft_quickclick)
|
||||
_G.DetailsOptionsWindow19QuickClickDropdown.MyObject:Select (_detalhes.hotcorner_topleft.quickclick_what_todo)
|
||||
_G.DetailsOptionsWindow19BrokerTextDropdown.MyObject:Select (_detalhes.minimap.text_type)
|
||||
|
||||
@@ -6097,6 +6262,13 @@ function window:update_all (editing_instance)
|
||||
_G.DetailsOptionsWindow20TooltipAbbreviateDropdown.MyObject:Select (_detalhes.tooltip.abbreviation, true)
|
||||
_G.DetailsOptionsWindow20TooltipMaximizeDropdown.MyObject:Select (_detalhes.tooltip.maximize_method, true)
|
||||
_G.DetailsOptionsWindow20TooltipShowAmountSlider.MyObject:SetValue (_detalhes.tooltip.show_amount)
|
||||
|
||||
_G.DetailsOptionsWindow20TooltipAnchorDropdown.MyObject:Select (_detalhes.tooltip.anchored_to)
|
||||
_G.DetailsOptionsWindow20TooltipAnchorSideDropdown.MyObject:Select (_detalhes.tooltip.anchor_point)
|
||||
_G.DetailsOptionsWindow20TooltipAnchorSideDropdown.MyObject:Select (_detalhes.tooltip.anchor_relative)
|
||||
_G.DetailsOptionsWindow20TooltipOffsetXSlider.MyObject:SetValue (_detalhes.tooltip.anchor_offset[1])
|
||||
_G.DetailsOptionsWindow20TooltipOffsetYSlider.MyObject:SetValue (_detalhes.tooltip.anchor_offset[2])
|
||||
|
||||
----------
|
||||
|
||||
|
||||
|
||||
+293
-51
@@ -319,12 +319,12 @@ local function OnLeaveMainWindow (instancia, self)
|
||||
gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0)
|
||||
|
||||
--> snaps
|
||||
instancia.botao_separar:SetAlpha (0)
|
||||
instancia.botao_separar:Hide()
|
||||
|
||||
elseif (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and instancia.baseframe.isLocked) then
|
||||
gump:Fade (instancia.baseframe.lock_button, 1)
|
||||
gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0)
|
||||
instancia.botao_separar:SetAlpha (0)
|
||||
instancia.botao_separar:Hide()
|
||||
|
||||
end
|
||||
end
|
||||
@@ -354,7 +354,7 @@ local function OnEnterMainWindow (instancia, self)
|
||||
--> snaps
|
||||
for _, instancia_id in _pairs (instancia.snap) do
|
||||
if (instancia_id) then
|
||||
instancia.botao_separar:SetAlpha (1)
|
||||
instancia.botao_separar:Show()
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -366,7 +366,7 @@ local function OnEnterMainWindow (instancia, self)
|
||||
--> snaps
|
||||
for _, instancia_id in _pairs (instancia.snap) do
|
||||
if (instancia_id) then
|
||||
instancia.botao_separar:SetAlpha (1)
|
||||
instancia.botao_separar:Show()
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -423,7 +423,7 @@ local function VPT (instancia, esta_instancia)
|
||||
return nil
|
||||
end
|
||||
|
||||
local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados
|
||||
local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados, flash_bounce
|
||||
local movement_onupdate = function (self, elapsed)
|
||||
|
||||
if (tempo_movendo and tempo_movendo < 0) then
|
||||
@@ -437,16 +437,40 @@ local movement_onupdate = function (self, elapsed)
|
||||
precisa_ativar = false
|
||||
|
||||
elseif (tempo_fades) then
|
||||
for lado, livre in _ipairs (nao_anexados) do
|
||||
if (livre) then
|
||||
if (lado == 1) then
|
||||
instancia_alvo.h_esquerda:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0)
|
||||
elseif (lado == 2) then
|
||||
instancia_alvo.h_baixo:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0)
|
||||
elseif (lado == 3) then
|
||||
instancia_alvo.h_direita:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0)
|
||||
elseif (lado == 4) then
|
||||
instancia_alvo.h_cima:Flash (tempo_fades, tempo_fades, 2.0, false, 0, 0)
|
||||
|
||||
if (flash_bounce == 0) then
|
||||
|
||||
flash_bounce = 1
|
||||
|
||||
local tem_livre = false
|
||||
|
||||
for lado, livre in _ipairs (nao_anexados) do
|
||||
if (livre) then
|
||||
if (lado == 1) then
|
||||
instancia_alvo.h_esquerda:Flash (1, 1, 2.0, false, 0, 0)
|
||||
tem_livre = true
|
||||
elseif (lado == 2) then
|
||||
instancia_alvo.h_baixo:Flash (1, 1, 2.0, false, 0, 0)
|
||||
tem_livre = true
|
||||
elseif (lado == 3) then
|
||||
instancia_alvo.h_direita:Flash (1, 1, 2.0, false, 0, 0)
|
||||
tem_livre = true
|
||||
elseif (lado == 4) then
|
||||
instancia_alvo.h_cima:Flash (1, 1, 2.0, false, 0, 0)
|
||||
tem_livre = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (tem_livre) then
|
||||
if (not _detalhes.snap_alert.playing) then
|
||||
instancia_alvo:SnapAlert()
|
||||
_detalhes.snap_alert.playing = true
|
||||
|
||||
_detalhes.MicroButtonAlert.Text:SetText (string.format (Loc ["STRING_ATACH_DESC"], self.instance.meu_id, instancia_alvo.meu_id))
|
||||
_detalhes.MicroButtonAlert:SetPoint ("bottom", instancia_alvo.baseframe.cabecalho.novo, "top", 0, 18)
|
||||
_detalhes.MicroButtonAlert:SetHeight (200)
|
||||
_detalhes.MicroButtonAlert:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -489,6 +513,7 @@ local function move_janela (baseframe, iniciando, instancia)
|
||||
tempo_fades = 1.0
|
||||
nao_anexados = {true, true, true, true}
|
||||
tempo_movendo = 1
|
||||
flash_bounce = 0
|
||||
|
||||
for lado, snap_to in _pairs (instancia_alvo.snap) do
|
||||
if (snap_to) then
|
||||
@@ -625,6 +650,20 @@ local function move_janela (baseframe, iniciando, instancia)
|
||||
end
|
||||
end
|
||||
end
|
||||
--# /tar Disassembled Crawler
|
||||
--# /tar Deactivated Laser Turrets
|
||||
_detalhes.snap_alert.playing = false
|
||||
_detalhes.snap_alert.animIn:Stop()
|
||||
_detalhes.snap_alert.animOut:Play()
|
||||
_detalhes.MicroButtonAlert:Hide()
|
||||
|
||||
if (instancia_alvo) then
|
||||
instancia_alvo.h_esquerda:Stop()
|
||||
instancia_alvo.h_baixo:Stop()
|
||||
instancia_alvo.h_direita:Stop()
|
||||
instancia_alvo.h_cima:Stop()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1174,26 +1213,31 @@ local function resize_scripts (resizer, instancia, scrollbar, side, baseframe)
|
||||
end)
|
||||
end
|
||||
|
||||
local lockButtonTooltip = {
|
||||
{text = Loc ["STRING_LOCK_DESC"]},
|
||||
{icon = [[Interface\PetBattles\PetBattle-LockIcon]], width = 14, height = 14, l = 0.0703125, r = 0.9453125, t = 0.0546875, b = 0.9453125, color = "orange"},
|
||||
}
|
||||
|
||||
local function lock_button_scripts (button, instancia)
|
||||
button:SetScript ("OnEnter", function (self)
|
||||
local lockFunctionOnEnter = function (self)
|
||||
OnEnterMainWindow (self.instancia, self)
|
||||
|
||||
OnEnterMainWindow (instancia, self)
|
||||
if (self.instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"]) then
|
||||
self.label:SetTextColor (1, 1, 1, .6)
|
||||
self.mostrando = true
|
||||
|
||||
if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"]) then
|
||||
self.label:SetTextColor (1, 1, 1, .6)
|
||||
self.mostrando = true
|
||||
end
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:AddFromTable (lockButtonTooltip)
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
GameCooltip:ShowCooltip (self, "tooltip")
|
||||
|
||||
end)
|
||||
|
||||
button:SetScript ("OnLeave", function (self)
|
||||
|
||||
OnLeaveMainWindow (instancia, self)
|
||||
self.label:SetTextColor (.3, .3, .3, .6)
|
||||
self.mostrando = false
|
||||
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
local lockFunctionOnLeave = function (self)
|
||||
OnLeaveMainWindow (self.instancia, self)
|
||||
self.label:SetTextColor (.3, .3, .3, .6)
|
||||
self.mostrando = false
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
|
||||
local lockFunctionOnClick = function (button)
|
||||
@@ -1220,16 +1264,26 @@ local lockFunctionOnClick = function (button)
|
||||
end
|
||||
_detalhes.lock_instance_function = lockFunctionOnClick
|
||||
|
||||
local function bota_separar_script (botao, instancia)
|
||||
botao:SetScript ("OnEnter", function (self)
|
||||
OnEnterMainWindow (instancia, self)
|
||||
self.mostrando = true
|
||||
end)
|
||||
local unSnapButtonTooltip = {
|
||||
{text = Loc ["STRING_DETACH_DESC"]},
|
||||
{icon = [[Interface\CURSOR\CURSORICONSNEW]], width = 14, height = 14, l = 4/128, r = 24/128, t = 34/256, b = 60/256, color = "orange"},
|
||||
}
|
||||
|
||||
local unSnapButtonOnEnter = function (self)
|
||||
OnEnterMainWindow (self.instancia, self)
|
||||
self.mostrando = true
|
||||
|
||||
botao:SetScript ("OnLeave", function (self)
|
||||
OnLeaveMainWindow (instancia, self)
|
||||
self.mostrando = false
|
||||
end)
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:AddFromTable (unSnapButtonTooltip)
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
GameCooltip:ShowCooltip (self, "tooltip")
|
||||
|
||||
end
|
||||
|
||||
local unSnapButtonOnLeave = function (self)
|
||||
OnLeaveMainWindow (self.instancia, self)
|
||||
self.mostrando = false
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
|
||||
local shift_monitor = function (self)
|
||||
@@ -1863,12 +1917,29 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc)
|
||||
_detalhes:ScheduleTimer ("InstanceAlertTime", time, self)
|
||||
end
|
||||
|
||||
self.alert:SetPoint ("bottom", self.baseframe, "bottom", 0, -12)
|
||||
self.alert:SetPoint ("left", self.baseframe, "left", 3, 0)
|
||||
self.alert:SetPoint ("right", self.baseframe, "right", -3, 0)
|
||||
|
||||
self.alert:Show()
|
||||
self.alert:Play()
|
||||
end
|
||||
|
||||
function CreateAlertFrame (baseframe, instancia)
|
||||
|
||||
local alert_bg = CreateFrame ("frame", "DetailsAlertFrame" .. instancia.meu_id, baseframe)
|
||||
local frame_upper = CreateFrame ("scrollframe", "DetailsAlertFrameScroll" .. instancia.meu_id, baseframe)
|
||||
frame_upper:SetPoint ("bottom", baseframe, "bottom")
|
||||
frame_upper:SetPoint ("left", baseframe, "left", 3, 0)
|
||||
frame_upper:SetPoint ("right", baseframe, "right", -3, 0)
|
||||
frame_upper:SetHeight (13)
|
||||
|
||||
local frame_lower = CreateFrame ("frame", "DetailsAlertFrameScrollChild" .. instancia.meu_id, frame_upper)
|
||||
frame_lower:SetHeight (25)
|
||||
frame_lower:SetPoint ("left", frame_upper, "left")
|
||||
frame_lower:SetPoint ("right", frame_upper, "right")
|
||||
frame_upper:SetScrollChild (frame_lower)
|
||||
|
||||
local alert_bg = CreateFrame ("frame", "DetailsAlertFrame" .. instancia.meu_id, frame_lower)
|
||||
alert_bg:SetPoint ("bottom", baseframe, "bottom")
|
||||
alert_bg:SetPoint ("left", baseframe, "left", 3, 0)
|
||||
alert_bg:SetPoint ("right", baseframe, "right", -3, 0)
|
||||
@@ -1914,7 +1985,23 @@ function CreateAlertFrame (baseframe, instancia)
|
||||
rotate:SetDuration (6)
|
||||
RotateAnimGroup:SetLooping ("repeat")
|
||||
|
||||
alert_bg:Hide()
|
||||
alert_bg:Hide()
|
||||
|
||||
local anime = alert_bg:CreateAnimationGroup()
|
||||
anime.group = anime:CreateAnimation ("Translation")
|
||||
anime.group:SetDuration (0.15)
|
||||
--anime.group:SetSmoothing ("OUT")
|
||||
anime.group:SetOffset (0, 10)
|
||||
anime:SetScript ("OnFinished", function(self)
|
||||
alert_bg:Show()
|
||||
alert_bg:SetPoint ("bottom", baseframe, "bottom", 0, 0)
|
||||
alert_bg:SetPoint ("left", baseframe, "left", 3, 0)
|
||||
alert_bg:SetPoint ("right", baseframe, "right", -3, 0)
|
||||
end)
|
||||
|
||||
function alert_bg:Play()
|
||||
anime:Play()
|
||||
end
|
||||
|
||||
alert_bg.text = text
|
||||
alert_bg.icon = icon
|
||||
@@ -1996,6 +2083,116 @@ local function show_anti_overlap (instance, host, side)
|
||||
anti_menu_overlap:Show()
|
||||
end
|
||||
|
||||
_detalhes.snap_alert = CreateFrame ("frame", "DetailsSnapAlertFrame", UIParent, "ActionBarButtonSpellActivationAlert")
|
||||
_detalhes.snap_alert:Hide()
|
||||
_detalhes.snap_alert:SetFrameStrata ("FULLSCREEN")
|
||||
|
||||
function _detalhes:SnapAlert()
|
||||
_detalhes.snap_alert:ClearAllPoints()
|
||||
_detalhes.snap_alert:SetPoint ("topleft", self.baseframe.cabecalho.novo, "topleft", -8, 6)
|
||||
_detalhes.snap_alert:SetPoint ("bottomright", self.baseframe.cabecalho.novo, "bottomright", 8, -6)
|
||||
_detalhes.snap_alert.animOut:Stop()
|
||||
_detalhes.snap_alert.animIn:Play()
|
||||
end
|
||||
|
||||
do
|
||||
|
||||
local tooltip_anchor = CreateFrame ("frame", "DetailsTooltipAnchor", UIParent)
|
||||
tooltip_anchor:SetSize (140, 20)
|
||||
tooltip_anchor:EnableMouse (false)
|
||||
tooltip_anchor:SetAlpha (0)
|
||||
tooltip_anchor:SetMovable (false)
|
||||
tooltip_anchor:SetClampedToScreen (true)
|
||||
tooltip_anchor.locked = true
|
||||
tooltip_anchor:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 2, bottom = 1}})
|
||||
tooltip_anchor:SetBackdropColor (0, 0, 0, 1)
|
||||
|
||||
tooltip_anchor:SetScript ("OnEnter", function (self)
|
||||
tooltip_anchor.alert.animIn:Stop()
|
||||
tooltip_anchor.alert.animOut:Play()
|
||||
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:ClearLines()
|
||||
GameTooltip:AddLine (Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TEXT_DESC"])
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
|
||||
tooltip_anchor:SetScript ("OnLeave", function (self)
|
||||
GameTooltip:Hide()
|
||||
end)
|
||||
|
||||
tooltip_anchor:SetScript ("OnMouseDown", function (self, button)
|
||||
if (not self.moving and button == "LeftButton") then
|
||||
self:StartMoving()
|
||||
self.moving = true
|
||||
end
|
||||
end)
|
||||
|
||||
tooltip_anchor:SetScript ("OnMouseUp", function (self, button)
|
||||
if (self.moving) then
|
||||
self:StopMovingOrSizing()
|
||||
self.moving = false
|
||||
local xofs, yofs = self:GetCenter()
|
||||
local scale = self:GetEffectiveScale()
|
||||
local UIscale = UIParent:GetScale()
|
||||
xofs = xofs * scale - GetScreenWidth() * UIscale / 2
|
||||
yofs = yofs * scale - GetScreenHeight() * UIscale / 2
|
||||
_detalhes.tooltip.anchor_screen_pos[1] = xofs / UIscale
|
||||
_detalhes.tooltip.anchor_screen_pos[2] = yofs / UIscale
|
||||
|
||||
elseif (button == "RightButton" and not self.moving) then
|
||||
tooltip_anchor:MoveAnchor()
|
||||
end
|
||||
end)
|
||||
|
||||
function tooltip_anchor:MoveAnchor()
|
||||
if (self.locked) then
|
||||
self:SetAlpha (1)
|
||||
self:EnableMouse (true)
|
||||
self:SetMovable (true)
|
||||
self:SetFrameStrata ("FULLSCREEN")
|
||||
self.locked = false
|
||||
tooltip_anchor.alert.animOut:Stop()
|
||||
tooltip_anchor.alert.animIn:Play()
|
||||
else
|
||||
self:SetAlpha (0)
|
||||
self:EnableMouse (false)
|
||||
self:SetFrameStrata ("MEDIUM")
|
||||
self:SetMovable (false)
|
||||
self.locked = true
|
||||
tooltip_anchor.alert.animIn:Stop()
|
||||
tooltip_anchor.alert.animOut:Play()
|
||||
end
|
||||
end
|
||||
|
||||
function tooltip_anchor:Restore()
|
||||
local x, y = _detalhes.tooltip.anchor_screen_pos[1], _detalhes.tooltip.anchor_screen_pos[2]
|
||||
local scale = self:GetEffectiveScale()
|
||||
local UIscale = UIParent:GetScale()
|
||||
x = x * UIscale / scale
|
||||
y = y * UIscale / scale
|
||||
self:ClearAllPoints()
|
||||
self:SetParent (UIParent)
|
||||
self:SetPoint ("center", UIParent, "center", x, y)
|
||||
end
|
||||
|
||||
tooltip_anchor.alert = CreateFrame ("frame", "DetailsTooltipAnchorAlert", UIParent, "ActionBarButtonSpellActivationAlert")
|
||||
tooltip_anchor.alert:SetFrameStrata ("FULLSCREEN")
|
||||
tooltip_anchor.alert:Hide()
|
||||
tooltip_anchor.alert:SetPoint ("topleft", tooltip_anchor, "topleft", -60, 6)
|
||||
tooltip_anchor.alert:SetPoint ("bottomright", tooltip_anchor, "bottomright", 40, -6)
|
||||
|
||||
local icon = tooltip_anchor:CreateTexture (nil, "overlay")
|
||||
icon:SetTexture ([[Interface\AddOns\Details\images\minimap]])
|
||||
icon:SetPoint ("left", tooltip_anchor, "left", 4, 0)
|
||||
icon:SetSize (18, 18)
|
||||
|
||||
local text = tooltip_anchor:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
text:SetPoint ("left", icon, "right", 6, 0)
|
||||
text:SetText (Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TEXT"])
|
||||
|
||||
|
||||
end
|
||||
|
||||
--> ~inicio ~janela ~window ~nova
|
||||
function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
@@ -2227,9 +2424,12 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe.lock_button.label:SetText (Loc ["STRING_LOCK_WINDOW"])
|
||||
baseframe.lock_button:SetWidth (baseframe.lock_button.label:GetStringWidth()+2)
|
||||
baseframe.lock_button:SetScript ("OnClick", lockFunctionOnClick)
|
||||
baseframe.lock_button:SetScript ("OnEnter", lockFunctionOnEnter)
|
||||
baseframe.lock_button:SetScript ("OnLeave", lockFunctionOnLeave)
|
||||
baseframe.lock_button:SetFrameStrata ("HIGH")
|
||||
baseframe.lock_button:SetFrameLevel (baseframe:GetFrameLevel() + 6)
|
||||
|
||||
baseframe.lock_button.instancia = instancia
|
||||
|
||||
--> left resizer
|
||||
baseframe.resize_esquerda = CreateFrame ("button", "Details_Resize_Esquerda"..ID, baseframe)
|
||||
|
||||
@@ -2313,9 +2513,15 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
instancia.botao_separar:SetFrameLevel (baseframe:GetFrameLevel() + 5)
|
||||
instancia.botao_separar:SetSize (13, 13)
|
||||
|
||||
instancia.botao_separar.instancia = instancia
|
||||
|
||||
instancia.botao_separar:SetScript ("OnClick", function()
|
||||
instancia:Desagrupar (-1)
|
||||
end)
|
||||
|
||||
instancia.botao_separar:SetScript ("OnEnter", unSnapButtonOnEnter)
|
||||
instancia.botao_separar:SetScript ("OnLeave", unSnapButtonOnLeave)
|
||||
|
||||
|
||||
instancia.botao_separar:SetNormalTexture (DEFAULT_SKIN)
|
||||
instancia.botao_separar:SetDisabledTexture (DEFAULT_SKIN)
|
||||
@@ -2327,14 +2533,12 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
instancia.botao_separar:GetHighlightTexture():SetTexCoord (unpack (COORDS_UNLOCK_BUTTON))
|
||||
instancia.botao_separar:GetPushedTexture():SetTexCoord (unpack (COORDS_UNLOCK_BUTTON))
|
||||
|
||||
instancia.botao_separar:SetAlpha (0)
|
||||
instancia.botao_separar:Hide()
|
||||
|
||||
-- scripts ------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
resize_scripts (baseframe.resize_direita, instancia, scrollbar, ">", baseframe)
|
||||
resize_scripts (baseframe.resize_esquerda, instancia, scrollbar, "<", baseframe)
|
||||
lock_button_scripts (baseframe.lock_button, instancia)
|
||||
bota_separar_script (instancia.botao_separar, instancia)
|
||||
|
||||
-- side bars highlights ------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -2499,14 +2703,20 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
esta_barra.border:SetAllPoints (esta_barra)
|
||||
|
||||
local backdrop = instancia.row_info.backdrop.enabled
|
||||
local backdrop_color
|
||||
if (backdrop) then
|
||||
esta_barra.border:SetBackdrop ({edgeFile = SharedMedia:Fetch ("border", instancia.row_info.backdrop.texture), edgeSize = instancia.row_info.backdrop.size})
|
||||
esta_barra.border:SetBackdropBorderColor (_unpack (instancia.row_info.backdrop.color))
|
||||
backdrop = {edgeFile = SharedMedia:Fetch ("border", instancia.row_info.backdrop.texture), edgeSize = instancia.row_info.backdrop.size}
|
||||
backdrop_color = instancia.row_info.backdrop.color
|
||||
end
|
||||
|
||||
esta_barra.border:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize = 12})
|
||||
esta_barra.border:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
--backdrop
|
||||
if (backdrop) then
|
||||
esta_barra.border:SetBackdrop (backdrop)
|
||||
esta_barra.border:SetBackdropBorderColor (_unpack (backdrop_color))
|
||||
else
|
||||
esta_barra.border:SetBackdrop (nil)
|
||||
end
|
||||
|
||||
esta_barra.textura = esta_barra.statusbar:CreateTexture (nil, "artwork")
|
||||
esta_barra.textura:SetHorizTile (false)
|
||||
esta_barra.textura:SetVertTile (false)
|
||||
@@ -4327,6 +4537,38 @@ function _detalhes:SetFrameStrata (strata)
|
||||
self.rowframe:SetFrameStrata (strata)
|
||||
self.baseframe:SetFrameStrata (strata)
|
||||
|
||||
if (strata == "BACKGROUND") then
|
||||
self.botao_separar:SetFrameStrata ("LOW")
|
||||
self.baseframe.resize_esquerda:SetFrameStrata ("LOW")
|
||||
self.baseframe.resize_direita:SetFrameStrata ("LOW")
|
||||
self.baseframe.lock_button:SetFrameStrata ("LOW")
|
||||
|
||||
elseif (strata == "LOW") then
|
||||
self.botao_separar:SetFrameStrata ("MEDIUM")
|
||||
self.baseframe.resize_esquerda:SetFrameStrata ("MEDIUM")
|
||||
self.baseframe.resize_direita:SetFrameStrata ("MEDIUM")
|
||||
self.baseframe.lock_button:SetFrameStrata ("MEDIUM")
|
||||
|
||||
elseif (strata == "MEDIUM") then
|
||||
self.botao_separar:SetFrameStrata ("HIGH")
|
||||
self.baseframe.resize_esquerda:SetFrameStrata ("HIGH")
|
||||
self.baseframe.resize_direita:SetFrameStrata ("HIGH")
|
||||
self.baseframe.lock_button:SetFrameStrata ("HIGH")
|
||||
|
||||
elseif (strata == "HIGH") then
|
||||
self.botao_separar:SetFrameStrata ("DIALOG")
|
||||
self.baseframe.resize_esquerda:SetFrameStrata ("DIALOG")
|
||||
self.baseframe.resize_direita:SetFrameStrata ("DIALOG")
|
||||
self.baseframe.lock_button:SetFrameStrata ("DIALOG")
|
||||
|
||||
elseif (strata == "DIALOG") then
|
||||
self.botao_separar:SetFrameStrata ("FULLSCREEN")
|
||||
self.baseframe.resize_esquerda:SetFrameStrata ("FULLSCREEN")
|
||||
self.baseframe.resize_direita:SetFrameStrata ("FULLSCREEN")
|
||||
self.baseframe.lock_button:SetFrameStrata ("FULLSCREEN")
|
||||
|
||||
end
|
||||
|
||||
self:StretchButtonAlwaysOnTop()
|
||||
|
||||
end
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+47
-12
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -134,6 +134,8 @@ _detalhes:InstallEncounter (StormsStoutBrewery)
|
||||
local ScarletHalls = {
|
||||
|
||||
id = 1001,
|
||||
ej_id = 311,
|
||||
|
||||
name = "Scarlet Halls",
|
||||
boss_names = {
|
||||
"Houndmaster Braun",
|
||||
@@ -142,9 +144,9 @@ local ScarletHalls = {
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[0] = 1, --
|
||||
[0] = 2, --
|
||||
[0] = 3, --
|
||||
[59303] = 1, --Houndmaster Braun
|
||||
[58632] = 2, --Armsmaster Harlan
|
||||
[59150] = 3, --Flameweaver Koegler
|
||||
},
|
||||
|
||||
encounters = {
|
||||
@@ -165,9 +167,47 @@ local ScarletHalls = {
|
||||
|
||||
_detalhes:InstallEncounter (ScarletHalls)
|
||||
|
||||
local ScarletMonastery = {
|
||||
|
||||
id = 1004,
|
||||
ej_id = 316,
|
||||
|
||||
name = "Scarlet Monastery",
|
||||
boss_names = {
|
||||
"Thalnos the Soulrender",
|
||||
"Brother Korloff",
|
||||
"High Inquisitor Whitemane",
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[59789] = 1, --Thalnos the Soulrender
|
||||
[60040] = 2, --Commander Durand
|
||||
[3977] = 2, --High Inquisitor Whitemane
|
||||
},
|
||||
|
||||
encounters = {
|
||||
[1] = {
|
||||
boss = "Thalnos the Soulrender",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Thalnos the Soulrender]],
|
||||
},
|
||||
[2] = {
|
||||
boss = "Brother Korloff",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Brother Korloff]],
|
||||
},
|
||||
[3] = {
|
||||
boss = "High Inquisitor Whitemane",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-High Inquisitor Whitemane]],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_detalhes:InstallEncounter (ScarletMonastery)
|
||||
|
||||
local ShadoPanMonastery = {
|
||||
|
||||
id = 959,
|
||||
ej_id = 312,
|
||||
|
||||
name = "Shado-Pan Monastery",
|
||||
boss_names = {
|
||||
"Gu Cloudstrike",
|
||||
@@ -177,9 +217,10 @@ local ShadoPanMonastery = {
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[0] = 1, --
|
||||
[0] = 2, --
|
||||
[0] = 3, --
|
||||
[56747] = 1, --Gu Cloudstrike
|
||||
[56541] = 2, --Master Snowdrift
|
||||
[56719] = 3, --Sha of Violence
|
||||
[56884] = 4, --Taran Zhu
|
||||
},
|
||||
|
||||
encounters = {
|
||||
@@ -204,43 +245,10 @@ local ShadoPanMonastery = {
|
||||
|
||||
_detalhes:InstallEncounter (ShadoPanMonastery)
|
||||
|
||||
local ScarletMonastery = {
|
||||
|
||||
id = 1004,
|
||||
name = "Scarlet Monastery",
|
||||
boss_names = {
|
||||
"Thalnos the Soulrender",
|
||||
"Brother Korloff",
|
||||
"High Inquisitor Whitemane",
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[0] = 1, --
|
||||
[0] = 2, --
|
||||
[0] = 3, --
|
||||
},
|
||||
|
||||
encounters = {
|
||||
[1] = {
|
||||
boss = "Thalnos the Soulrender",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Thalnos the Soulrender]],
|
||||
},
|
||||
[2] = {
|
||||
boss = "Brother Korloff",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Brother Korloff]],
|
||||
},
|
||||
[3] = {
|
||||
boss = "High Inquisitor Whitemane",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-High Inquisitor Whitemane]],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_detalhes:InstallEncounter (ScarletMonastery)
|
||||
|
||||
local SiegeOfNiuzaoTemple = {
|
||||
|
||||
id = 1011,
|
||||
ej_id = 324,
|
||||
name = "Siege of Niuzao Temple",
|
||||
boss_names = {
|
||||
"Vizier Jin'bak",
|
||||
@@ -250,9 +258,10 @@ local SiegeOfNiuzaoTemple = {
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[0] = 1, --
|
||||
[0] = 2, --
|
||||
[0] = 3, --
|
||||
[61567] = 1, --Vizier Jin'Bak
|
||||
[61634] = 2, --commander Vojak
|
||||
[61485] = 3, --General Pa'valak
|
||||
[62205] = 4, --Wing Leader Neronok
|
||||
},
|
||||
|
||||
encounters = {
|
||||
@@ -280,6 +289,8 @@ _detalhes:InstallEncounter (SiegeOfNiuzaoTemple)
|
||||
local GateOfSettingSun = {
|
||||
|
||||
id = 962,
|
||||
ej_id = 303,
|
||||
|
||||
name = "Gate of the Setting Sun",
|
||||
boss_names = {
|
||||
"Saboteur Kip'tilak",
|
||||
@@ -289,9 +300,11 @@ local GateOfSettingSun = {
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[0] = 1, --
|
||||
[0] = 2, --
|
||||
[0] = 3, --
|
||||
[56906] = 1, --Saboteur Kiptilak
|
||||
[56589] = 2, --Striker Ga'dok
|
||||
[56636] = 3, --Commander Rimok
|
||||
[56877] = 4, --Raigonn
|
||||
[56895] = 4, --Weak Spot (Raigonn)
|
||||
},
|
||||
|
||||
encounters = {
|
||||
@@ -319,6 +332,8 @@ _detalhes:InstallEncounter (GateOfSettingSun)
|
||||
local Scholomance = {
|
||||
|
||||
id = 1007,
|
||||
ej_id = 246,
|
||||
|
||||
name = "Scholomance",
|
||||
boss_names = {
|
||||
"Instructor Chillheart",
|
||||
@@ -329,9 +344,12 @@ local Scholomance = {
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[0] = 1, --
|
||||
[0] = 2, --
|
||||
[0] = 3, --
|
||||
[58633] = 1, --Instructor Chillheart
|
||||
[58664] = 1, --Instructor Chillheart Phylactery
|
||||
[59184] = 2, --Jandice Barov
|
||||
[59153] = 3, --Rattlegore
|
||||
[58722] = 4, --Lilian Voss
|
||||
[59080] = 5, --Darkmaster Gandling
|
||||
},
|
||||
|
||||
encounters = {
|
||||
|
||||
@@ -346,7 +346,7 @@ local function CreatePluginFrames()
|
||||
|
||||
YouAreNotPrepared:UpdateButtons()
|
||||
|
||||
_detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375}, 20, {YouAreNotPrepared.ShowMeFromInstanceAlert})
|
||||
_detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375}, 30, {YouAreNotPrepared.ShowMeFromInstanceAlert})
|
||||
end
|
||||
--YouAreNotPrepared:ScheduleTimer (YouAreNotPrepared.ShowMe, 3)
|
||||
|
||||
|
||||
+3
-1
@@ -290,6 +290,9 @@ function _G._detalhes:Start()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> cooltip anchor
|
||||
DetailsTooltipAnchor:Restore()
|
||||
|
||||
--[[
|
||||
if (self.tutorial.version_announce < 4) then
|
||||
@@ -765,7 +768,6 @@ function _G._detalhes:Start()
|
||||
end
|
||||
|
||||
local on_click_on_quickclick_button = function (frame, button)
|
||||
|
||||
if (_detalhes.hotcorner_topleft.quickclick_what_todo == 1) then
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (not lower_instance) then
|
||||
|
||||
Reference in New Issue
Block a user