Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kkthnx committed Dec 16, 2024
1 parent 5fd171c commit 5abb090
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions KkthnxUI/Developer/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ do
ChatFilter.blockedPatterns = {
"^%s goes into a frenzy!$",
"^%s attempts to run away in fear!$",
"^%s collapses but the broken body rises again!$",
}

-- Check if a message matches any of the blocked patterns
Expand Down
2 changes: 1 addition & 1 deletion KkthnxUI/Libraries/oUF/blizzard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local _, ns = ...
local oUF = ns.oUF

-- sourced from Blizzard_UnitFrame/TargetFrame.lua
local MAX_BOSS_FRAMES = _G.MAX_BOSS_FRAMES or 5
local MAX_BOSS_FRAMES = 8 -- blizzard can spawn more than the default 5 apparently

-- sourced from Blizzard_FrameXMLBase/Shared/Constants.lua
local MEMBERS_PER_RAID_GROUP = _G.MEMBERS_PER_RAID_GROUP or 5
Expand Down
9 changes: 8 additions & 1 deletion KkthnxUI/Libraries/oUF/elements/leaderindicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ local function Update(self, event)
-- UnitLeadsAnyGroup(unit). Inside the group formed by the dungeon finder UnitIsGroupLeader(unit) will only return
-- true for the instance leader.
local isInLFGInstance = HasLFGRestrictions()
local isLeader = UnitIsGroupLeader(unit)
local isLeader
if IsInInstance() then
isLeader = UnitIsGroupLeader(unit)
else
isLeader = UnitLeadsAnyGroup(unit)
end
if isLeader then
if isInLFGInstance then
--element:SetTexture([[Interface\LFGFrame\UI-LFG-ICON-PORTRAITROLES]])
Expand Down Expand Up @@ -98,6 +103,7 @@ local function Enable(self)
element.__owner = self
element.ForceUpdate = ForceUpdate

self:RegisterEvent("UNIT_FLAGS", Path)
self:RegisterEvent("PARTY_LEADER_CHANGED", Path, true)
self:RegisterEvent("GROUP_ROSTER_UPDATE", Path, true)

Expand All @@ -110,6 +116,7 @@ local function Disable(self)
if element then
element:Hide()

self:UnregisterEvent("UNIT_FLAGS", Path)
self:UnregisterEvent("PARTY_LEADER_CHANGED", Path)
self:UnregisterEvent("GROUP_ROSTER_UPDATE", Path)
end
Expand Down
8 changes: 7 additions & 1 deletion KkthnxUI/Libraries/oUF/elements/portrait.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ local function Update(self, event, unit)
element:SetUnit(unit)
end
else
local class = element.showClass and UnitClassBase(unit)
local class, _
if element.showClass then
-- BUG: UnitClassBase can't be trusted
-- https://github.com/Stanzilla/WoWUIBugs/issues/621
_, class = UnitClass(unit)
end

if class then
element:SetAtlas("classicon-" .. class)
else
Expand Down
3 changes: 2 additions & 1 deletion KkthnxUI/Libraries/oUF/elements/power.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ local function Update(self, event, unit)
end

local cur, max = UnitPower(unit, displayType), UnitPowerMax(unit, displayType)
element:SetMinMaxValues(min or 0, max)
min = min or 0 -- ensure we always have a minimum value to avoid errors
element:SetMinMaxValues(min, max)

if UnitIsConnected(unit) then
element:SetValue(cur)
Expand Down
2 changes: 2 additions & 0 deletions KkthnxUI/Libraries/oUF/ouf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -881,11 +881,13 @@ function oUF:SpawnNamePlates(namePrefix, nameplateCallback, nameplateCVars)
if nameplate.UnitFrame then
if nameplate.UnitFrame.WidgetContainer then
nameplate.UnitFrame.WidgetContainer:SetParent(nameplate.unitFrame)
nameplate.UnitFrame.WidgetContainer:SetIgnoreParentAlpha(true)
nameplate.unitFrame.WidgetContainer = nameplate.UnitFrame.WidgetContainer
end

if nameplate.UnitFrame.SoftTargetFrame then
nameplate.UnitFrame.SoftTargetFrame:SetParent(nameplate.unitFrame)
nameplate.UnitFrame.WidgetContainer:SetIgnoreParentAlpha(true)
nameplate.unitFrame.SoftTargetFrame = nameplate.UnitFrame.SoftTargetFrame
end
end
Expand Down
10 changes: 7 additions & 3 deletions KkthnxUI/Modules/Announcements/Elements/Interrupt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local string_format, GetInstanceInfo, C_Spell_GetSpellLink, IsActiveBattlefieldA
local AURA_TYPE_BUFF = AURA_TYPE_BUFF
local infoType = {}

local spellBlackList = {
local brokenBlackList = {
[102359] = true,
[105421] = true,
[115191] = true,
Expand Down Expand Up @@ -37,6 +37,10 @@ local spellBlackList = {
[99] = true,
}

local interruptBlackList = {
[31935] = true,
}

local function getAlertChannel()
local _, instanceType = GetInstanceInfo()
local inPartyLFG = IsPartyLFG() or C_PartyInfo.IsPartyWalkIn()
Expand Down Expand Up @@ -98,12 +102,12 @@ function Module:InterruptAlert_Update(...)
local sourceSpellID, destSpellID

if infoText == L["Broken Spell"] then
if auraType == AURA_TYPE_BUFF or spellBlackList[spellID] then
if auraType == AURA_TYPE_BUFF or brokenBlackList[spellID] then
return
end
sourceSpellID, destSpellID = extraskillID, spellID
elseif infoText == L["Interrupt"] then
if C["Announcements"].OwnInterrupt and not isPlayerOrAllyPet then
if (C["Announcements"].OwnInterrupt and not isPlayerOrAllyPet) or interruptBlackList[spellID] then
return
end
sourceSpellID, destSpellID = spellID, extraskillID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ local function HandleTimers(tracker, key)
end
end

-- tinsert(C.defaultThemes, function()
C.themes["Blizzard_ObjectiveTracker"] = function()
if C_AddOns.IsAddOnLoaded("!KalielsTracker") then
return
Expand Down
2 changes: 1 addition & 1 deletion KkthnxUI/Modules/UnitFrames/Units/Nameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function Module:SetupCVars()
nameplateOverlapH = 0.8, -- Controls the horizontal overlap of nameplates. A lower value means nameplates will be more spaced out horizontally.
nameplateSelectedAlpha = 1, -- Sets the transparency level for the selected nameplate (the one currently targeted). A value of 1 means fully opaque.
showQuestTrackingTooltips = 1, -- Enables (1) or disables (0) the display of quest-related information in tooltips.
nameplateSelectedScale = 1.1, -- Determines the scale of the selected nameplate. A value greater than 1 enlarges the nameplate.
nameplateSelectedScale = C["Nameplate"].SelectedScale, -- Determines the scale of the selected nameplate. A value greater than 1 enlarges the nameplate.
nameplateLargerScale = 1.1, -- Adjusts the scale of larger nameplates, such as for bosses or important enemies. Default is 1 (normal size).
nameplateGlobalScale = 1, -- Sets the overall scale for all nameplates. Default is 1 (normal size).
NamePlateHorizontalScale = 1,
Expand Down

0 comments on commit 5abb090

Please sign in to comment.