- Patch 8.0.1

This commit is contained in:
Tercio
2018-07-17 12:07:40 -03:00
parent 6ef270ac6f
commit df9ce12b82
83 changed files with 7973 additions and 5234 deletions
+10 -3
View File
@@ -33,6 +33,9 @@
local _GetSpellInfo = _detalhes.getspellinfo --details api
local _string_replace = _detalhes.string.replace --details api
--show more information about spells
local debugmode = false
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -2679,7 +2682,7 @@ local InBarIconPadding = 0
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, " ", self, instance.showing))
else
bar.texto_esquerdo:SetText (bar_number .. " " .. self.displayName)
bar.texto_esquerdo:SetText (bar_number .. self.displayName)
end
end
else
@@ -3863,7 +3866,11 @@ end
end
if (type (index) == "number") then
row.texto_esquerdo:SetText (index .. ". " .. name)
if (debugmode) then
row.texto_esquerdo:SetText (index .. ". " .. name .. " (" .. spellid .. ")")
else
row.texto_esquerdo:SetText (index .. ". " .. name)
end
else
row.texto_esquerdo:SetText (name)
end
@@ -3915,7 +3922,7 @@ end
row.textura:SetStatusBarColor (1, 1, 1)
end
else
if (spellid == 98021) then
if (spellid == 98021) then --spirit linkl
row.textura:SetStatusBarColor (1, 0.4, 0.4)
else
row.textura:SetStatusBarColor (1, 1, 1)
+42 -20
View File
@@ -475,8 +475,10 @@ end
local instance1 = _detalhes:GetInstance (1)
local instance2 = _detalhes:GetInstance (2)
if (not instance1.ignore_mass_showhide and not instance2.ignore_mass_showhide) then
_detalhes:CheckCoupleWindows (instance1, instance2)
if (instance1 and instance2) then
if (not instance1.ignore_mass_showhide and not instance2.ignore_mass_showhide) then
_detalhes:CheckCoupleWindows (instance1, instance2)
end
end
end
end
@@ -2332,6 +2334,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
instancia:ChangeIcon()
end
if (_detalhes.janela_info:IsShown() and instancia == _detalhes.janela_info.instancia) then
@@ -2498,7 +2502,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
else
--> wallpaper = main window
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
--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
@@ -2547,7 +2551,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
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)
--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
@@ -2561,10 +2565,11 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
CoolTip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_vidro]])
CoolTip:SetOption ("ButtonsYMod", -5)
CoolTip:SetOption ("ButtonsYModSub", -5)
CoolTip:SetOption ("HeighMod", 6)
CoolTip:SetOption ("HeighModSub", 6)
CoolTip:SetOption ("ButtonsYMod", -7)
CoolTip:SetOption ("HeighMod", 7)
CoolTip:SetOption ("ButtonsYModSub", -7)
CoolTip:SetOption ("HeighModSub", 7)
CoolTip:SetOption ("SelectedTopAnchorMod", -2)
CoolTip:SetOption ("SelectedBottomAnchorMod", 2)
@@ -2579,7 +2584,8 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
CoolTip:SetLastSelected (1, last_selected)
CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
--removed the menu backdrop
--CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
return menu_principal, sub_menus
end
@@ -2606,6 +2612,8 @@ function _detalhes:ChangeIcon (icon)
self.baseframe.cabecalho.atributo_icon:SetWidth (icon_size[1])
self.baseframe.cabecalho.atributo_icon:SetHeight (icon_size[2])
local icon_anchor = skin.icon_anchor_plugins
self.baseframe.cabecalho.atributo_icon:ClearAllPoints()
self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2])
elseif (self.modo == modo_alone) then --> solo
@@ -2624,6 +2632,8 @@ function _detalhes:ChangeIcon (icon)
self.baseframe.cabecalho.atributo_icon:SetWidth (icon_size[1])
self.baseframe.cabecalho.atributo_icon:SetHeight (icon_size[2])
local icon_anchor = skin.icon_anchor_plugins
self.baseframe.cabecalho.atributo_icon:ClearAllPoints()
self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2])
end
else
@@ -2636,14 +2646,26 @@ function _detalhes:ChangeIcon (icon)
--self.baseframe.cabecalho.atributo_icon:SetTexture (icones [self.sub_atributo] [1])
--self.baseframe.cabecalho.atributo_icon:SetTexCoord ( unpack (icones [self.sub_atributo] [2]) )
self.baseframe.cabecalho.atributo_icon:SetTexture (skin.file)
self.baseframe.cabecalho.atributo_icon:SetTexCoord ( (0.03125 * (self.atributo-1)) + half, (0.03125 * self.atributo) - half, 0.35693359375, 0.38720703125)
--default
--self.baseframe.cabecalho.atributo_icon:SetTexture (skin.file)
--self.baseframe.cabecalho.atributo_icon:SetTexCoord ( (0.03125 * (self.atributo-1)) + half, (0.03125 * self.atributo) - half, 0.35693359375, 0.38720703125)
local icon_anchor = skin.icon_anchor_main
self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2])
--set the attribute icon
self.baseframe.cabecalho.atributo_icon:SetTexture (menu_icones [self.atributo])
local p = 0.125 --> 32/256
self.baseframe.cabecalho.atributo_icon:SetTexCoord (p * (self.sub_atributo-1), p * (self.sub_atributo), 0, 1)
self.baseframe.cabecalho.atributo_icon:SetSize (16, 16)
self.baseframe.cabecalho.atributo_icon:SetWidth (32)
self.baseframe.cabecalho.atributo_icon:SetHeight (32)
self.baseframe.cabecalho.atributo_icon:ClearAllPoints()
if (self.menu_attribute_string) then
self.baseframe.cabecalho.atributo_icon:SetPoint ("right", self.menu_attribute_string.widget, "left", -4, -1)
end
-- local icon_anchor = skin.icon_anchor_main
-- self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2])
-- self.baseframe.cabecalho.atributo_icon:SetWidth (32)
-- self.baseframe.cabecalho.atributo_icon:SetHeight (32)
end
elseif (self.modo == modo_raid) then --> raid
@@ -2965,13 +2987,12 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
break
end
end
if (already_exists) then
local t = _detalhes.latest_report_table [already_exists]
--push it to front
local t = tremove (_detalhes.latest_report_table, already_exists)
t [4] = amt
if (already_exists > 5) then
tremove (_detalhes.latest_report_table, already_exists)
tinsert (_detalhes.latest_report_table, 1, t)
end
tinsert (_detalhes.latest_report_table, 1, t)
else
if (self.atributo == 5) then
local custom_name = self:GetCustomObject():GetName()
@@ -2980,6 +3001,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
tinsert (_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where})
end
end
tremove (_detalhes.latest_report_table, 11)
end
+3
View File
@@ -131,6 +131,9 @@ _detalhes.instance_defaults = {
bars_sort_direction = 1,
--left to right or right to left bars
bars_inverted = false,
--toolbar icons file
--toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons_grayscale]],
toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons]],
--menus:
--anchor store the anchor point of main menu
menu_anchor = {5, 1, side = 1}, --mode segment attribute report on top position
+39 -76
View File
@@ -145,6 +145,30 @@ function _detalhes:ContainerSortMisc (container, amount, keyName2)
end
end
--[[exported]] function _detalhes:GetSpellCastAmount (combat, actorName, spellId)
local misc_actor = combat:GetActor (4, actorName)
if (misc_actor) then
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spellId]
--try to find a spell with the same name and get the amount of casts of that spell object
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo (spellId)
for casted_spellid, amount in _pairs (misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo (casted_spellid)
if (casted_spellname == spellname) then
return amount, true
end
end
end
if (not spell_cast) then
return false
end
return spell_cast
end
end
function atributo_misc:NovaTabela (serial, nome, link)
local _new_miscActor = {
@@ -1264,14 +1288,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
checked [his_target] = true
for debuffIndex = 1, 41 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
end
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
if (name and unitCaster) then
local playerGUID = _UnitGUID (unitCaster)
if (playerGUID) then
@@ -1299,14 +1316,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
checked [his_target] = true
for debuffIndex = 1, 40 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
end
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
@@ -1326,14 +1336,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local rect = UnitReaction ("playertarget", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
for debuffIndex = 1, 40 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
end
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
@@ -1353,14 +1356,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local reaction = UnitReaction ("playertarget", "player")
if (reaction and reaction <= 4) then
for debuffIndex = 1, 40 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
end
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
@@ -1405,13 +1401,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
for buffIndex = 1, 41 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (RaidIndex, buffIndex, nil, "HELPFUL")
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (RaidIndex, buffIndex, nil, "HELPFUL")
end
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (RaidIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster == RaidIndex) then
_detalhes.parser:add_buff_uptime (nil, cacheGetTime, playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, 0x0, spellid, name, in_or_out)
if (in_or_out == "BUFF_UPTIME_IN") then
@@ -1441,13 +1431,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
for buffIndex = 1, 41 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (PartyIndex, buffIndex, nil, "HELPFUL")
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (PartyIndex, buffIndex, nil, "HELPFUL")
end
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (PartyIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster == PartyIndex) then
_detalhes.parser:add_buff_uptime (nil, cacheGetTime, playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, 0x0, spellid, name, in_or_out)
@@ -1465,14 +1449,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
--> unitCaster return player instead of raidIndex
for buffIndex = 1, 41 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
end
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
@@ -1516,14 +1493,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for groupIndex = 1, _GetNumGroupMembers()-1 do
for buffIndex = 1, 41 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
end
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster == "party"..groupIndex) then
local playerName, realmName = _UnitName ("party"..groupIndex)
@@ -1549,13 +1519,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
for buffIndex = 1, 41 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
end
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
@@ -1596,13 +1560,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local focus_augmentation = {}
for buffIndex = 1, 41 do
local name, unitCaster, spellid
if (_detalhes.IsBFAClient) then --8.0 compatibility
name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
else
name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
end
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
@@ -2052,6 +2010,11 @@ end
function atributo_misc:MontaInfoInterrupt()
local meu_total = self ["interrupt"]
if (not self.interrupt_spells) then
return
end
local minha_tabela = self.interrupt_spells._ActorTable
local barras = info.barras1