Bug fixes on default plugins
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -212,6 +212,7 @@ local CreatePluginFrames = function()
|
||||
{text = "Food", width = 45},
|
||||
{text = "Flask", width = 45},
|
||||
{text = "Rune", width = 45},
|
||||
{text = "M+ Score", width = 60},
|
||||
--{text = "Pre-Pot Last Try", width = 100},
|
||||
--{text = "Using Details!", width = 100},
|
||||
}
|
||||
@@ -294,6 +295,9 @@ local CreatePluginFrames = function()
|
||||
--no rune
|
||||
local runeIndicator = DF:CreateImage(line, "", scrollLineHeight, scrollLineHeight)
|
||||
|
||||
--mythic+
|
||||
local mythicPlusIndicator = DF:CreateLabel(line)
|
||||
|
||||
--no pre pot
|
||||
--local PrePotIndicator = DF:CreateImage (line, "", scroll_line_height, scroll_line_height)
|
||||
--using details!
|
||||
@@ -306,6 +310,7 @@ local CreatePluginFrames = function()
|
||||
line:AddFrameToHeaderAlignment(foodIndicator)
|
||||
line:AddFrameToHeaderAlignment(flaskIndicator)
|
||||
line:AddFrameToHeaderAlignment(runeIndicator)
|
||||
line:AddFrameToHeaderAlignment(mythicPlusIndicator)
|
||||
--line:AddFrameToHeaderAlignment(PrePotIndicator)
|
||||
--line:AddFrameToHeaderAlignment(DetailsIndicator)
|
||||
|
||||
@@ -323,6 +328,7 @@ local CreatePluginFrames = function()
|
||||
line.FlaskIndicator = flaskIndicator
|
||||
line.FlaskTierIndicator = flaskTierIndicator
|
||||
line.RuneIndicator = runeIndicator
|
||||
line.MythicPlusIndicator = mythicPlusIndicator
|
||||
--line.PrePotIndicator = PrePotIndicator
|
||||
--line.DetailsIndicator = DetailsIndicator
|
||||
|
||||
@@ -407,8 +413,6 @@ local CreatePluginFrames = function()
|
||||
|
||||
line.TalentsRow:ClearIcons()
|
||||
|
||||
--print("dssd", playerTable.Talents)
|
||||
|
||||
if (playerTable.Talents) then
|
||||
for i = 1, #playerTable.Talents do
|
||||
local talent = playerTable.Talents[i]
|
||||
@@ -454,6 +458,9 @@ local CreatePluginFrames = function()
|
||||
line.RuneIndicator.texture = playerTable.Rune and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
--line.PrePotIndicator.texture = playerTable.PrePot and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
--line.DetailsIndicator.texture = playerTable.UseDetails and [[Interface\Scenarios\ScenarioIcon-Check]] or ""
|
||||
|
||||
--mythic+ score
|
||||
line.MythicPlusIndicator.text = playerTable.MythicPlusScore and playerTable.MythicPlusScore > 0 and playerTable.MythicPlusScore or ""
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -638,6 +645,26 @@ local CreatePluginFrames = function()
|
||||
end
|
||||
end
|
||||
|
||||
local mythicPlusScore = 0
|
||||
local RaiderIO = _G.RaiderIO
|
||||
|
||||
if (RaiderIO) then
|
||||
local playerName, playerRealm = unitNameWithRealm:match("(.+)%-(.+)")
|
||||
local faction = UnitFactionGroup(unitNameWithRealm)
|
||||
faction = faction == "Horde" and 2 or 1
|
||||
|
||||
--local rioProfile = RaiderIO.GetProfile(playerName, playerRealm, faction == "Horde" and 2 or 1)
|
||||
local rioProfile = RaiderIO.GetProfile(playerName, playerRealm) or RaiderIO.GetProfile(unitName, GetRealmName())
|
||||
|
||||
if (rioProfile and rioProfile.mythicKeystoneProfile) then
|
||||
local mythicPlusProfile = rioProfile.mythicKeystoneProfile
|
||||
local previousScore = mythicPlusProfile.previousScore or 0
|
||||
local currentScore = mythicPlusProfile.currentScore or 0
|
||||
mythicPlusScore = previousScore and previousScore > currentScore and previousScore or currentScore
|
||||
mythicPlusScore = mythicPlusScore or currentScore
|
||||
end
|
||||
end
|
||||
|
||||
--order by class > alphabetically by the unit name
|
||||
unitClassID = (((unitClassID or 0) + 128) ^ 4) + tonumber(string.byte (unitName, 1) .. "" .. string.byte(unitName, 2))
|
||||
|
||||
@@ -656,6 +683,7 @@ local CreatePluginFrames = function()
|
||||
Rune = DetailsRaidCheck.havefocusaug_table[unitSerial],
|
||||
Eating = DetailsRaidCheck.iseating_table[unitSerial],
|
||||
UseDetails = Details.trusted_characters[unitSerial],
|
||||
MythicPlusScore = mythicPlusScore,
|
||||
})
|
||||
end
|
||||
|
||||
@@ -683,6 +711,20 @@ local CreatePluginFrames = function()
|
||||
end
|
||||
end
|
||||
|
||||
local mythicPlusScore = 0
|
||||
local RaiderIO = _G.RaiderIO
|
||||
|
||||
if (RaiderIO) then
|
||||
local rioProfile = RaiderIO.GetProfile(unitName, GetRealmName())
|
||||
if (rioProfile and rioProfile.mythicKeystoneProfile) then
|
||||
local mythicPlusProfile = rioProfile.mythicKeystoneProfile
|
||||
local previousScore = mythicPlusProfile.previousScore or 0
|
||||
local currentScore = mythicPlusProfile.currentScore or 0
|
||||
mythicPlusScore = previousScore and previousScore > currentScore and previousScore or currentScore
|
||||
mythicPlusScore = mythicPlusScore or currentScore
|
||||
end
|
||||
end
|
||||
|
||||
tinsert (PlayerData, {unitName, unitClassID,
|
||||
Name = unitName,
|
||||
UnitNameRealm = unitNameWithRealm,
|
||||
@@ -698,6 +740,7 @@ local CreatePluginFrames = function()
|
||||
Rune = DetailsRaidCheck.havefocusaug_table[unitSerial],
|
||||
Eating = DetailsRaidCheck.iseating_table[unitSerial],
|
||||
UseDetails = Details.trusted_characters[unitSerial],
|
||||
MythicPlusScore = mythicPlusScore,
|
||||
})
|
||||
end
|
||||
|
||||
@@ -795,7 +838,7 @@ local CreatePluginFrames = function()
|
||||
local unitSerial = UnitGUID(unitId)
|
||||
|
||||
local function handleAuraBuff(aura)
|
||||
local auraInfo = C_UnitAuras.GetAuraDataByAuraInstanceID("player", aura.auraInstanceID)
|
||||
local auraInfo = C_UnitAuras.GetAuraDataByAuraInstanceID(unitId, aura.auraInstanceID)
|
||||
if (auraInfo) then
|
||||
local buffName = auraInfo.name
|
||||
local spellId = auraInfo.spellId
|
||||
|
||||
@@ -2411,7 +2411,7 @@ function StreamOverlay:OnEvent (_, event, ...)
|
||||
update_speed = 0.05,
|
||||
},
|
||||
|
||||
is_first_run = true,
|
||||
is_first_run = false,
|
||||
}
|
||||
|
||||
StreamOverlay.DefaultConfigTable = default_options_table
|
||||
@@ -2428,76 +2428,7 @@ function StreamOverlay:OnEvent (_, event, ...)
|
||||
|
||||
StreamOverlay:SetPluginDescription ("Show in real time the spells you are casting.\n\nThe viewer can now follow what you are doing, what spells you are casting, learn your rotation.\n\nAlso tells who is the target and its class/spec on raiding or role if you are in arena.\n\nWhen you die, the panel is filled with your death log.")
|
||||
|
||||
if (StreamOverlay.db.is_first_run) then --problem with setting the plugin as disabled
|
||||
if (Details:GetTutorialCVar ("STREAMER_PLUGIN_FIRSTRUN")) then
|
||||
Details:DisablePlugin ("DETAILS_PLUGIN_STREAM_OVERLAY")
|
||||
StreamOverlay.db.is_first_run = false
|
||||
else
|
||||
Details:DisablePlugin ("DETAILS_PLUGIN_STREAM_OVERLAY")
|
||||
end
|
||||
end
|
||||
|
||||
if (StreamOverlay.db.is_first_run and not Details:GetTutorialCVar ("STREAMER_PLUGIN_FIRSTRUN")) then
|
||||
local show_frame = function()
|
||||
|
||||
if ((DetailsWelcomeWindow and DetailsWelcomeWindow:IsShown()) or not StreamOverlay.db.is_first_run) then
|
||||
return
|
||||
end
|
||||
|
||||
StreamOverlay.ShowWelcomeFrame:Cancel()
|
||||
|
||||
local welcomeWindow = CreateFrame ("frame", "StreamOverlayWelcomeWindow", UIParent, "BackdropTemplate")
|
||||
welcomeWindow:SetPoint ("center", UIParent, "center")
|
||||
welcomeWindow:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
welcomeWindow:SetBackdropColor (0, 0, 0, 0.5)
|
||||
welcomeWindow:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
welcomeWindow:SetSize (740, 270)
|
||||
DetailsFramework:ApplyStandardBackdrop(welcomeWindow)
|
||||
|
||||
local icon = welcomeWindow:CreateTexture (nil, "overlay")
|
||||
icon:SetTexture ([[Interface\MINIMAP\MOVIERECORDINGICON]])
|
||||
local title = welcomeWindow:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
title:SetText ("Details!: Action Tracker (plugin)")
|
||||
StreamOverlay:SetFontSize (title, 20)
|
||||
|
||||
local youtubeTwitchIcons = welcomeWindow:CreateTexture(nil, "overlay")
|
||||
youtubeTwitchIcons:SetTexture([[Interface\AddOns\Details\images\icons2]])
|
||||
youtubeTwitchIcons:SetTexCoord(0, 109/512, 370/512, 413/512)
|
||||
youtubeTwitchIcons:SetSize(109, 413 - 370)
|
||||
youtubeTwitchIcons:SetPoint("topleft", welcomeWindow, "topleft", 123, -61)
|
||||
|
||||
local text1 = welcomeWindow:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
text1:SetText ("SHOW TO YOUR VIEWERS YOUR ROTATION\nThis way they can learn while watching your content")
|
||||
local text2 = welcomeWindow:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
text2:SetText ("Use the command:")
|
||||
local text3 = welcomeWindow:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
text3:SetText ("/streamer")
|
||||
DetailsFramework:SetFontSize(text3, 16)
|
||||
|
||||
icon:SetPoint ("topleft", welcomeWindow, "topleft", 10, -20)
|
||||
title:SetPoint ("left", icon, "right", 10, 0)
|
||||
|
||||
text1:SetPoint ("topleft", welcomeWindow, "topleft", 10, -120)
|
||||
text2:SetPoint ("center", text1, "center", 0, -40)
|
||||
text3:SetPoint ("center", text2, "center", 0, -16)
|
||||
|
||||
local image1 = welcomeWindow:CreateTexture(nil, "overlay")
|
||||
image1:SetTexture([[Interface\AddOns\Details_Streamer\streamer_plugin_lines]])
|
||||
image1:SetPoint("topleft", welcomeWindow, "topleft", 410, -6)
|
||||
image1:SetSize(512, 256)
|
||||
|
||||
local close_func = function()
|
||||
StreamOverlay.db.is_first_run = false
|
||||
Details:SetTutorialCVar ("STREAMER_PLUGIN_FIRSTRUN", true)
|
||||
welcomeWindow:Hide()
|
||||
end
|
||||
|
||||
local close = Details.gump:CreateButton (welcomeWindow, close_func, 120, 20, "Okay", nil, nil, nil, nil, nil, nil, Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
close:SetPoint ("center", text3, "center", 0, -50)
|
||||
end
|
||||
|
||||
--StreamOverlay.ShowWelcomeFrame = C_Timer.NewTicker (5, show_frame)
|
||||
end
|
||||
StreamOverlay.db.is_first_run = false
|
||||
|
||||
--wipe (StreamOverlay.db)
|
||||
SOF:RegisterEvent ("PLAYER_LOGOUT")
|
||||
|
||||
Reference in New Issue
Block a user