- Raid Check (plugin): added item level.

- Advanced Death Logs (plugin): bug fixes, it's important to update it.
- Time Line (plugin): bug fixes.
- Added option to disabled th eitem level tracker.
- Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.
This commit is contained in:
Tercio
2015-03-30 15:21:58 -03:00
parent 2bb5488770
commit 26a83d962c
19 changed files with 345 additions and 97 deletions
+24
View File
@@ -0,0 +1,24 @@
=======================================
Item Level
=======================================
Details.ilevel:IsTrackerEnabled()
return if the item level tracker is enabled.
Details.ilevel:TrackItemLevel (bool)
enable or disable the tracker, item level tracker only work when inside a raid instance and out of combat.
Details.ilevel:GetPool()
return a table containing all tracked players:
{[GUID] = {["name"] = name-realm, ["ilvl"] = item level, ["time"] = time()}}
Details.ilevel:GetIlvl (guid)
return the item level table for the requested guid.
Details.ilevel:GetInOrder()
return a new numeric table with sorted in decreasing order:
{{name-realm, item level, time()}, {name-realm, item level, time()}}
=======================================
=======================================
-1
View File
@@ -16,7 +16,6 @@ locales\Details-deDE.lua
locales\Details-frFR.lua
locales\Details-koKR.lua
locales\Details-ruRU.lua
locales\Details-zhCN.lua
locales\Details-zhTW.lua
boot.lua
+11 -6
View File
File diff suppressed because one or more lines are too long
+5 -3
View File
@@ -166,6 +166,8 @@ function atributo_misc:CreateBuffTargetObject()
end
local backgroundColor = {0, 0, 0, 1}
local backgroud_bar_damage = {value = 100, texture = [[Interface\AddOns\Details\images\bar_serenity]], color = {1, 0, 0, 0.1}}
--local backgroud_bar_heal = {value = 100, texture = [[Interface\AddOns\Details\images\bar_background]], color = {0, 0, 0, 1}}
function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
@@ -220,16 +222,16 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
if (event [9]) then
--> friendly fire
GameCooltip:AddStatusBar (hp, 1, "darkorange", true)
GameCooltip:AddStatusBar (hp, 1, "darkorange", true, backgroud_bar_damage)
else
--> from a enemy
GameCooltip:AddStatusBar (hp, 1, "red", true)
GameCooltip:AddStatusBar (hp, 1, "red", true, backgroud_bar_damage)
end
else
--> heal
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (hp, 1, "green", true)
GameCooltip:AddStatusBar (hp, 1, "green", true) --, backgroud_bar_heal
end
+1 -1
View File
@@ -178,7 +178,7 @@
end
end
if ( (_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER")) then --> faz parte do grupo
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNKNOW" and novo_objeto.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then
novo_objeto.grupo = true
if (_detalhes:IsATank (serial)) then
+134 -55
View File
@@ -508,6 +508,7 @@ end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> inspect stuff
_detalhes.ilevel = {}
local ilvl_core = _detalhes:CreateEventListener()
ilvl_core:RegisterEvent ("GROUP_ONENTER", "OnEnter")
@@ -518,22 +519,17 @@ ilvl_core:RegisterEvent ("ZONE_TYPE_CHANGED", "ZoneChanged")
local inspecting = {}
local inspect_frame = CreateFrame ("frame")
inspect_frame:RegisterEvent ("INSPECT_READY")
local check_inspect_queue = function()
for spellid, timeout_id in pairs (inspecting) do
return
end
inspect_frame:UnregisterEvent ("INSPECT_READY")
end
local two_hand = {
["INVTYPE_2HWEAPON"] = true,
["INVTYPE_RANGED"] = true,
["INVTYPE_RANGEDRIGHT"] = true,
}
local inspect_amout = function()
local i = 0
for spellid, timeout_id in pairs (inspecting) do
i = i + 1
end
return i
end
local MAX_INSPECT_AMOUNT = 1
local MIN_ILEVEL_TO_STORE = 580
local LOOP_TIME = 3
function _detalhes:IlvlFromNetwork (player, realm, core, ilvl)
local guid = UnitGUID (player .. "-" .. realm)
@@ -547,51 +543,89 @@ function _detalhes:IlvlFromNetwork (player, realm, core, ilvl)
_detalhes.item_level_pool [guid] = {name = player, ilvl = ilvl, time = time()}
end
inspect_frame:SetScript ("OnEvent", function (self, event, ...)
local guid, unitid, arg3 = select (1, ...)
--test on your self:
--/run _detalhes.ilevel:CalcItemLevel ("player", UnitGUID("player"), true)
--/run wipe (_detalhes.item_level_pool)
function ilvl_core:CalcItemLevel (unitid, guid, shout)
if (type (unitid) == "table") then
shout = unitid [3]
guid = unitid [2]
unitid = unitid [1]
end
if (CheckInteractDistance (unitid, 1)) then
--16 = all itens including main and off hand
local item_amount = 16
local item_level = 0
local failed = 0
for equip_id = 1, 17 do
if (equip_id ~= 4) then --shirt slot
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 (equip_id == 16 and two_hand [equipSlot]) then
item_amount = 15
break
end
end
else
failed = failed + 1
if (failed > 2) then
break
end
end
end
end
local average = item_level / item_amount
-- register
if (average > 0) then
if (shout) then
_detalhes:Msg (name .. " item level: " .. average)
end
if (average > MIN_ILEVEL_TO_STORE) then
local name = _detalhes:GetCLName (unitid)
_detalhes.item_level_pool [guid] = {name = name, ilvl = average, time = time()}
end
end
end
end
_detalhes.ilevel.CalcItemLevel = ilvl_core.CalcItemLevel
inspect_frame:SetScript ("OnEvent", function (self, event, ...)
local guid = select (1, ...)
if (inspecting [guid]) then
local unitid, cancel_tread = inspecting [guid] [1], inspecting [guid] [2]
inspecting [guid] = nil
ilvl_core.amt_inspecting = ilvl_core.amt_inspecting - 1
ilvl_core:CancelTimer (cancel_tread)
--> do inspect stuff
if (unitid) then
if (CheckInteractDistance (unitid, 1)) 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 (unitid, 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
-- register
if (average > 0) then
_detalhes.item_level_pool [guid] = {name = UnitName (unitid), ilvl = average, time = time()}
end
end
local t = {unitid, guid}
--ilvl_core:ScheduleTimer ("CalcItemLevel", 0.5, t)
ilvl_core:ScheduleTimer ("CalcItemLevel", 0.5, t)
ilvl_core:ScheduleTimer ("CalcItemLevel", 2, t)
ilvl_core:ScheduleTimer ("CalcItemLevel", 4, t)
ilvl_core:ScheduleTimer ("CalcItemLevel", 8, t)
end
--> check queue
check_inspect_queue()
end
end)
function ilvl_core:InspectTimeOut (guid)
inspecting [guid] = nil
check_inspect_queue()
ilvl_core.amt_inspecting = ilvl_core.amt_inspecting - 1
end
function ilvl_core:GetItemLevel (unitid, guid)
@@ -602,22 +636,48 @@ function ilvl_core:GetItemLevel (unitid, guid)
if (not unitid or not CanInspect (unitid) or not CheckInteractDistance (unitid, 1)) then
return
end
inspect_frame:RegisterEvent ("INSPECT_READY")
inspecting [guid] = {unitid, ilvl_core:ScheduleTimer ("InspectTimeOut", 12, guid)}
ilvl_core.amt_inspecting = ilvl_core.amt_inspecting + 1
NotifyInspect (unitid)
end
local NotifyInspectHook = function (unitid)
if (IsInRaid() and _detalhes:GetZoneType() == "raid") then
local guid = UnitGUID (unitid)
local name = _detalhes:GetCLName (unitid)
if (guid and name and not inspecting [guid]) then
for i = 1, GetNumGroupMembers() do
if (name == _detalhes:GetCLName ("raid" .. i)) then
unitid = "raid" .. i
break
end
end
inspecting [guid] = {unitid, ilvl_core:ScheduleTimer ("InspectTimeOut", 12, guid)}
ilvl_core.amt_inspecting = ilvl_core.amt_inspecting + 1
end
end
end
hooksecurefunc ("NotifyInspect", NotifyInspectHook)
function ilvl_core:Reset()
ilvl_core.raid_id = 1
ilvl_core.amt_inspecting = 0
for guid, t in pairs (inspecting) do
ilvl_core:CancelTimer (t[2])
inspecting [guid] = nil
end
end
function ilvl_core:Loop()
if (inspect_amout() > 1) then
if (ilvl_core.amt_inspecting >= MAX_INSPECT_AMOUNT) then
return
end
local members_amt = GetNumGroupMembers()
if (ilvl_core.raid_id > members_amt) then
ilvl_core.raid_id = 1
@@ -634,7 +694,7 @@ function ilvl_core:Loop()
if (inspecting [guid]) then
return
end
local ilvl_table = _detalhes.ilevel:GetIlvl (guid)
if (ilvl_table and ilvl_table.time + 3600 > time()) then
ilvl_core.raid_id = ilvl_core.raid_id + 1
@@ -653,7 +713,7 @@ function ilvl_core:EnterCombat()
end
local can_start_loop = function()
if (_detalhes:GetZoneType() ~= "raid" or ilvl_core.loop_process or _detalhes.in_combat) then
if (_detalhes:GetZoneType() ~= "raid" or ilvl_core.loop_process or _detalhes.in_combat or not _detalhes.track_item_level) then
return false
end
return true
@@ -662,14 +722,14 @@ end
function ilvl_core:LeaveCombat()
if (can_start_loop()) then
ilvl_core:Reset()
ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", 2)
ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", LOOP_TIME)
end
end
function ilvl_core:ZoneChanged (zone_type)
if (can_start_loop()) then
ilvl_core:Reset()
ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", 2)
ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", LOOP_TIME)
end
end
@@ -680,7 +740,7 @@ function ilvl_core:OnEnter()
if (can_start_loop()) then
ilvl_core:Reset()
ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", 2)
ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", LOOP_TIME)
end
end
@@ -692,7 +752,26 @@ function ilvl_core:OnLeave()
end
--> ilvl API
_detalhes.ilevel = {}
function _detalhes.ilevel:IsTrackerEnabled()
return _detalhes.track_item_level
end
function _detalhes.ilevel:TrackItemLevel (bool)
if (type (bool) == "boolean") then
if (bool) then
_detalhes.track_item_level = true
if (can_start_loop()) then
ilvl_core:Reset()
ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", LOOP_TIME)
end
else
_detalhes.track_item_level = false
if (ilvl_core.loop_process) then
ilvl_core:CancelTimer (ilvl_core.loop_process)
ilvl_core.loop_process = nil
end
end
end
end
function _detalhes.ilevel:GetPool()
return _detalhes.item_level_pool
+1
View File
@@ -141,6 +141,7 @@
end
-- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent", function(self, ...)print (...);end)
-- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(6, ...);if (a=="<chr name>")then print (...) end end)
function parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike)
+3 -1
View File
@@ -742,6 +742,8 @@
--> cooltip presets
local preset2_backdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\AddOns\Details\images\border_3]], tile=true,
edgeSize = 16, tileSize = 64, insets = {left = 3, right = 3, top = 4, bottom = 4}}
_detalhes.cooltip_preset2_backdrop = preset2_backdrop
local white_table = {1, 1, 1, 1}
--"Details BarBorder 3"
function _detalhes:CooltipPreset (preset)
@@ -768,7 +770,7 @@
GameCooltip:SetOption ("IgnoreButtonAutoHeight", true)
GameCooltip:SetColor (1, 0.5, 0.5, 0.5, 0.5)
GameCooltip:SetBackdrop (1, preset2_backdrop, nil, {1, 1, 1, 1})
GameCooltip:SetBackdrop (1, preset2_backdrop, nil, white_table)
end
end
+9
View File
@@ -118,6 +118,15 @@ do
end
return self.nome:gsub (("%-.*"), "")
end
function _detalhes:GetCLName (id)
local name, realm = UnitName (id)
if (name) then
if (realm and realm ~= "") then
name = name .. "-" .. realm
end
return name
end
end
function _detalhes:Class (actor)
return self.classe or actor.classe
end
+1 -1
View File
@@ -59,7 +59,7 @@ do
elseif (c == "PET") then
return [[Interface\AddOns\Details\images\classes_small]], 0.25, 0.49609375, 0.75, 1
else
return [[Interface\AddOns\Details\images\classes_small]], _unpack (CLASS_ICON_TCOORDS [c])
return [[Interface\AddOns\Details\images\classes_small]], _unpack (_detalhes.class_coords [c])
end
end
+3
View File
@@ -859,6 +859,9 @@ local default_profile = {
--> if clear graphic data when logout
clear_graphic = true,
--> item level tracker
track_item_level = true,
--> text sizes
font_sizes = {menus = 10},
+36
View File
@@ -936,6 +936,42 @@ function SlashCmdList.DETAILS (msg, editbox)
print ("outline:",flags)
end
elseif (msg == "sell") then
--sell gray
local c, i, n, v = 0
for b = 0, 4 do
for s = 1, GetContainerNumSlots(b) do
i = {GetContainerItemInfo (b, s)}
n = i[7]
if n and string.find(n,"9d9d9d") then
v = {GetItemInfo(n)}
q = i[2]
c = c+v[11]*q
UseContainerItem (b, s)
print (n, q)
end
end
end
print(GetCoinText(c))
--sell green equip
local c, i, n, v = 0
for b = 0, 4 do
for s = 1, GetContainerNumSlots(b) do
local texture, itemCount, locked, quality, readable, lootable, itemLink = GetContainerItemInfo (b, s)
if (quality == 2) then --a green item
local itemName, itemLink, itemRarity, itemLevel, _, itemType, itemSubType = GetItemInfo (itemLink)
if (itemType == "Armor" or itemType == "Weapon") then --a weapon or armor
if (itemLevel < 460) then
print ("Selling", itemName, itemType)
UseContainerItem (b, s)
end
end
end
end
end
elseif (msg == "ilvl") then
local item_amount = 0
local item_level = 0
+14 -10
View File
@@ -1432,7 +1432,7 @@ do
--[29842] = "WARRIOR", --undribled wrath
}
-- updated on 24/03/2015 (@Tonyleila - WoWInterface)
-- updated on 30/03/2015 (@Tonyleila - WoWInterface)
_detalhes.CrowdControlSpells = {
--Racials
@@ -1453,7 +1453,7 @@ do
--druid
[33786] = true, -- Cyclone
[339] = true, -- Entangling Toots
[339] = true, -- Entangling Toots
[45334] = true, -- Immobilized (from Wild Charge)
[99] = true, -- Incapacitating Roar
[22570] = true, -- Maim
@@ -1463,6 +1463,7 @@ do
[106839] = true, -- Skull Bash
[81261] = true, -- Solar Beam
[107566] = true, -- Staggering Shout
[16979] = true, -- Wild Charge (talent)
--hunter
[117405] = true, -- Binding Shot
@@ -1480,11 +1481,11 @@ do
[58534] = true, -- Deep Freeze
[31661] = true, -- Dragon's Breath
[33395] = true, -- Freeze (pet)
[122] = true, -- Frost Nova
[122] = true, -- Frost Nova
[102051] = true, -- Frostjaw
[157997] = true, -- Ice Nova
[111340] = true, -- Ice Ward
[118] = true, -- Polymorph sheep
[118] = true, -- Polymorph sheep
[28272] = true, -- Polymorph pig
[126819] = true, -- Polymorph pig 2
[61305] = true, -- Polymorph black cat
@@ -1510,12 +1511,13 @@ do
[31935] = true, -- Avenger's Shield
[105421] = true, -- Blinding light
[105593] = true, -- Fist of Justice
[853] = true, -- Hammer of Justice
[853] = true, -- Hammer of Justice
[96231] = true, -- Rebuke
[20066] = true, -- Repentance
[145067] = true, -- Turn Evil
--priest
[605] = true, -- Dominate Mind
[605] = true, -- Dominate Mind
[87194] = true, -- Glyph of Mind Blast
[88625] = true, -- Holy Word: Chastise
[64044] = true, -- Psychic Horror
@@ -1531,7 +1533,7 @@ do
[1330] = true, -- Garrote
[1776] = true, -- Gouge
[1766] = true, -- Kick
[408] = true, -- Kidney shot
[408] = true, -- Kidney shot
[6770] = true, -- Sap
[76577] = true, -- Smoke Bomb
@@ -1552,14 +1554,16 @@ do
[5484] = true, -- Howl of terror
[115268] = true, -- Mesmerize (shivarra)
[6789] = true, -- Mortal Coil
[6358] = true, -- Seduction (succubus
[115781] = true, -- Optical Blast (improved spell lock from Grimoire of Supremacy)
[6358] = true, -- Seduction (succubus)
[30283] = true, -- Shadowfury
[19647] = true, -- Spell Lock (Felhunters)
[31117] = true, -- Unstable Affliction
--warrior
[100] = true, -- Charge
[100] = true, -- Charge
[105771] = true, -- Charge
[102060] = true, -- Disrupting Shout
[118895] = true, -- Dragon Roar
[5246] = true, -- Intimidating shout
[6552] = true, -- Pummel
@@ -1573,7 +1577,7 @@ do
--priest
[47753] = true, --Divine Aegis (discipline)
[17] = true, --Power Word: Shield (discipline)
[17] = true, --Power Word: Shield (discipline)
[114908] = true, --Spirit Shell (discipline)
[114214] = true, --Angelic Bulwark (talent)
[152118] = true, --Clarity of Will (talent)
+30 -10
View File
@@ -415,12 +415,22 @@
local get_player_dps = function()
local damage_player = _detalhes.tabela_vigente (1, _detalhes.playername)
if (damage_player) then
local combat_time = _detalhes.tabela_vigente:GetCombatTime()
if (combat_time > 0) then
return ToKFunctions [_detalhes.minimap.text_format] (_, damage_player.total / combat_time)
else
return 0
if (_detalhes.time_type == 1) then --activity time
local combat_time = damage_player:Tempo()
if (combat_time > 0) then
return ToKFunctions [_detalhes.minimap.text_format] (_, damage_player.total / combat_time)
else
return 0
end
else --effective time
local combat_time = _detalhes.tabela_vigente:GetCombatTime()
if (combat_time > 0) then
return ToKFunctions [_detalhes.minimap.text_format] (_, damage_player.total / combat_time)
else
return 0
end
end
return 0
else
return 0
end
@@ -429,12 +439,22 @@
local get_player_hps = function()
local heal_player = _detalhes.tabela_vigente (2, _detalhes.playername)
if (heal_player) then
local combat_time = _detalhes.tabela_vigente:GetCombatTime()
if (combat_time > 0) then
return ToKFunctions [_detalhes.minimap.text_format] (_, heal_player.total / combat_time)
else
return 0
if (_detalhes.time_type == 1) then --activity time
local combat_time = heal_player:Tempo()
if (combat_time > 0) then
return ToKFunctions [_detalhes.minimap.text_format] (_, heal_player.total / combat_time)
else
return 0
end
else --effective time
local combat_time = _detalhes.tabela_vigente:GetCombatTime()
if (combat_time > 0) then
return ToKFunctions [_detalhes.minimap.text_format] (_, heal_player.total / combat_time)
else
return 0
end
end
return 0
else
return 0
end
+43 -6
View File
@@ -924,7 +924,7 @@ function gump:CriaJanelaInfo()
--> tabs:
--> tab default
_detalhes:CreatePlayerDetailsTab ("Summary", --[1] tab name
_detalhes:CreatePlayerDetailsTab ("Summary", Loc ["STRING_INFO_TAB_SUMMARY"], --[1] tab name [2] localized name
function (tabOBject, playerObject) --[2] condition
if (playerObject) then
return true
@@ -1537,7 +1537,7 @@ function gump:CriaJanelaInfo()
--]]
end
_detalhes:CreatePlayerDetailsTab ("Avoidance", --[1] tab name
_detalhes:CreatePlayerDetailsTab ("Avoidance", Loc ["STRING_INFO_TAB_AVOIDANCE"], --[1] tab name [2] localized name
function (tabOBject, playerObject) --[2] condition
if (playerObject.isTank) then
return true
@@ -2050,13 +2050,19 @@ function gump:CriaJanelaInfo()
local label2 = _G ["DetailsPlayerComparisonBox2"].name_label
local label3 = _G ["DetailsPlayerComparisonBox3"].name_label
local label2_percent = _G ["DetailsPlayerComparisonBox2"].name_label_percent
local label3_percent = _G ["DetailsPlayerComparisonBox3"].name_label_percent
if (players_to_compare [1]) then
label2:SetText (players_to_compare [1]:Name())
label2_percent:SetText (player:Name() .. " %")
end
if (players_to_compare [2]) then
label3:SetText (players_to_compare [2]:Name())
label3_percent:SetText (player:Name() .. " %")
else
label3:SetText ("Player 3")
label3:SetText ("")
label3_percent:SetText ("")
end
refresh_comparison_box (DetailsPlayerComparisonBox1)
@@ -2802,6 +2808,13 @@ function gump:CriaJanelaInfo()
playername2:SetText ("Player 2")
frame2.name_label = playername2
local playername2_percent = frame2:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
playername2_percent:SetPoint ("bottomright", frame2, "topright", -2, 0)
playername2_percent:SetText ("Player 1 %")
playername2_percent:SetTextColor (.6, .6, .6)
frame2.name_label_percent = playername2_percent
--criar as barras do frame2
for i = 1, 9 do
create_bar ("DetailsPlayerComparisonBox2Bar"..i, frame2, i)
@@ -2833,6 +2846,12 @@ function gump:CriaJanelaInfo()
playername3:SetText ("Player 3")
frame3.name_label = playername3
local playername3_percent = frame3:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
playername3_percent:SetPoint ("bottomright", frame3, "topright", -2, 0)
playername3_percent:SetText ("Player 1 %")
playername3_percent:SetTextColor (.6, .6, .6)
frame3.name_label_percent = playername3_percent
--criar as barras do frame3
for i = 1, 9 do
create_bar ("DetailsPlayerComparisonBox3Bar"..i, frame3, i)
@@ -2854,7 +2873,7 @@ function gump:CriaJanelaInfo()
end
-- ~compare
_detalhes:CreatePlayerDetailsTab ("Compare", --[1] tab name
_detalhes:CreatePlayerDetailsTab ("Compare", Loc ["STRING_INFO_TAB_COMPARISON"], --[1] tab name [2] localized name
function (tabOBject, playerObject) --[2] condition
if (info.atributo > 2) then
@@ -2916,6 +2935,23 @@ function gump:CriaJanelaInfo()
local tab = _detalhes.player_details_tabs [index]
if (tab:condition (info.jogador, info.atributo, info.sub_atributo)) then
if (tab.tabname == "Compare") then
--_detalhes:SetTutorialCVar ("DETAILS_INFO_TUTORIAL1", false)
if (not _detalhes:GetTutorialCVar ("DETAILS_INFO_TUTORIAL1")) then
_detalhes:SetTutorialCVar ("DETAILS_INFO_TUTORIAL1", true)
local alert = CreateFrame ("frame", "DetailsInfoPopUp1", info, "DetailsHelpBoxTemplate")
alert.ArrowUP:Show()
alert.ArrowGlowUP:Show()
alert.Text:SetText (Loc ["STRING_INFO_TUTORIAL_COMPARISON1"])
alert:SetPoint ("bottom", tab, "top", 5, 28)
alert:Show()
end
end
tab:Show()
amt_positive = amt_positive + 1
tab:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 390 - (67 * (amt_positive-1)), 1)
@@ -2951,7 +2987,7 @@ end
_detalhes.player_details_tabs = {}
function _detalhes:CreatePlayerDetailsTab (tabname, condition, fillfunction, onclick, oncreate)
function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, fillfunction, onclick, oncreate)
if (not tabname) then
tabname = "unnamed"
end
@@ -2959,7 +2995,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, condition, fillfunction, onc
local index = #_detalhes.player_details_tabs
local newtab = CreateFrame ("button", "DetailsInfoWindowTab" .. index, info, "ChatTabTemplate")
newtab:SetText (tabname)
newtab:SetText (localized_name)
newtab:SetParent (info)
newtab:SetFrameStrata ("HIGH")
newtab:SetFrameLevel (info:GetFrameLevel()+1)
@@ -2967,6 +3003,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, condition, fillfunction, onc
newtab.condition = condition
newtab.tabname = tabname
newtab.localized_name = localized_name
newtab.onclick = onclick
newtab.fillfunction = fillfunction
newtab.last_actor = {}
+19 -1
View File
@@ -21,7 +21,7 @@
16 - data for charts
17 - auto hide settings
18 - misc settings
19 - externals widgets
19 - externals widgets (data feed)
20 - tooltip
--]]
@@ -1806,6 +1806,19 @@ function window:CreateFrame19()
window:CreateLineBackground2 (frame19, "BrokerNumberAbbreviateDropdown", "BrokerNumberAbbreviateLabel", Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"])
--> item level tracker
--anchor
g:NewLabel (frame19, _, "$parentItemLevelTrackerAnchor", "ItemLevelTrackerAnchorLabel", Loc ["STRING_OPTIONS_ILVL_TRACKER"], "GameFontNormal")
--switch
g:NewLabel (frame19, _, "$parentItemLevelLabel", "ItemLevelLabel", Loc ["STRING_OPTIONS_ILVL_TRACKER_TEXT"], "GameFontHighlightLeft")
g:NewSwitch (frame19, _, "$parentItemLevelSlider", "ItemLevelSlider", 60, 20, _, _, _detalhes.ilevel:IsTrackerEnabled())
frame19.ItemLevelSlider:SetPoint ("left", frame19.ItemLevelLabel, "right", 2, 0)
frame19.ItemLevelSlider.OnSwitch = function (self, _, value)
_detalhes.ilevel:TrackItemLevel (value)
end
window:CreateLineBackground2 (frame19, "ItemLevelSlider", "ItemLevelLabel", Loc ["STRING_OPTIONS_ILVL_TRACKER_DESC"])
--> anchors:
local x = window.left_start_at
@@ -1822,6 +1835,8 @@ function window:CreateFrame19()
{"brokerAnchorLabel", 6, true},
{"brokerTextLabel", 7},
{"BrokerNumberAbbreviateLabel", 8},
{"ItemLevelTrackerAnchorLabel", 9, true},
{"ItemLevelLabel", 10}
}
window:arrange_menu (frame19, left_side, x, -90)
@@ -4095,6 +4110,7 @@ function window:CreateFrame2()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
local timetypeOptions = {
--localize-me
{value = 1, label = "Activity Time", onclick = onSelectTimeType, icon = "Interface\\Icons\\Achievement_Quests_Completed_Daily_08", iconcolor = {1, .9, .9}, texcoord = {0.078125, 0.921875, 0.078125, 0.921875}}, --, desc = ""
{value = 2, label = "Effective Time", onclick = onSelectTimeType, icon = "Interface\\Icons\\Achievement_Quests_Completed_08"} --, desc = ""
}
@@ -10395,6 +10411,8 @@ end --> if not window
else
_G.DetailsOptionsWindow19HotcornerSlider.MyObject:SetValue (not _detalhes.hotcorner_topleft.hide)
end
_G.DetailsOptionsWindow19ItemLevelSlider.MyObject:SetValue (_detalhes.track_item_level)
--> window 20
_G.DetailsOptionsWindow20TooltipTextColorPick.MyObject:SetColor (unpack (_detalhes.tooltip.fontcolor))
Binary file not shown.
@@ -472,6 +472,7 @@ local runes_id = {
if (self.one_second > 5) then
self.one_second = 0
local ilvl = ""
local average = 0
for _, ilvl_char in ipairs (_detalhes.ilevel:GetInOrder()) do
local _, class = _UnitClass (ilvl_char [1])
@@ -480,18 +481,25 @@ local runes_id = {
local class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:-5:128:128:" .. coords[1]*128 .. ":" .. coords[2]*128 .. ":" .. coords[3]*128 .. ":" .. coords[4]*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
ilvl = ilvl .. class_color .. DetailsRaidCheck:GetOnlyName (ilvl_char [1]) .. "|r: " .. floor (ilvl_char[2]) .. "\n"
average = average + ilvl_char[2]
amount7 = amount7 + 1
end
end
self.last_ilvl_amount = amount7
average = average / amount7
ilvl = ilvl .. "\n"
ilvl = ilvl .. "|TInterface\\TARGETINGFRAME\\PetBadge-Humanoid:12:12:0:-5:32:32:2:30:2:30|t Average: " .. format ("%.2f", average) .. "\n"
ilvl_str:SetText (ilvl)
self.last_ilvl_amount = amount7 + 2
else
amount7 = self.last_ilvl_amount or 0
end
--t.name, t.ilvl, t.time
--best food
--[[
local b = ""
for name, foodid in pairs (DetailsRaidCheck.havefood_table) do
if (best_food [foodid]) then
@@ -510,6 +518,7 @@ local runes_id = {
end
end
bestfood_str:SetText (b)
--]]
--food
local s, f, p, n = "", "", "", ""
+1 -1
View File
@@ -78,7 +78,7 @@ function _G._detalhes:Start()
--> bookmarks
if (self.switch.InitSwitch) then
self.switch:InitSwitch()
--self.switch:InitSwitch()
end
--> custom window