- Improvements on Weakauras creation from Encounter Details plugin.

- Fixed report for custom display Crowd Control.
- Fixed role icons on custom displays.
- Fixed item level of timewarped items.
- Fixed title text width when auto-hide menu buttons is enabled.
- Fixed background alpha after stretching which wasn't correctly coming back to original color.
- Fixed an issue with dropdown boxes where wasn't showing all options.
This commit is contained in:
Tercio
2015-08-17 00:41:16 -03:00
parent 48f0f2ec26
commit c10dcc50b0
14 changed files with 1338 additions and 327 deletions
+16 -13
View File
@@ -199,12 +199,14 @@
local total_script = _detalhes.custom_function_cache [instance.customName .. "Total"]
local okey
for index, actor in _ipairs (instance_container._ActorTable) do
for index, actor in _ipairs (instance_container._ActorTable) do
local percent, ptotal
if (percent_script) then
okey, percent = _pcall (percent_script, _math_floor (actor.value), top, total, combat, instance, actor)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display function|r:", percent)
_detalhes:Msg ("|cFFFF9900percent script error|r:", percent)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
else
@@ -212,16 +214,16 @@
end
if (total_script) then
local value = _pcall (total_script, _math_floor (actor.value), top, total, combat, instance, actor)
if (type (value) == "number") then
okey, ptotal = SelectedToKFunction (_, value)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display function|r:", ptotal)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
else
ptotal = value
local okey, value = _pcall (total_script, _math_floor (actor.value), top, total, combat, instance, actor)
if (not okey) then
_detalhes:Msg ("|cFFFF9900total script error|r:", value)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
if (type (value) == "number") then
value = SelectedToKFunction (_, value)
end
ptotal = value
else
ptotal = SelectedToKFunction (_, _math_floor (actor.value))
end
@@ -855,6 +857,7 @@
new_actor.spec = actor.spec
new_actor.enemy = actor.enemy
new_actor.role = actor.role
new_actor.arena_enemy = actor.arena_enemy
new_actor.arena_ally = actor.arena_ally
@@ -1600,7 +1603,7 @@
desc = "Show the crowd control amount for each player.",
source = false,
target = false,
script_version = 8,
script_version = 9,
script = [[
local combat, instance_container, instance = ...
local total, top, amount = 0, 0, 0
@@ -1646,7 +1649,7 @@
_detalhes:AddTooltipSpellHeaderText ("Targets", "yellow", #targets)
local class, _, _, _, _, r, g, b = _detalhes:GetClass (actor.nome)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
_detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6)
for index, target in ipairs (targets) do
GameCooltip:AddLine (target[1], target [2])
+28 -20
View File
@@ -2366,9 +2366,16 @@ end
-- ~menu
local menu_wallpaper_tex = {63/512, 331/512, 109/512, 143/512}
local menu_wallpaper_color = {.8, .8, .8, 0.2}
local menu_wallpaper_custom_color = {1, 0, 0, 1}
local wallpaper_bg_color = {.8, .8, .8, 0.2}
local menu_icones = {
"Interface\\AddOns\\Details\\images\\atributos_icones_damage",
"Interface\\AddOns\\Details\\images\\atributos_icones_heal",
"Interface\\AddOns\\Details\\images\\atributos_icones_energyze",
"Interface\\AddOns\\Details\\images\\atributos_icones_misc"
}
function _detalhes:MontaAtributosOption (instancia, func)
func = func or instancia.TrocaTabela
@@ -2385,13 +2392,6 @@ function _detalhes:MontaAtributosOption (instancia, func)
else
options = sub_atributos [atributo_ativo].lista
end
local icones = {
"Interface\\AddOns\\Details\\images\\atributos_icones_damage",
"Interface\\AddOns\\Details\\images\\atributos_icones_heal",
"Interface\\AddOns\\Details\\images\\atributos_icones_energyze",
"Interface\\AddOns\\Details\\images\\atributos_icones_misc"
}
local CoolTip = _G.GameCooltip
local p = 0.125 --> 32/256
@@ -2402,15 +2402,19 @@ function _detalhes:MontaAtributosOption (instancia, func)
CoolTip:AddMenu (1, func, nil, i, nil, atributos.lista[i], nil, true)
CoolTip:AddIcon ("Interface\\AddOns\\Details\\images\\atributos_icones", 1, 1, 20, 20, p*(i-1), p*(i), 0, 1)
if (i == 1) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarlockDestruction-TopLeft]], {1, 0.22, 0, 0.55}, wallpaper_bg_color)
elseif (i == 2) then
--CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\PriestHoly-TopLeft]], {0, .8, 0, 1}, {1, 1, 1, .1})
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\bg-priest-holy]], {1, .6, 0, .2}, wallpaper_bg_color)
elseif (i == 3) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\ShamanEnhancement-TopLeft]], {0, 1, .2, .6}, wallpaper_bg_color)
elseif (i == 4) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarlockCurses-TopLeft]], {.2, 1, 0, 1}, wallpaper_bg_color)
if (_detalhes.tooltip.submenu_wallpaper) then
if (i == 1) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarlockDestruction-TopLeft]], {1, 0.22, 0, 0.55}, wallpaper_bg_color)
elseif (i == 2) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\bg-priest-holy]], {1, .6, 0, .2}, wallpaper_bg_color)
elseif (i == 3) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\ShamanEnhancement-TopLeft]], {0, 1, .2, .6}, wallpaper_bg_color)
elseif (i == 4) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarlockCurses-TopLeft]], {.2, 1, 0, 1}, wallpaper_bg_color)
end
else
--> wallpaper = main window
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
local options = sub_atributos [i].lista
@@ -2418,11 +2422,11 @@ function _detalhes:MontaAtributosOption (instancia, func)
for o = 1, atributos [i] do
if (_detalhes:CaptureIsEnabled ( _detalhes.atributos_capture [gindex] )) then
CoolTip:AddMenu (2, func, true, i, o, options[o], nil, true)
CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1)
CoolTip:AddIcon (menu_icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1)
else
CoolTip:AddLine (options[o], nil, 2, .5, .5, .5, 1)
CoolTip:AddMenu (2, func, true, i, o)
CoolTip:AddIcon (icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1, {.3, .3, .3, 1})
CoolTip:AddIcon (menu_icones[i], 2, 1, 20, 20, p*(o-1), p*(o), 0, 1, {.3, .3, .3, 1})
end
gindex = gindex + 1
@@ -2456,7 +2460,11 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
--> set the wallpaper on custom
GameCooltip:SetWallpaper (2, [[Interface\TALENTFRAME\WarriorArm-TopLeft]], {1, 0, 0, 1}, wallpaper_bg_color)
if (_detalhes.tooltip.submenu_wallpaper) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarriorArm-TopLeft]], menu_wallpaper_custom_color, wallpaper_bg_color)
else
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
if (#_detalhes.custom == 0) then
CoolTip:SetLastSelected (2, 6, 2)
+5
View File
@@ -258,6 +258,11 @@
novo_objeto.displayName = nome
end
--local pet_npc_template = _detalhes:GetNpcIdFromGuid (serial)
--if (pet_npc_template == 86933) then --viviane
-- novo_objeto.grupo = true
--end
else
novo_objeto.displayName = nome
end