- Added 'ShielTronic Shield' on HealthPotion & Stone display.
- Improvements done on Vanguard Plugin. - Fixed an alignment issue which was happening with few tooltips. - Fixed a problem where sometimes the addon crashes while doing a /reload during raid. - Fixed the creation of auras for weakauras from the Forge (/details forge).
This commit is contained in:
@@ -924,8 +924,12 @@
|
||||
|
||||
if (custom_object:IsScripted()) then
|
||||
if (custom_object.tooltip) then
|
||||
local func = loadstring (custom_object.tooltip)
|
||||
func (actor, instance.showing, instance)
|
||||
local func = _detalhes.custom_function_cache [instance.customName .. "Tooltip"]
|
||||
local okey, errortext = _pcall (func, actor, instance.showing, instance)
|
||||
if (not okey) then
|
||||
_detalhes:Msg ("|cFFFF9900error on custom display tooltip function|r:", errortext)
|
||||
return false
|
||||
end
|
||||
end
|
||||
else
|
||||
--> get the attribute
|
||||
@@ -1345,7 +1349,7 @@
|
||||
local AllSpells = character:GetSpellList()
|
||||
local found = false
|
||||
for spellid, spell in pairs (AllSpells) do
|
||||
if (spellid == 6262 or spellid == 156445 or spellid == 156438 or spellid == 82184) then --healthstone, reju potion, health potion, spinal healing injector
|
||||
if (spellid == 6262 or spellid == 156445 or spellid == 156438 or spellid == 82184 or spellid == 173260) then --healthstone, reju potion, health potion, spinal healing injector, shieldtronic shield
|
||||
instance_container:AddValue (character, spell.total)
|
||||
total = total + spell.total
|
||||
if (top < spell.total) then
|
||||
@@ -1398,12 +1402,19 @@
|
||||
GameCooltip:AddIcon (select (3, GetSpellInfo (82184)), 1, 1, 16, 16)
|
||||
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
|
||||
end
|
||||
|
||||
local shieldtronic = actor:GetSpell (173260)
|
||||
if (shieldtronic) then
|
||||
GameCooltip:AddLine (select (1, GetSpellInfo(173260)), _detalhes:ToK(shieldtronic.total))
|
||||
GameCooltip:AddIcon (select (3, GetSpellInfo (173260)), 1, 1, 16, 16)
|
||||
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
|
||||
end
|
||||
|
||||
--Cooltip code
|
||||
]],
|
||||
percent_script = false,
|
||||
total_script = false,
|
||||
script_version = 10,
|
||||
script_version = 12,
|
||||
}
|
||||
-- /run _detalhes:AddDefaultCustomDisplays()
|
||||
local have = false
|
||||
|
||||
@@ -597,7 +597,6 @@
|
||||
|
||||
local spellname, _, spellicon = select (1, _GetSpellInfo (from_spell))
|
||||
GameCooltip:AddLine (spellname .. " " .. Loc ["STRING_CUSTOM_ATTRIBUTE_DAMAGE"], nil, nil, headerColor, nil, 10)
|
||||
--GameCooltip:AddIcon ([[Interface\ICONS\Spell_Mage_InfernoBlast]], 1, 1, 14, 14, 0.078125, 0.921875, 0.078125, 0.921875)
|
||||
GameCooltip:AddIcon (spellicon, 1, 1, 14, 14, 0.078125, 0.921875, 0.078125, 0.921875)
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, _detalhes.tooltip_key_size_width, _detalhes.tooltip_key_size_height, 0, 1, 0, 0.640625, _detalhes.tooltip_key_overlay2)
|
||||
_detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.5)
|
||||
@@ -621,7 +620,7 @@
|
||||
GameCooltip:AddLine (" ")
|
||||
_detalhes:AddTooltipReportLineText()
|
||||
|
||||
GameCooltip:SetOption ("YSpacingMod", -1)
|
||||
GameCooltip:SetOption ("YSpacingMod", 0)
|
||||
GameCooltip:SetOwner (esta_barra)
|
||||
GameCooltip:Show()
|
||||
|
||||
@@ -3178,7 +3177,7 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
|
||||
-- t[1] = 0
|
||||
--end
|
||||
|
||||
GameCooltip:SetOption ("YSpacingMod", -1)
|
||||
GameCooltip:SetOption ("YSpacingMod", 0)
|
||||
|
||||
return true
|
||||
|
||||
|
||||
+1
-1
@@ -1202,7 +1202,7 @@
|
||||
|
||||
function _detalhes:AddTooltipReportLineText()
|
||||
GameCooltip:AddLine (Loc ["STRING_CLICK_REPORT_LINE1"], Loc ["STRING_CLICK_REPORT_LINE2"])
|
||||
GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.4)
|
||||
GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.8)
|
||||
end
|
||||
|
||||
function _detalhes:AddTooltipBackgroundStatusbar (side)
|
||||
|
||||
+2
-1
@@ -180,7 +180,8 @@
|
||||
end
|
||||
|
||||
combate_overall.segments_added =combate_overall.segments_added or {}
|
||||
tinsert (combate_overall.segments_added, {name = combate:GetCombatName (true), elapsed = combate:GetCombatTime(), clock = combate:GetDate()[1]})
|
||||
local date_start, date_end = combate:GetDate()
|
||||
tinsert (combate_overall.segments_added, {name = combate:GetCombatName (true), elapsed = combate:GetCombatTime(), clock = date_start})
|
||||
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -2657,7 +2657,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:OpenAuraPanel (data[2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = data[2], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
_detalhes:OpenAuraPanel (data[2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = data[2], spellid = data[7], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
|
||||
end
|
||||
|
||||
local dbm_timers_module = {
|
||||
|
||||
@@ -130,6 +130,11 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
Vanguard:IdentifyTanks()
|
||||
|
||||
elseif (event == "DETAILS_STARTED") then
|
||||
|
||||
Vanguard.CurrentInstance = Vanguard:GetInstance (Vanguard.instance_id)
|
||||
Vanguard.CurrentCombat = Vanguard:GetCurrentCombat()
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDRESIZE" or event == "DETAILS_INSTANCE_SIZECHANGED") then
|
||||
--Vanguard:OnResize()
|
||||
@@ -291,17 +296,18 @@ local function CreatePluginFrames (data)
|
||||
self:SetWidth (width)
|
||||
self:SetBackdropColor (unpack (Vanguard.db.tank_block_color))
|
||||
self.texture:SetTexture (SharedMedia:Fetch ("statusbar", Vanguard.db.tank_block_texture))
|
||||
|
||||
end
|
||||
|
||||
local debuff_on_enter = function (self)
|
||||
if (self.spellid) then
|
||||
self.texture:SetBlendMode ("ADD")
|
||||
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:SetSpellByID (self.spellid)
|
||||
GameTooltip:Show()
|
||||
end
|
||||
end
|
||||
local debuff_on_leave = function (self)
|
||||
self.texture:SetBlendMode ("BLEND")
|
||||
if (self.spellid) then
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
@@ -334,13 +340,14 @@ local function CreatePluginFrames (data)
|
||||
f:SetPoint ("left", Vanguard.TankBlocks [index-1], "right", 5, 0)
|
||||
end
|
||||
|
||||
f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10})
|
||||
f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
f:SetBackdropColor (unpack (Vanguard.db.tank_block_color))
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
--statusbar
|
||||
f.statusbar = CreateFrame ("statusbar", nil, f)
|
||||
f.statusbar:SetPoint ("topleft", f, "topleft", 5, -5)
|
||||
f.statusbar:SetPoint ("bottomright", f, "bottomright", -5, 5)
|
||||
f.statusbar:SetPoint ("topleft", f, "topleft", 1, -1)
|
||||
f.statusbar:SetPoint ("bottomright", f, "bottomright", -1, 1)
|
||||
f.texture = f.statusbar:CreateTexture (nil, "artwork")
|
||||
f.statusbar:SetStatusBarTexture (f.texture)
|
||||
f.statusbar:SetMinMaxValues (0, 100)
|
||||
@@ -382,40 +389,46 @@ local function CreatePluginFrames (data)
|
||||
support_frame:SetSize (24, 24)
|
||||
support_frame:SetScript ("OnMouseUp", on_click)
|
||||
|
||||
support_frame:SetScript ("OnEnter", debuff_on_enter)
|
||||
support_frame:SetScript ("OnLeave", debuff_on_leave)
|
||||
--support_frame:SetScript ("OnEnter", debuff_on_enter)
|
||||
--support_frame:SetScript ("OnLeave", debuff_on_leave)
|
||||
|
||||
local texture = support_frame:CreateTexture (nil, "overlay")
|
||||
texture:SetSize (24, 24)
|
||||
|
||||
local y = 3
|
||||
|
||||
if (i == 1) then --> left
|
||||
support_frame:SetPoint ("left", f, "left", 5, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, 5)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
texture:SetPoint ("left", f, "left", 5, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, 5)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
elseif (i == 2) then --> center
|
||||
support_frame:SetPoint ("center", f, "center", 0, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, 5)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
texture:SetPoint ("center", f, "center", 0, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, 5)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
elseif (i == 3) then --> right
|
||||
support_frame:SetPoint ("right", f, "right", -5, 0)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, 5)
|
||||
support_frame:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
texture:SetPoint ("right", f, "right", -5, 0)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, 5)
|
||||
texture:SetPoint ("bottom", f, "bottom", 0, y)
|
||||
|
||||
end
|
||||
|
||||
local dblock = CreateFrame ("cooldown", "VanguardTankBlock" .. index.. "Cooldown" .. i, support_frame, "CooldownFrameTemplate")
|
||||
dblock:SetAlpha (0.7)
|
||||
dblock:SetPoint ("topleft", texture, "topleft")
|
||||
dblock:SetPoint ("bottomright", texture, "bottomright")
|
||||
dblock:SetScript ("OnMouseUp", on_click)
|
||||
dblock.texture = texture
|
||||
|
||||
dblock:SetScript ("OnEnter", debuff_on_enter)
|
||||
dblock:SetScript ("OnLeave", debuff_on_leave)
|
||||
|
||||
local stack = dblock:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
stack:SetPoint ("bottomright", dblock, "bottomright", 8, 0)
|
||||
@@ -512,6 +525,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
Vanguard.Running = true
|
||||
VanguardFrame:RegisterEvent ("UNIT_HEALTH")
|
||||
VanguardFrame:RegisterEvent ("UNIT_HEALTH_FREQUENT")
|
||||
--Vanguard:TrackDebuffsAlreadyApplied()
|
||||
VanguardFrame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
@@ -526,6 +540,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
Vanguard.Running = false
|
||||
VanguardFrame:UnregisterEvent ("UNIT_HEALTH")
|
||||
VanguardFrame:UnregisterEvent ("UNIT_HEALTH_FREQUENT")
|
||||
VanguardFrame:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
if (Vanguard.track_incoming) then
|
||||
@@ -536,15 +551,11 @@ local function CreatePluginFrames (data)
|
||||
|
||||
function Vanguard:DebuffRefreshed (who_name, spellid)
|
||||
local tank_index = Vanguard.TankHashNames [who_name]
|
||||
--print ("On Refres tank index:", tank_index)
|
||||
if (tank_index) then
|
||||
local tframe = Vanguard.TankBlocks [tank_index]
|
||||
--print ("Tank index OKE, tframe:", tframe)
|
||||
for i = 1, 3 do
|
||||
local dblock = tframe.debuffs_blocks [i]
|
||||
if (dblock.support.spellid == spellid) then
|
||||
--print ("REFRESH OKEY!")
|
||||
|
||||
local debuff_name = GetSpellInfo (spellid)
|
||||
local _, _, icon, count, _, duration, expirationTime = _UnitDebuff (who_name, debuff_name)
|
||||
|
||||
@@ -613,6 +624,8 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
dblock.texture:SetTexture (icon)
|
||||
dblock.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
|
||||
|
||||
if (count and count > 0) then
|
||||
dblock.stack:SetText (count)
|
||||
dblock.stack_bg:Show()
|
||||
@@ -624,6 +637,7 @@ local function CreatePluginFrames (data)
|
||||
dblock:SetCooldown (GetTime(), expirationTime-GetTime(), 0, 0)
|
||||
dblock.in_use = true
|
||||
dblock.support.spellid = spellid
|
||||
dblock.spellid = spellid
|
||||
|
||||
for i = 1, 3 do
|
||||
if (not tframe.debuffs_blocks [i].in_use) then
|
||||
@@ -777,7 +791,7 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh
|
||||
|
||||
end
|
||||
|
||||
elseif (event == "UNIT_HEALTH") then
|
||||
elseif (event == "UNIT_HEALTH" or event == "UNIT_HEALTH_FREQUENT") then
|
||||
Vanguard:HealthChanged (arg1)
|
||||
|
||||
elseif (event == "ADDON_LOADED") then
|
||||
@@ -789,13 +803,13 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh
|
||||
|
||||
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
|
||||
local default_saved_table = {
|
||||
show_inc_bars = true,
|
||||
show_inc_bars = false,
|
||||
tank_block_size = 150,
|
||||
tank_block_color = {0, 0, 0, 0.8},
|
||||
tank_block_color = {0.24705882, 0.0039215, 0, 0.8},
|
||||
tank_block_texture = "Details Serenity",
|
||||
first_run = false,
|
||||
}
|
||||
|
||||
|
||||
--> Install
|
||||
function Vanguard:OnDetailsEvent() end --> dummy func to stop warnings.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user