- Fixed encounter time on title bar text.
This commit is contained in:
+4
-1
@@ -900,9 +900,11 @@ function _detalhes:StoreEncounter (combat)
|
||||
end
|
||||
|
||||
if (match < raid_size * 0.75) then
|
||||
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, need at least 75% of players be from your guild.")
|
||||
return
|
||||
end
|
||||
else
|
||||
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, need at least 75% of players be from your guild.")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -910,6 +912,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
if (not IsAddOnLoaded ("Details_DataStorage")) then
|
||||
local loaded, reason = LoadAddOn ("Details_DataStorage")
|
||||
if (not loaded) then
|
||||
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -1022,7 +1025,7 @@ function _detalhes:StoreEncounter (combat)
|
||||
local raid_name = GetInstanceInfo()
|
||||
local func = {_detalhes.OpenRaidHistoryWindow, _detalhes, raid_name, encounter_id, diff, my_role, guildName, 2, UnitName ("player")}
|
||||
local icon = {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}
|
||||
instance:InstanceAlert ("Boss Defeated, Open History! ", icon, 40, func)
|
||||
instance:InstanceAlert ("Boss Defeated, Open History! ", icon, 40, func, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -145,6 +145,9 @@
|
||||
end
|
||||
|
||||
-- /run local f=CreateFrame("frame");f:RegisterAllEvents();f:SetScript("OnEvent", function(self, ...)print (...);end)
|
||||
-- /run
|
||||
-- local f=CreateFrame("frame");f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");f:SetScript("OnEvent", function(self, ...) print (...) 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)
|
||||
|
||||
+20
-2
@@ -1202,6 +1202,7 @@
|
||||
|
||||
--> select player:
|
||||
local on_player2_select = function (_, _, player)
|
||||
f.latest_player_selected = player
|
||||
f:BuildPlayerTable (player)
|
||||
end
|
||||
local build_player2_list = function()
|
||||
@@ -1332,7 +1333,7 @@
|
||||
local player = roleTable [playerName]
|
||||
|
||||
if (player) then
|
||||
tinsert (data, {text = date, value = player[1], data = player, fulldate = encounter.date})
|
||||
tinsert (data, {text = date, value = player[1], data = player, fulldate = encounter.date, elapsed = encounter.elapsed})
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1346,10 +1347,23 @@
|
||||
|
||||
local onenter = function (self)
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:SetType ("tooltip")
|
||||
|
||||
GameCooltip:SetOption ("TextSize", _detalhes.tooltip.fontsize)
|
||||
GameCooltip:SetOption ("TextFont", _detalhes.tooltip.fontface)
|
||||
GameCooltip:SetOption ("TextColor", _detalhes.tooltip.fontcolor)
|
||||
GameCooltip:SetOption ("TextColorRight", _detalhes.tooltip.fontcolor_right)
|
||||
GameCooltip:SetOption ("TextShadow", _detalhes.tooltip.fontshadow and "OUTLINE")
|
||||
|
||||
GameCooltip:SetOption ("LeftBorderSize", -5)
|
||||
GameCooltip:SetOption ("RightBorderSize", 5)
|
||||
GameCooltip:SetOption ("MinWidth", 175)
|
||||
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]])
|
||||
|
||||
GameCooltip:AddLine ("Total Done:", _detalhes:ToK2 (self.data.value))
|
||||
GameCooltip:AddLine ("Dps:", _detalhes:ToK2 (self.data.value / self.data.elapsed))
|
||||
GameCooltip:AddLine ("Item Level:", floor (self.data.data [2]))
|
||||
GameCooltip:AddLine ("Date:", self.data.fulldate)
|
||||
GameCooltip:AddLine ("Date:", self.data.fulldate:gsub (".*%s", ""))
|
||||
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true)
|
||||
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, cooltip_block_bg, _detalhes.tooltip_border_color)
|
||||
@@ -1467,11 +1481,15 @@
|
||||
player2_dropdown:Show()
|
||||
f.build_player2_data = {encounters, guild, role}
|
||||
player2_dropdown:Refresh()
|
||||
|
||||
player_name = f.latest_player_selected or player_name
|
||||
|
||||
if (player_name) then
|
||||
player2_dropdown:Select (player_name)
|
||||
else
|
||||
player2_dropdown:Select (1, true)
|
||||
end
|
||||
|
||||
f:BuildPlayerTable (player2_dropdown.value)
|
||||
end
|
||||
else
|
||||
|
||||
+1
-1
@@ -1073,7 +1073,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
if (instance) then
|
||||
local func = {_detalhes.OpenRaidHistoryWindow, _detalhes, "Hellfire Citadel", 1800, 15, "DAMAGER", "Rock Lobster", 2, "Keyspell"}
|
||||
instance:InstanceAlert ("Boss Defeated, Open History! ", {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}, 40, func)
|
||||
instance:InstanceAlert ("Boss Defeated, Open History! ", {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}, 40, func, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -2904,7 +2904,7 @@ local hide_click_func = function()
|
||||
--empty
|
||||
end
|
||||
|
||||
function _detalhes:InstanceAlert (msg, icon, time, clickfunc)
|
||||
function _detalhes:InstanceAlert (msg, icon, time, clickfunc, doflash)
|
||||
|
||||
if (not self.meu_id) then
|
||||
local lower = _detalhes:GetLowerInstanceNumber()
|
||||
@@ -2971,8 +2971,17 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc)
|
||||
self.alert:SetPoint ("left", self.baseframe, "left", 3, 0)
|
||||
self.alert:SetPoint ("right", self.baseframe, "right", -3, 0)
|
||||
|
||||
self.alert:SetFrameStrata ("TOOLTIP")
|
||||
self.alert.button:SetFrameStrata ("TOOLTIP")
|
||||
|
||||
self.alert:Show()
|
||||
|
||||
if (doflash) then
|
||||
self.alert:DoFlash()
|
||||
end
|
||||
|
||||
self.alert:Play()
|
||||
|
||||
end
|
||||
|
||||
local alert_on_click = function (self, button)
|
||||
@@ -2985,7 +2994,7 @@ local alert_on_click = function (self, button)
|
||||
self:GetParent():Hide()
|
||||
end
|
||||
|
||||
function CreateAlertFrame (baseframe, instancia)
|
||||
local function CreateAlertFrame (baseframe, instancia)
|
||||
|
||||
local frame_upper = CreateFrame ("scrollframe", "DetailsAlertFrameScroll" .. instancia.meu_id, baseframe)
|
||||
frame_upper:SetPoint ("bottom", baseframe, "bottom")
|
||||
@@ -3024,7 +3033,7 @@ function CreateAlertFrame (baseframe, instancia)
|
||||
local text = alert_bg:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
text:SetPoint ("right", alert_bg, "right", -14, 0)
|
||||
_detalhes:SetFontSize (text, 10)
|
||||
text:SetTextColor (1, 1, 1, 1)
|
||||
text:SetTextColor (1, 1, 1, 0.8)
|
||||
|
||||
local rotate_frame = CreateFrame ("frame", "DetailsAlertFrameRotate" .. instancia.meu_id, alert_bg)
|
||||
rotate_frame:SetWidth (12)
|
||||
@@ -3044,8 +3053,6 @@ function CreateAlertFrame (baseframe, instancia)
|
||||
button._instance = instancia
|
||||
button.func_param = {}
|
||||
|
||||
--local button = gump:NewButton (alert_bg, nil, "DetailsInstance"..instancia.meu_id.."AlertButton", nil, 1, 1)
|
||||
|
||||
local RotateAnimGroup = rotate_frame:CreateAnimationGroup()
|
||||
local rotate = RotateAnimGroup:CreateAnimation ("Rotation")
|
||||
rotate:SetDegrees (360)
|
||||
@@ -3057,7 +3064,6 @@ function CreateAlertFrame (baseframe, instancia)
|
||||
local anime = alert_bg:CreateAnimationGroup()
|
||||
anime.group = anime:CreateAnimation ("Translation")
|
||||
anime.group:SetDuration (0.15)
|
||||
--anime.group:SetSmoothing ("OUT")
|
||||
anime.group:SetOffset (0, 10)
|
||||
anime:SetScript ("OnFinished", function(self)
|
||||
alert_bg:Show()
|
||||
@@ -3066,10 +3072,50 @@ function CreateAlertFrame (baseframe, instancia)
|
||||
alert_bg:SetPoint ("right", baseframe, "right", -3, 0)
|
||||
end)
|
||||
|
||||
local on_enter_alert = function (self)
|
||||
text:SetTextColor (1, 0.8, 0.3, 1)
|
||||
icon:SetBlendMode ("ADD")
|
||||
end
|
||||
local on_leave_alert = function (self)
|
||||
text:SetTextColor (1, 1, 1, 0.8)
|
||||
icon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
button:SetScript ("OnEnter", on_enter_alert)
|
||||
button:SetScript ("OnLeave", on_leave_alert)
|
||||
|
||||
function alert_bg:Play()
|
||||
anime:Play()
|
||||
end
|
||||
|
||||
local flash_texture = button:CreateTexture (nil, "overlay")
|
||||
flash_texture:SetTexCoord (53/512, 347/512, 58/256, 120/256)
|
||||
flash_texture:SetTexture ([[Interface\AchievementFrame\UI-Achievement-Alert-Glow]])
|
||||
flash_texture:SetAllPoints()
|
||||
flash_texture:SetBlendMode ("ADD")
|
||||
local animation = flash_texture:CreateAnimationGroup()
|
||||
local anim1 = animation:CreateAnimation ("ALPHA")
|
||||
local anim2 = animation:CreateAnimation ("ALPHA")
|
||||
anim1:SetOrder (1)
|
||||
anim1:SetChange (1)
|
||||
anim1:SetDuration (0.1)
|
||||
anim2:SetOrder (2)
|
||||
anim2:SetChange (-1)
|
||||
anim2:SetDuration (0.2)
|
||||
animation:SetScript ("OnFinished", function (self)
|
||||
flash_texture:Hide()
|
||||
end)
|
||||
flash_texture:Hide()
|
||||
|
||||
local do_flash = function()
|
||||
flash_texture:Show()
|
||||
animation:Play()
|
||||
end
|
||||
|
||||
function alert_bg:DoFlash()
|
||||
C_Timer.After (0.23, do_flash)
|
||||
end
|
||||
|
||||
alert_bg.text = text
|
||||
alert_bg.icon = icon
|
||||
alert_bg.button = button
|
||||
@@ -6517,8 +6563,7 @@ end
|
||||
|
||||
function _detalhes:CheckForTextTimeCounter (combat_start)
|
||||
if (combat_start) then
|
||||
local combat = _detalhes.tabela_vigente
|
||||
if (combat.is_boss) then
|
||||
if (_detalhes.tabela_vigente.is_boss) then
|
||||
local lower = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower) then
|
||||
local instance = _detalhes:GetInstance (lower)
|
||||
@@ -6533,6 +6578,10 @@ function _detalhes:CheckForTextTimeCounter (combat_start)
|
||||
else
|
||||
return
|
||||
end
|
||||
else
|
||||
if (_detalhes.in_combat and _detalhes.zone_type == "raid") then
|
||||
_detalhes:ScheduleTimer ("CheckForTextTimeCounter", 3, true)
|
||||
end
|
||||
end
|
||||
else
|
||||
for _, instance in ipairs (_detalhes.tabela_instancias) do
|
||||
|
||||
+3
-1
@@ -61,12 +61,14 @@ do
|
||||
frame.star = frame:CreateTexture (nil, "overlay")
|
||||
frame.star:SetTexture ([[Interface\Glues\CharacterSelect\Glues-AddOn-Icons]])
|
||||
frame.star:SetTexCoord (0.75, 1, 0, 1)
|
||||
frame.star:SetVertexColor (1, 0.8, 0.6)
|
||||
frame.star:SetSize (16, 16)
|
||||
frame.star:SetPoint ("bottomleft", frame, "topleft", 4, 1)
|
||||
|
||||
frame.title_label = frame:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
frame.title_label:SetPoint ("left", frame.star, "right", 4, 0)
|
||||
frame.title_label:SetText ("Bookmark")
|
||||
frame.title_label:SetTextColor (1, 0.8, 0.4)
|
||||
frame.title_label:SetText (Loc ["STRING_KEYBIND_BOOKMARK"])
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user