- Added Segments shortcut menu pressing Shift + Right click.
- Fixed avoidance panel on Player Details Window where sometimes was giving errors. - Fixed priest shadow and holy detection. - Fixed blood and unholy spec icons.
This commit is contained in:
@@ -239,6 +239,10 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
local value = profile [key]
|
||||
|
||||
if (type (value) == "table") then
|
||||
if (key == "class_specs_coords") then
|
||||
value = table_deepcopy (_detalhes.default_profile.class_specs_coords)
|
||||
end
|
||||
|
||||
local ctable = table_deepcopy (value)
|
||||
_detalhes [key] = ctable
|
||||
else
|
||||
@@ -572,9 +576,9 @@ local default_profile = {
|
||||
|
||||
--> spec coords
|
||||
class_specs_coords = {
|
||||
[252] = {0, 64/512, 0, 64/512}, --> unholy dk
|
||||
[250] = {0, 64/512, 0, 64/512}, --> blood dk
|
||||
[251] = {64/512, 128/512, 0, 64/512}, --> frost dk
|
||||
[250] = {128/512, 192/512, 0, 64/512}, --> blood dk
|
||||
[252] = {128/512, 192/512, 0, 64/512}, --> unholy dk
|
||||
|
||||
[102] = {192/512, 256/512, 0, 64/512}, --> druid balance
|
||||
[103] = {256/512, 320/512, 0, 64/512}, --> druid feral
|
||||
|
||||
@@ -209,15 +209,15 @@ do
|
||||
[64843] = 257, -- Divine Hymn
|
||||
[34861] = 257, -- Circle of Healing
|
||||
[32546] = 257, -- Binding Heal
|
||||
[596] = 257, -- Prayer of Healing
|
||||
--[596] = 257, -- Prayer of Healing
|
||||
[126135] = 257, -- Lightwell
|
||||
[139] = 257, -- Renew
|
||||
[88625] = 257, -- Holy Word: Chastise
|
||||
--[88625] = 257, -- Holy Word: Chastise
|
||||
|
||||
-- Shadow Priest:
|
||||
[127632] = 258, -- Cascade
|
||||
[122121] = 258, -- Divine Star
|
||||
[120644] = 258, -- Halo
|
||||
--[127632] = 258, -- Cascade
|
||||
--[122121] = 258, -- Divine Star
|
||||
--[120644] = 258, -- Halo
|
||||
[15286] = 258, -- Vampiric Embrace
|
||||
[32379] = 258, -- Shadow Word: Death
|
||||
[73510] = 258, -- Mind Spike
|
||||
|
||||
@@ -1267,6 +1267,10 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
tab.tankname:SetText ("Avoidance of\n" .. n) --> localize-me
|
||||
|
||||
if (not playerdamage.avoidance) then
|
||||
playerdamage.avoidance = _detalhes:CreateActorAvoidanceTable()
|
||||
end
|
||||
|
||||
--> damage taken
|
||||
local playerdamage = combat (1, player.nome)
|
||||
|
||||
|
||||
@@ -4763,7 +4763,7 @@ local build_mode_list = function (self, elapsed)
|
||||
|
||||
--> window control
|
||||
GameCooltip:AddLine ("$div")
|
||||
CoolTip:AddLine ("Window Control")
|
||||
CoolTip:AddLine (Loc ["STRING_MENU_INSTANCE_CONTROL"])
|
||||
CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 0.625, 0.75, 0, 1)
|
||||
|
||||
--CoolTip:AddMenu (2, _detalhes.OpenOptionsWindow, true, 1, nil, "Cant Create Window", _, true)
|
||||
@@ -4912,8 +4912,6 @@ function _detalhes:SetMenuOwner (self, instance)
|
||||
|
||||
end
|
||||
|
||||
local segments_used = 0
|
||||
local segments_filled = 0
|
||||
local empty_segment_color = {1, 1, 1, .4}
|
||||
|
||||
local segments_common_tex, segments_common_color = {0.5078125, 0.1171875, 0.017578125, 0.1953125}, {1, 1, 1, .5}
|
||||
@@ -4923,6 +4921,98 @@ local party_line_color = {170/255, 167/255, 255/255, 1}
|
||||
local party_wallpaper_tex, party_wallpaper_color = {0.09, 0.698125, 0, 0.833984375}, {1, 1, 1, 0.5}
|
||||
|
||||
local segments_wallpaper_color = {1, 1, 1, 0.5}
|
||||
local segment_color_lime = {0, 1, 0, 1}
|
||||
local segment_color_red = {1, 0, 0, 1}
|
||||
|
||||
function _detalhes:GetSegmentInfo (index)
|
||||
local combat
|
||||
|
||||
if (index == -1 or index == "overall") then
|
||||
combat = _detalhes.tabela_overall
|
||||
elseif (index == 0 or index == "current") then
|
||||
combat = _detalhes.tabela_vigente
|
||||
else
|
||||
combat = _detalhes.tabela_historico.tabelas [index]
|
||||
end
|
||||
|
||||
if (combat) then
|
||||
|
||||
local enemy
|
||||
local color
|
||||
local raid_type
|
||||
local killed
|
||||
local portrait
|
||||
local background
|
||||
local background_coords
|
||||
local is_trash
|
||||
|
||||
if (combat.is_boss and combat.is_boss.name) then
|
||||
|
||||
if (combat.instance_type == "party") then
|
||||
raid_type = "party"
|
||||
enemy = combat.is_boss.name
|
||||
color = party_line_color
|
||||
|
||||
elseif (combat.is_boss.killed) then
|
||||
raid_type = "raid"
|
||||
enemy = combat.is_boss.name
|
||||
color = segment_color_lime
|
||||
killed = true
|
||||
|
||||
else
|
||||
raid_type = "raid"
|
||||
enemy = combat.is_boss.name
|
||||
color = segment_color_red
|
||||
killed = false
|
||||
|
||||
end
|
||||
|
||||
local p = _detalhes:GetBossPortrait (combat.is_boss.mapid, combat.is_boss.index)
|
||||
if (p) then
|
||||
portrait = p
|
||||
end
|
||||
|
||||
local b = _detalhes:GetRaidIcon (combat.is_boss.mapid)
|
||||
if (b) then
|
||||
background = b
|
||||
background_coords = segment_color_lime
|
||||
|
||||
elseif (combat.instance_type == "party") then
|
||||
local ej_id = combat.is_boss.ej_instance_id
|
||||
if (ej_id) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (bgImage) then
|
||||
background = bgImage
|
||||
background_coords = party_wallpaper_tex
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (combat.is_arena) then
|
||||
enemy = combat.is_arena.name
|
||||
|
||||
local file, coords = _detalhes:GetArenaInfo (combat.is_arena.mapid)
|
||||
|
||||
if (file) then
|
||||
background = "Interface\\Glues\\LOADINGSCREENS\\" .. file
|
||||
background_coords = coords
|
||||
end
|
||||
|
||||
else
|
||||
enemy = combat.enemy
|
||||
|
||||
if (combat.is_trash) then
|
||||
is_trash = true
|
||||
end
|
||||
end
|
||||
|
||||
return enemy, color, raid_type, killed, is_trash, portrait, background, background_coords
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local segments_used = 0
|
||||
local segments_filled = 0
|
||||
|
||||
-- search key: ~segments
|
||||
local build_segment_list = function (self, elapsed)
|
||||
@@ -7067,7 +7157,7 @@ function gump:CriaCabecalho (baseframe, instancia)
|
||||
GameCooltip:SetOption ("ButtonsYMod", -7)
|
||||
GameCooltip:SetOption ("HeighMod", 8)
|
||||
|
||||
GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
|
||||
GameCooltip:AddLine (Loc ["STRING_REPORT_TOOLTIP"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
|
||||
GameCooltip:AddIcon ([[Interface\Addons\Details\Images\report_button]], 1, 1, 12, 19)
|
||||
GameCooltip:AddMenu (1, _detalhes.Reportar, instancia, nil, "INSTANCE" .. instancia.meu_id)
|
||||
|
||||
|
||||
+203
-10
@@ -96,8 +96,16 @@ _detalhes.switch.height_necessary = (_detalhes.switch.button_height * _detalhes.
|
||||
local right_click_text = {text = Loc ["STRING_SHORTCUT_RIGHTCLICK"], size = 9, color = {.9, .9, .9}}
|
||||
local right_click_texture = {[[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 14, 14, 0.0019531, 0.1484375, 0.6269531, 0.8222656}
|
||||
|
||||
function _detalhes.switch:HideAllBookmarks()
|
||||
for _, bookmark in ipairs (_detalhes.switch.buttons) do
|
||||
bookmark:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.switch:ShowMe (instancia)
|
||||
|
||||
_detalhes.switch.current_instancia = instancia
|
||||
|
||||
if (IsControlKeyDown()) then
|
||||
|
||||
if (not _detalhes.tutorial.ctrl_click_close_tutorial) then
|
||||
@@ -150,6 +158,201 @@ function _detalhes.switch:ShowMe (instancia)
|
||||
end
|
||||
|
||||
return instancia:ShutDown()
|
||||
|
||||
elseif (IsShiftKeyDown()) then
|
||||
|
||||
if (not _detalhes.switch.segments_blocks) then
|
||||
|
||||
local segment_switch = function (segment, _, _, button)
|
||||
if (button == "LeftButton") then
|
||||
_detalhes.switch.current_instancia:TrocaTabela (segment)
|
||||
_detalhes.switch.CloseMe()
|
||||
elseif (button == "RightButton") then
|
||||
_detalhes.switch.CloseMe()
|
||||
end
|
||||
end
|
||||
|
||||
local hide_label = function (self)
|
||||
self.texture:Hide()
|
||||
self.button:Hide()
|
||||
self.background:Hide()
|
||||
self:Hide()
|
||||
end
|
||||
|
||||
local show_label = function (self)
|
||||
self.texture:Show()
|
||||
self.button:Show()
|
||||
self.background:Show()
|
||||
self:Show()
|
||||
end
|
||||
|
||||
local on_enter = function (self)
|
||||
self.MyObject.this_background:SetBlendMode ("ADD")
|
||||
self.MyObject.boss_texture:SetBlendMode ("ADD")
|
||||
end
|
||||
|
||||
local on_leave = function (self)
|
||||
self.MyObject.this_background:SetBlendMode ("BLEND")
|
||||
self.MyObject.boss_texture:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
function _detalhes.switch:CreateSegmentBlock()
|
||||
local s = gump:CreateLabel (_detalhes.switch.frame)
|
||||
_detalhes:SetFontSize (s, 9)
|
||||
|
||||
local index = #_detalhes.switch.segments_blocks
|
||||
if (index == 1) then --overall button
|
||||
index = -1
|
||||
elseif (index >= 2) then
|
||||
index = index - 1
|
||||
end
|
||||
|
||||
local button = gump:CreateButton (_detalhes.switch.frame, segment_switch, 100, 20, "", index)
|
||||
button:SetPoint ("topleft", s, "topleft", -17, 0)
|
||||
button:SetPoint ("bottomright", s, "bottomright", 0, 0)
|
||||
button:SetClickFunction (segment_switch, nil, nil, "right")
|
||||
|
||||
local boss_texture = gump:CreateImage (button, nil, 16, 16)
|
||||
boss_texture:SetPoint ("right", s, "left", -2, 0)
|
||||
|
||||
local background = button:CreateTexture (nil, "background")
|
||||
background:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
background:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
|
||||
background:SetWidth (85)
|
||||
background:SetPoint ("topleft", s.widget, "topleft", -16, 3)
|
||||
background:SetPoint ("bottomright", s.widget, "bottomright", -3, -5)
|
||||
|
||||
button.this_background = background
|
||||
button.boss_texture = boss_texture.widget
|
||||
|
||||
s.texture = boss_texture
|
||||
s.button = button
|
||||
s.background = background
|
||||
|
||||
button:SetScript ("OnEnter", on_enter)
|
||||
button:SetScript ("OnLeave", on_leave)
|
||||
|
||||
s.HideMe = hide_label
|
||||
s.ShowMe = show_label
|
||||
|
||||
tinsert (_detalhes.switch.segments_blocks, s)
|
||||
return s
|
||||
end
|
||||
|
||||
function _detalhes.switch:GetSegmentBlock (index)
|
||||
local block = _detalhes.switch.segments_blocks [index]
|
||||
if (not block) then
|
||||
return _detalhes.switch:CreateSegmentBlock()
|
||||
else
|
||||
return block
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.switch:ClearSegmentBlocks()
|
||||
for _, block in ipairs (_detalhes.switch.segments_blocks) do
|
||||
block:HideMe()
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.switch:ResizeSegmentBlocks()
|
||||
|
||||
local x = 7
|
||||
local y = 5
|
||||
|
||||
local window_width, window_height = _detalhes.switch.current_instancia:GetSize()
|
||||
|
||||
local horizontal_amt = floor (math.max (window_width / 100, 2))
|
||||
local vertical_amt = floor ((window_height - y) / 20)
|
||||
local size = window_width / horizontal_amt
|
||||
|
||||
local frame = _detalhes.switch.frame
|
||||
|
||||
_detalhes.switch:ClearSegmentBlocks()
|
||||
|
||||
local i = 1
|
||||
for vertical = 1, vertical_amt do
|
||||
x = 7
|
||||
for horizontal = 1, horizontal_amt do
|
||||
local button = _detalhes.switch:GetSegmentBlock (i)
|
||||
|
||||
button:SetPoint ("topleft", frame, "topleft", x + 16, -y)
|
||||
button:SetSize (size - 22, 12)
|
||||
button:ShowMe()
|
||||
|
||||
i = i + 1
|
||||
x = x + size
|
||||
if (i > 40) then
|
||||
break
|
||||
end
|
||||
end
|
||||
y = y + 20
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.switch.segments_blocks = {}
|
||||
|
||||
--> current and overall
|
||||
_detalhes.switch:CreateSegmentBlock()
|
||||
_detalhes.switch:CreateSegmentBlock()
|
||||
|
||||
local block1 = _detalhes.switch:GetSegmentBlock (1)
|
||||
block1:SetText (Loc ["STRING_CURRENTFIGHT"])
|
||||
block1.texture:SetTexture ([[Interface\Scenarios\ScenariosParts]])
|
||||
block1.texture:SetTexCoord (55/512, 81/512, 368/512, 401/512)
|
||||
|
||||
local block2 = _detalhes.switch:GetSegmentBlock (2)
|
||||
block2:SetText (Loc ["STRING_SEGMENT_OVERALL"])
|
||||
block2.texture:SetTexture ([[Interface\Scenarios\ScenariosParts]])
|
||||
block2.texture:SetTexCoord (55/512, 81/512, 368/512, 401/512)
|
||||
end
|
||||
|
||||
_detalhes.switch:ClearSegmentBlocks()
|
||||
_detalhes.switch:HideAllBookmarks()
|
||||
|
||||
local segment_index = 1
|
||||
for i = 3, #_detalhes.tabela_historico.tabelas + 2 do
|
||||
|
||||
local combat = _detalhes.tabela_historico.tabelas [segment_index]
|
||||
|
||||
local block = _detalhes.switch:GetSegmentBlock (i)
|
||||
local enemy, color, raid_type, killed, is_trash, portrait, background, background_coords = _detalhes:GetSegmentInfo (segment_index)
|
||||
|
||||
block:SetText ("#" .. segment_index .. " " .. enemy)
|
||||
|
||||
if (combat.is_boss and combat.instance_type == "raid") then
|
||||
local L, R, T, B, Texture = _detalhes:GetBossIcon (combat.is_boss.mapid, combat.is_boss.index)
|
||||
if (L) then
|
||||
block.texture:SetTexture (Texture)
|
||||
block.texture:SetTexCoord (L, R, T, B)
|
||||
else
|
||||
block.texture:SetTexture ([[Interface\Scenarios\ScenarioIcon-Boss]])
|
||||
end
|
||||
else
|
||||
block.texture:SetTexture ([[Interface\Scenarios\ScenarioIcon-Boss]])
|
||||
end
|
||||
|
||||
block:ShowMe()
|
||||
segment_index = segment_index + 1
|
||||
end
|
||||
|
||||
_detalhes.switch.frame:SetScale (instancia.window_scale)
|
||||
_detalhes.switch:ResizeSegmentBlocks()
|
||||
|
||||
for i = segment_index+2, #_detalhes.switch.segments_blocks do
|
||||
_detalhes.switch.segments_blocks [i]:HideMe()
|
||||
end
|
||||
|
||||
_detalhes.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 1)
|
||||
_detalhes.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 1)
|
||||
_detalhes.switch.frame:SetBackdropColor (0.094, 0.094, 0.094, .8)
|
||||
_detalhes.switch.frame:Show()
|
||||
|
||||
return
|
||||
|
||||
else
|
||||
if (_detalhes.switch.segments_blocks) then
|
||||
_detalhes.switch:ClearSegmentBlocks()
|
||||
end
|
||||
end
|
||||
|
||||
--> check if there is some custom contidional
|
||||
@@ -162,16 +365,9 @@ function _detalhes.switch:ShowMe (instancia)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (_detalhes.switch.current_instancia) then
|
||||
_detalhes.switch.current_instancia:StatusBarAlert (nil)
|
||||
end
|
||||
|
||||
_detalhes.switch.current_instancia = instancia
|
||||
|
||||
_detalhes.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 1)
|
||||
_detalhes.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 1)
|
||||
|
||||
_detalhes.switch.frame:SetBackdropColor (0.094, 0.094, 0.094, .8)
|
||||
|
||||
local altura = instancia.baseframe:GetHeight()
|
||||
@@ -623,9 +819,6 @@ local oniconleave = function (self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
|
||||
local paramTable = {
|
||||
|
||||
+5
-2
@@ -322,8 +322,11 @@ function _G._detalhes:Start()
|
||||
--> send feedback panel if the user got 100 or more logons with details
|
||||
if (self.tutorial.logons > 100) then -- and self.tutorial.logons < 104
|
||||
if (not self.tutorial.feedback_window1) then
|
||||
self.tutorial.feedback_window1 = true
|
||||
_detalhes:ShowFeedbackRequestWindow()
|
||||
--> check if isn't inside an instance
|
||||
if (_detalhes:IsInCity()) then
|
||||
self.tutorial.feedback_window1 = true
|
||||
_detalhes:ShowFeedbackRequestWindow()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user