Skip to content

Commit

Permalink
Update GuildsTitles.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
noname08662 authored Aug 28, 2024
1 parent b09e496 commit 39e5d14
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Modules/Nameplates/GuildsTitles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local E, L, _, P = unpack(ElvUI)
local core = E:GetModule("Extras")
local mod = core:NewModule("GuildsTitles", "AceHook-3.0", "AceEvent-3.0")
local NP = E:GetModule("NamePlates")
local LSM = E.Libs.LSM

local modName = mod:GetName()
local isAwesome = C_NamePlate
Expand Down Expand Up @@ -670,7 +671,7 @@ end

local function manageTitleFrame(frame, db, unitType, addIcon)
local Title = frame.Title
Title.str:SetFont(E.LSM:Fetch("font", db.font), db.fontSize, db.fontOutline)
Title.str:SetFont(LSM:Fetch("font", db.font), db.fontSize, db.fontOutline)
Title:Height(db.fontSize)

Title:ClearAllPoints()
Expand Down Expand Up @@ -718,14 +719,14 @@ local function manageTitleFrame(frame, db, unitType, addIcon)
end

function mod:UpdateTitle(frame, unit, UnitTitle, name)
local db = E.db.Extras.nameplates[modName]

name = name and name or frame.UnitName
unit = unit and unit or name
UnitTitle = UnitTitle and UnitTitle or db.UnitTitle[name]

if not unit or not name or not UnitTitle then return end

local db = E.db.Extras.nameplates[modName]

local _, unitType = NP:GetUnitInfo(frame)
if db.Guilds.enabled and (unitType == 'FRIENDLY_PLAYER' or unitType == 'ENEMY_PLAYER') then
db = db.Guilds
Expand Down Expand Up @@ -1077,4 +1078,4 @@ function mod:InitializeCallback()
mod:Toggle()
end

core.modules[modName] = mod.InitializeCallback
core.modules[modName] = mod.InitializeCallback

0 comments on commit 39e5d14

Please sign in to comment.