- 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:
@@ -156,7 +156,10 @@ reset when data is wiped and each character have its own combat number counter.
|
||||
|
||||
Details:IsInCombat()
|
||||
returns if Details! is in combat or not.
|
||||
|
||||
|
||||
Details:IsInEncounter()
|
||||
returns if Details! is in a raid encounter combat.
|
||||
|
||||
damage, healing, energy, misc = Details:GetAllActors (combat, actorname)
|
||||
returns all the four actor objects for the requested combat and actor.
|
||||
combat must be a combat object.
|
||||
|
||||
+16
-13
@@ -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])
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
+5
-1
@@ -500,13 +500,17 @@
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (not _detalhes.tabela_vigente.is_boss) then
|
||||
|
||||
if (_detalhes.tabela_vigente.is_pvp or _detalhes.tabela_vigente.is_arena) then
|
||||
_detalhes:FlagActorsOnPvPCombat()
|
||||
end
|
||||
|
||||
if (_detalhes.tabela_vigente.is_arena) then
|
||||
_detalhes.tabela_vigente.enemy = "[" .. ARENA .. "] " .. _detalhes.tabela_vigente.is_arena.name
|
||||
end
|
||||
|
||||
local in_instance = IsInInstance() --> garrison returns party as instance type.
|
||||
if ((InstanceType == "party" or InstanceType == "raid") and in_instance) then
|
||||
if (InstanceType == "party") then
|
||||
|
||||
+19
-7
@@ -1063,7 +1063,7 @@ function _detalhes:IlvlFromNetwork (player, realm, core, ilvl)
|
||||
_detalhes.item_level_pool [guid] = {name = player, ilvl = ilvl, time = time()}
|
||||
end
|
||||
|
||||
--test on your self:
|
||||
--> test
|
||||
--/run _detalhes.ilevel:CalcItemLevel ("player", UnitGUID("player"), true)
|
||||
--/run wipe (_detalhes.item_level_pool)
|
||||
function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
@@ -1076,7 +1076,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
|
||||
if (CheckInteractDistance (unitid, 1)) then
|
||||
|
||||
--16 = all itens including main and off hand
|
||||
--> 16 = all itens including main and off hand
|
||||
local item_amount = 16
|
||||
local item_level = 0
|
||||
local failed = 0
|
||||
@@ -1086,10 +1086,22 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
local item = GetInventoryItemLink (unitid, equip_id)
|
||||
if (item) then
|
||||
local _, _, _, iLevel, _, _, _, _, equipSlot = GetItemInfo (item)
|
||||
if (iLevel and iLevel > 100) then
|
||||
item_level = item_level + iLevel
|
||||
-- 16 = main hand 17 = off hand
|
||||
-- if using a two-hand, ignore the off hand slot
|
||||
if (iLevel and iLevel >= 100) then
|
||||
|
||||
local _, _, _, _, _, _, _, _, _, _, _, upgradeTypeID, _, numBonusIDs, bonusID1, bonusID2 = strsplit (":", item)
|
||||
|
||||
--> timewarped
|
||||
if (upgradeTypeID == "512" and bonusID1 == "615") then
|
||||
item_level = item_level + 660
|
||||
if (bonusID2 == "656") then
|
||||
item_level = item_level + 15
|
||||
end
|
||||
else
|
||||
item_level = item_level + iLevel
|
||||
end
|
||||
|
||||
--> 16 = main hand 17 = off hand
|
||||
--> if using a two-hand, ignore the off hand slot
|
||||
if (equip_id == 16 and two_hand [equipSlot]) then
|
||||
item_amount = 15
|
||||
break
|
||||
@@ -1106,7 +1118,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
|
||||
local average = item_level / item_amount
|
||||
|
||||
-- register
|
||||
--> register
|
||||
if (average > 0) then
|
||||
if (shout) then
|
||||
_detalhes:Msg (name .. " item level: " .. average)
|
||||
|
||||
@@ -3866,6 +3866,10 @@
|
||||
function _detalhes:IsInCombat()
|
||||
return _in_combat
|
||||
end
|
||||
|
||||
function _detalhes:IsInEncounter()
|
||||
return _detalhes.encounter_table.id and true or false
|
||||
end
|
||||
|
||||
--> get combat
|
||||
function _detalhes:GetCombat (_combat)
|
||||
|
||||
+46
-51
@@ -13,6 +13,7 @@
|
||||
local _math_floor = math.floor --lua local
|
||||
local _math_max = math.max --lua local
|
||||
local _math_abs = math.abs --lua local
|
||||
local _math_min = math.min --lua local
|
||||
local _math_random = math.random --lua local
|
||||
local _type = type --lua local
|
||||
local _string_match = string.match --lua local
|
||||
@@ -24,6 +25,7 @@
|
||||
local _tonumber = tonumber
|
||||
local _strsplit = strsplit
|
||||
local _pcall = pcall
|
||||
local _GetTime = GetTime
|
||||
|
||||
local _UnitClass = UnitClass --wow api local
|
||||
local _IsInRaid = IsInRaid --wow api local
|
||||
@@ -502,6 +504,17 @@ end
|
||||
return nil
|
||||
end
|
||||
|
||||
--[[ test grayscale ]]
|
||||
function _detalhes:teste_grayscale()
|
||||
local instancia = _detalhes.tabela_instancias[1]
|
||||
for i = 1, instancia.rows_created, 1 do
|
||||
local barra = instancia.barras[i]
|
||||
local red, green, blue, alpha = barra.textura:GetVertexColor()
|
||||
local grayscale = (red*0.03+green+blue) / 3 --> grayscale lightness method
|
||||
gump:GradientEffect ( barra.textura, "texture", red, green, blue, alpha, grayscale, grayscale, grayscale, alpha, 1)
|
||||
end
|
||||
end
|
||||
|
||||
local function frame_task (self, elapsed)
|
||||
|
||||
self.FrameTime = self.FrameTime + elapsed
|
||||
@@ -509,34 +522,32 @@ end
|
||||
if (self.HaveGradientEffect) then
|
||||
|
||||
local done = false
|
||||
|
||||
for index, ThisGradient in _ipairs (self.gradientes) do
|
||||
|
||||
if (self.FrameTime >= ThisGradient.NextStepAt and not ThisGradient.done) then
|
||||
|
||||
--> effects
|
||||
if (not ThisGradient.done) then
|
||||
|
||||
local percent = _math_min ((_GetTime() - ThisGradient.TimeStart) / ThisGradient.Duration * 100, 100)
|
||||
local red_now = ThisGradient.StartRed + (percent * ThisGradient.OnePercentRed)
|
||||
local green_now = ThisGradient.StartGreen + (percent * ThisGradient.OnePercentGreen)
|
||||
local blue_now = ThisGradient.StartBlue + (percent * ThisGradient.OnePercentBlue)
|
||||
local alpha_now = ThisGradient.StartAlpha + (percent * ThisGradient.OnePercentAlpha)
|
||||
|
||||
if (ThisGradient.ObjectType == "frame") then
|
||||
local r, g, b, a = ThisGradient.Object:GetBackdropColor()
|
||||
ThisGradient.Object:SetBackdropColor (r + ThisGradient.Colors.Red, g + ThisGradient.Colors.Green, b + ThisGradient.Colors.Blue, a + ThisGradient.Colors.Alpha)
|
||||
ThisGradient.Object:SetBackdropColor (red_now, green_now, blue_now, alpha_now)
|
||||
elseif (ThisGradient.ObjectType == "texture") then
|
||||
local r, g, b, a = ThisGradient.Object:GetVertexColor()
|
||||
ThisGradient.Object:SetVertexColor (r + ThisGradient.Colors.Red, g + ThisGradient.Colors.Green, b + ThisGradient.Colors.Blue, a + ThisGradient.Colors.Alpha)
|
||||
ThisGradient.Object:SetVertexColor (red_now, green_now, blue_now, alpha_now)
|
||||
end
|
||||
|
||||
ThisGradient.OnStep = ThisGradient.OnStep + 1
|
||||
if (ThisGradient.FinishStep == ThisGradient.OnStep) then
|
||||
if (percent == 100) then
|
||||
if (ThisGradient.Func) then
|
||||
if (type (ThisGradient.Func) == "string") then
|
||||
local f = loadstring (ThisGradient.Func)
|
||||
f()
|
||||
else
|
||||
ThisGradient.Func()
|
||||
local okey, errortext = _pcall (ThisGradient.Func, ThisGradient.FuncParam)
|
||||
if (not okey) then
|
||||
_detalhes:Msg ("GradientEffect() end function error:", errortext)
|
||||
end
|
||||
end
|
||||
|
||||
ThisGradient.done = true
|
||||
done = true
|
||||
else
|
||||
ThisGradient.NextStepAt = self.FrameTime + ThisGradient.SleepTime
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -565,19 +576,8 @@ end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--[[ test grayscale ]]
|
||||
function _detalhes:teste_grayscale()
|
||||
local instancia = _detalhes.tabela_instancias[1]
|
||||
for i = 1, instancia.rows_created, 1 do
|
||||
local barra = instancia.barras[i]
|
||||
local red, green, blue, alpha = barra.textura:GetVertexColor()
|
||||
local grayscale = (red*0.03+green+blue) / 3 --> grayscale lightness method
|
||||
gump:GradientEffect ( barra.textura, "texture", red, green, blue, alpha, grayscale, grayscale, grayscale, alpha, 1)
|
||||
end
|
||||
end
|
||||
|
||||
function gump:GradientEffect ( Object, ObjectType, StartRed, StartGreen, StartBlue, StartAlpha, EndRed, EndGreen, EndBlue, EndAlpha, Duration, EndFunction, FuncParam)
|
||||
|
||||
function gump:GradientEffect (Object, ObjectType, StartRed, StartGreen, StartBlue, StartAlpha, EndRed, EndGreen, EndBlue, EndAlpha, Duration, EndFunction, FuncParam)
|
||||
|
||||
if (type (StartRed) == "table" and type (StartGreen) == "table") then
|
||||
Duration, EndFunction = StartBlue, StartAlpha
|
||||
@@ -619,33 +619,28 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
local MinFramesPerSecond = 10 --> at least 10 frames will be necessary
|
||||
local ExecTime = Duration * 1000 --> value in miliseconds
|
||||
local SleepTime = 100 --> 100 miliseconds
|
||||
|
||||
local FrameAmount = _math_floor (ExecTime/100) --> amount of frames
|
||||
|
||||
if (FrameAmount < MinFramesPerSecond) then
|
||||
FrameAmount = MinFramesPerSecond
|
||||
SleepTime = ExecTime/FrameAmount
|
||||
if (EndFunction and _type (EndFunction) == "string") then
|
||||
EndFunction = loadstring (EndFunction) or false
|
||||
end
|
||||
|
||||
local ColorStep = {}
|
||||
ColorStep.Red = (EndRed - StartRed) / FrameAmount
|
||||
ColorStep.Green = (EndGreen - StartGreen) / FrameAmount
|
||||
ColorStep.Blue = (EndBlue - StartBlue) / FrameAmount
|
||||
ColorStep.Alpha = (EndAlpha - StartAlpha) / FrameAmount
|
||||
|
||||
GradientFrameControl.gradientes [#GradientFrameControl.gradientes+1] = {
|
||||
OnStep = 1,
|
||||
FinishStep = FrameAmount,
|
||||
SleepTime = SleepTime/1000,
|
||||
NextStepAt = GradientFrameControl.FrameTime + (SleepTime/1000),
|
||||
Object = Object,
|
||||
ObjectType = string.lower (ObjectType),
|
||||
Colors = ColorStep,
|
||||
Func = EndFunction,
|
||||
FuncParam = FuncParam}
|
||||
FuncParam = FuncParam,
|
||||
TimeStart = GetTime(),
|
||||
Duration = Duration,
|
||||
|
||||
StartRed = StartRed,
|
||||
StartGreen = StartGreen,
|
||||
StartBlue = StartBlue,
|
||||
StartAlpha = StartAlpha,
|
||||
|
||||
OnePercentRed = StartRed > EndRed and (StartRed - EndRed) / 100 * -1 or (EndRed - StartRed) / 100,
|
||||
OnePercentGreen = StartGreen > EndGreen and (StartGreen - EndGreen) / 100 * -1 or (EndGreen - StartGreen) / 100,
|
||||
OnePercentBlue = StartBlue > EndBlue and (StartBlue - EndBlue) / 100 * -1 or (EndBlue - StartBlue) / 100,
|
||||
OnePercentAlpha = StartAlpha > EndAlpha and (StartAlpha - EndAlpha) / 100 * -1 or (EndAlpha - StartAlpha) /100,
|
||||
}
|
||||
|
||||
Object.HaveGradientEffect = true
|
||||
GradientFrameControl.HaveGradientEffect = true
|
||||
|
||||
+1069
-165
File diff suppressed because it is too large
Load Diff
@@ -969,7 +969,8 @@ local default_profile = {
|
||||
show_amount = false,
|
||||
commands = {},
|
||||
header_text_color = {1, 0.9176, 0, 1}, --{1, 0.7, 0, 1}
|
||||
|
||||
submenu_wallpaper = true,
|
||||
|
||||
anchored_to = 1,
|
||||
anchor_screen_pos = {507.700, -350.500},
|
||||
anchor_point = "bottom",
|
||||
|
||||
+17
-21
@@ -999,26 +999,6 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (msg == "ilvl") then
|
||||
local item_amount = 0
|
||||
local item_level = 0
|
||||
|
||||
for equip_id = 1, 17 do
|
||||
if (equip_id ~= 4) then --shirt slot
|
||||
local item = GetInventoryItemLink ("player", equip_id)
|
||||
if (item) then
|
||||
local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo (item)
|
||||
if (iLevel) then
|
||||
item_amount = item_amount + 1
|
||||
item_level = item_level + iLevel
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local average = item_level / item_amount
|
||||
print ("your item lvl:", average)
|
||||
|
||||
elseif (msg == "forge") then
|
||||
_detalhes:OpenForge()
|
||||
|
||||
@@ -1044,7 +1024,23 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
-1, --overkill =
|
||||
1 --school =
|
||||
)
|
||||
|
||||
|
||||
elseif (msg == "ilvl") then
|
||||
local ilvl_frame = CreateFrame ("GameTooltip", "details_ilvl_tooltip", UIParent, "GameTooltipTemplate");
|
||||
local get_ilvl = function (itemLink)
|
||||
ilvl_frame:SetOwner (UIParent, "ANCHOR_NONE")
|
||||
ilvl_frame:ClearLines()
|
||||
ilvl_frame:SetHyperlink (itemLink)
|
||||
|
||||
for i = 1, 13 do
|
||||
print (_G ["details_ilvl_tooltipTextLeft" .. i]:GetText())
|
||||
end
|
||||
end
|
||||
|
||||
local item = GetInventoryItemLink ("player", 1)
|
||||
print ("item:", item)
|
||||
get_ilvl (item)
|
||||
|
||||
else
|
||||
|
||||
--if (_detalhes.opened_windows < 1) then
|
||||
|
||||
@@ -1643,6 +1643,18 @@ function window:CreateFrame20()
|
||||
edit_menu_bg:SetIcon ([[Interface\CHATFRAME\UI-ChatIcon-Maximize-Down]], 12, 12, nil, {6/32, 23/32, 10/32, 25/32}, nil, 4, 2)
|
||||
window:CreateLineBackground2 (frame20, "EditMenuBgButton", "EditMenuBgButton", Loc ["STRING_OPTIONS_TOOLTIPS_MENU_WALLP_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
--> disable cooltip wallpaper on submenus
|
||||
g:NewLabel (frame20, _, "$parentCopyMainWallpaperLabel", "CopyMainWallpaperLabel", Loc ["STRING_OPTIONS_TOOLTIPS_IGNORESUBWALLPAPER"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame20, _, "$parentCopyMainWallpaperSlider", "CopyMainWallpaperSlider", 60, 20, _, _, _detalhes.tooltip.submenu_wallpaper)
|
||||
frame20.CopyMainWallpaperSlider:SetPoint ("left", frame20.CopyMainWallpaperLabel, "right", 2)
|
||||
|
||||
frame20.CopyMainWallpaperSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes.tooltip.submenu_wallpaper = value
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame20, "CopyMainWallpaperSlider", "CopyMainWallpaperLabel", Loc ["STRING_OPTIONS_TOOLTIPS_IGNORESUBWALLPAPER_DESC"])
|
||||
|
||||
--> anchors:
|
||||
|
||||
--general anchor
|
||||
@@ -1668,13 +1680,10 @@ function window:CreateFrame20()
|
||||
{"TooltipShowAmountLabel", 8},
|
||||
{"TooltipdpsAbbreviateLabel", 10},
|
||||
{"TooltipMaximizeLabel", 9},
|
||||
|
||||
{"TooltipsBorderAnchorLabel", 11, true},
|
||||
{"BackdropBorderTextureLabel", 14},
|
||||
{"BackdropSizeLabel", 13},
|
||||
{"BackdropColorLabel", 12},
|
||||
{"CopyMainWallpaperLabel", 10},
|
||||
{edit_menu_bg, 11, true},
|
||||
}
|
||||
|
||||
|
||||
window:arrange_menu (frame20, left_side, x, -90)
|
||||
|
||||
x = window.right_start_at
|
||||
@@ -1687,7 +1696,11 @@ function window:CreateFrame20()
|
||||
{"TooltipRelativeSideLabel", 5},
|
||||
{"TooltipOffsetXLabel", 6, true},
|
||||
{"TooltipOffsetYLabel", 7},
|
||||
{edit_menu_bg, 8, true},
|
||||
|
||||
{"TooltipsBorderAnchorLabel", 8, true},
|
||||
{"BackdropBorderTextureLabel", 9},
|
||||
{"BackdropSizeLabel", 10},
|
||||
{"BackdropColorLabel", 11},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame20, right_side, x, -90)
|
||||
@@ -10670,6 +10683,8 @@ end --> if not window
|
||||
_G.DetailsOptionsWindow20BackdropSizeHeight.MyObject:SetValue (_detalhes.tooltip.border_size)
|
||||
_G.DetailsOptionsWindow20BackdropColorPick.MyObject:SetColor (unpack (_detalhes.tooltip.border_color))
|
||||
|
||||
_G.DetailsOptionsWindow20CopyMainWallpaperSlider.MyObject:SetValue (_detalhes.tooltip.submenu_wallpaper)
|
||||
|
||||
----------
|
||||
|
||||
_G.DetailsOptionsWindow6SideBarsSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
|
||||
+91
-38
@@ -317,6 +317,7 @@ local function OnLeaveMainWindow (instancia, self)
|
||||
instancia.is_interacting = false
|
||||
instancia:SetMenuAlpha (nil, nil, nil, nil, true)
|
||||
instancia:SetAutoHideMenu (nil, nil, true)
|
||||
instancia:RefreshAttributeTextSize()
|
||||
|
||||
if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then
|
||||
|
||||
@@ -350,6 +351,8 @@ local function OnEnterMainWindow (instancia, self)
|
||||
instancia.is_interacting = true
|
||||
instancia:SetMenuAlpha (nil, nil, nil, nil, true)
|
||||
instancia:SetAutoHideMenu (nil, nil, true)
|
||||
instancia:RefreshAttributeTextSize()
|
||||
|
||||
instancia.last_interaction = _detalhes._tempo or time()
|
||||
|
||||
if (instancia.baseframe:GetFrameLevel() > instancia.rowframe:GetFrameLevel()) then
|
||||
@@ -5616,23 +5619,28 @@ local build_segment_list = function (self, elapsed)
|
||||
end
|
||||
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 16, 0.96875, 1, 0, 0.03125)
|
||||
|
||||
local background = _detalhes:GetRaidIcon (thisCombat.is_boss.mapid)
|
||||
if (background) then
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
|
||||
else
|
||||
local ej_id = thisCombat.is_boss.ej_instance_id
|
||||
if (ej_id and ej_id ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (name) then
|
||||
if (thisCombat.instance_type == "party") then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
|
||||
end
|
||||
end
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
local background = _detalhes:GetRaidIcon (thisCombat.is_boss.mapid)
|
||||
if (background) then
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, [[Interface\BlackMarket\HotItemBanner]], unknown_boss_tex, unknown_boss_color, true)
|
||||
local ej_id = thisCombat.is_boss.ej_instance_id
|
||||
if (ej_id and ej_id ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (name) then
|
||||
if (thisCombat.instance_type == "party") then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
|
||||
end
|
||||
end
|
||||
else
|
||||
CoolTip:SetWallpaper (2, [[Interface\BlackMarket\HotItemBanner]], unknown_boss_tex, unknown_boss_color, true)
|
||||
end
|
||||
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
|
||||
|
||||
elseif (thisCombat.is_pvp) then
|
||||
@@ -5640,9 +5648,14 @@ local build_segment_list = function (self, elapsed)
|
||||
enemy = thisCombat.is_pvp.name
|
||||
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.251953125, 0.306640625, 0.205078125, 0.248046875)
|
||||
|
||||
local file, coords = _detalhes:GetBattlegroundInfo (thisCombat.is_pvp.mapid)
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
local file, coords = _detalhes:GetBattlegroundInfo (thisCombat.is_pvp.mapid)
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_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
|
||||
|
||||
elseif (thisCombat.is_arena) then
|
||||
@@ -5650,9 +5663,14 @@ local build_segment_list = function (self, elapsed)
|
||||
enemy = thisCombat.is_arena.name
|
||||
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.251953125, 0.306640625, 0.205078125, 0.248046875)
|
||||
|
||||
local file, coords = _detalhes:GetArenaInfo (thisCombat.is_arena.mapid)
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
local file, coords = _detalhes:GetArenaInfo (thisCombat.is_arena.mapid)
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_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
|
||||
else
|
||||
enemy = thisCombat.enemy
|
||||
@@ -5668,7 +5686,12 @@ local build_segment_list = function (self, elapsed)
|
||||
CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16)
|
||||
end
|
||||
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
else
|
||||
--> wallpaper = main window
|
||||
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -5721,21 +5744,26 @@ local build_segment_list = function (self, elapsed)
|
||||
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
|
||||
end
|
||||
|
||||
local background = _detalhes:GetRaidIcon (_detalhes.tabela_vigente.is_boss.mapid)
|
||||
if (background) then
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
|
||||
else
|
||||
local ej_id = _detalhes.tabela_vigente.is_boss.ej_instance_id
|
||||
if (ej_id and ej_id ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (name) then
|
||||
if (_detalhes.tabela_vigente.instance_type == "party") then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
local background = _detalhes:GetRaidIcon (_detalhes.tabela_vigente.is_boss.mapid)
|
||||
if (background) then
|
||||
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
|
||||
else
|
||||
local ej_id = _detalhes.tabela_vigente.is_boss.ej_instance_id
|
||||
if (ej_id and ej_id ~= 0) then
|
||||
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
|
||||
if (name) then
|
||||
if (_detalhes.tabela_vigente.instance_type == "party") then
|
||||
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
|
||||
end
|
||||
end
|
||||
end
|
||||
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
|
||||
elseif (_detalhes.tabela_vigente.is_pvp) then
|
||||
enemy = _detalhes.tabela_vigente.is_pvp.name
|
||||
@@ -5744,12 +5772,23 @@ local build_segment_list = function (self, elapsed)
|
||||
enemy = _detalhes.tabela_vigente.is_arena.name
|
||||
file, coords = _detalhes:GetArenaInfo (_detalhes.tabela_vigente.is_arena.mapid)
|
||||
else
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
else
|
||||
--> wallpaper = main window
|
||||
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
end
|
||||
end
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
|
||||
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
if (file) then
|
||||
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_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
|
||||
|
||||
if (not _detalhes.tabela_vigente:GetEndTime()) then
|
||||
@@ -5799,7 +5838,12 @@ local build_segment_list = function (self, elapsed)
|
||||
|
||||
--CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
--CoolTip:SetWallpaper (2, [[Interface\PetBattles\MountJournal-NoMounts]], {0, 403/512, 0, 294/512}, {.5, .5, .5, 0.9})
|
||||
CoolTip:SetWallpaper (2, [[Interface\PetPaperDollFrame\PetStatsBG-Hunter]], {321/512, 0, 0, 190/512}, {1, 1, 1, 0.9})
|
||||
if (_detalhes.tooltip.submenu_wallpaper) then
|
||||
CoolTip:SetWallpaper (2, [[Interface\PetPaperDollFrame\PetStatsBG-Hunter]], {321/512, 0, 0, 190/512}, {1, 1, 1, 0.9})
|
||||
else
|
||||
--> wallpaper = main window
|
||||
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
end
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_overall.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_overall.data_fim, 2, "white", "white")
|
||||
@@ -6293,7 +6337,15 @@ end
|
||||
-- ~attributemenu (text with attribute name)
|
||||
function _detalhes:RefreshAttributeTextSize()
|
||||
if (self.attribute_text.enabled and self.total_buttons_shown and self.baseframe and self.menu_attribute_string) then
|
||||
|
||||
local window_width = self:GetSize()
|
||||
|
||||
if (self.auto_hide_menu.left and not self.is_interacting) then
|
||||
self.menu_attribute_string:SetWidth (window_width)
|
||||
self.menu_attribute_string:SetHeight (self.attribute_text.text_size + 2)
|
||||
return
|
||||
end
|
||||
|
||||
local buttons_shown = self.total_buttons_shown
|
||||
local buttons_width, buttons_spacement = self.menu_icons_size * 16, self.menu_icons.space
|
||||
|
||||
@@ -6577,6 +6629,7 @@ function _detalhes:SetAutoHideMenu (left, right, interacting)
|
||||
end
|
||||
end
|
||||
|
||||
self:RefreshAttributeTextSize()
|
||||
--auto_hide_menu = {left = false, right = false},
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user