Skip to content

Commit

Permalink
Fixed Streamer plugin bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Aug 19, 2024
1 parent 9403ef1 commit 89bf3a5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
local addonName, Details222 = ...
local version, build, date, tvs = GetBuildInfo()

Details.build_counter = 12878
Details.alpha_build_counter = 12878 --if this is higher than the regular counter, use it instead
Details.build_counter = 12879
Details.alpha_build_counter = 12879 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Expand Down
13 changes: 9 additions & 4 deletions plugins/Details_Compare2/Details_Compare2.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@

do
local _
local Details = Details

if (not Details) then
print("Details! Not Found.")
return
end

---@type detailsframework
local detailsFramework = DetailsFramework

local CONST_COMPARETYPE_SPEC = 1
local CONST_COMPARETYPE_SEGMENT = 2

Expand Down Expand Up @@ -150,9 +155,6 @@ do
--> create a plugin object
local compareTwo = Details:NewPluginObject("Details_Compare2", _G.DETAILSPLUGIN_ALWAYSENABLED)

---@type detailsframework
local detailsFramework = DetailsFramework

--> set the description
compareTwo:SetPluginDescription("Replaces the default comparison window on the player breakdown.")

Expand Down Expand Up @@ -1932,12 +1934,15 @@ do
newComparisonFrame.titleIcon = detailsFramework:CreateTexture(newComparisonFrame)
newComparisonFrame.titleIcon:SetPoint("topleft", newComparisonFrame, "topleft", 0, comparisonFrameSettings.playerNameYOffset)

--player name shown above the scrolls
--player name or segment name shown above the scrolls
---@type df_label
newComparisonFrame.titleLabel = detailsFramework:CreateLabel(newComparisonFrame, "")
newComparisonFrame.titleLabel:SetPoint("left", newComparisonFrame.titleIcon, "right", 2, 0)
newComparisonFrame.titleLabel.fontsize = comparisonFrameSettings.playerNameSize

--combat selector dropdown
--todo: create a dropdown to select the combat

--grandient texture above the comparison frame
local gradientTitle = detailsFramework:CreateTexture(newComparisonFrame, {gradient = "vertical", fromColor = {0, 0, 0, 0.25}, toColor = "transparent"}, 1, 16, "artwork", {0, 1, 0, 1})
gradientTitle:SetPoint("bottomleft", newComparisonFrame, "topleft", 0, 0)
Expand Down
11 changes: 11 additions & 0 deletions plugins/Details_Streamer/Details_Streamer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ local iconSize = 16
--default icon for an attack on a monster
local defaultAttackIcon = [[Interface\CURSOR\UnableAttack]]

local GetSpellInfo = GetSpellInfo

if (C_Spell and C_Spell.GetSpellInfo) then
GetSpellInfo = function(spellId)
local spellInfo = C_Spell.GetSpellInfo(spellId)
if (spellInfo) then
return spellInfo.name, _, spellInfo.iconID
end
end
end

local function CreatePluginFrames()
--shortcut for details fade function
local fader = Details.FadeHandler.Fader
Expand Down

0 comments on commit 89bf3a5

Please sign in to comment.