mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
fix nil upon login
This commit is contained in:
+4
-1
@@ -18,6 +18,7 @@ local IsAddOnLoaded = IsAddOnLoaded
|
|||||||
local IsInInstance, GetNumPartyMembers, GetNumRaidMembers = IsInInstance, GetNumPartyMembers, GetNumRaidMembers
|
local IsInInstance, GetNumPartyMembers, GetNumRaidMembers = IsInInstance, GetNumPartyMembers, GetNumRaidMembers
|
||||||
local RequestBattlefieldScoreData = RequestBattlefieldScoreData
|
local RequestBattlefieldScoreData = RequestBattlefieldScoreData
|
||||||
local SendAddonMessage = SendAddonMessage
|
local SendAddonMessage = SendAddonMessage
|
||||||
|
local UnitFactionGroup = UnitFactionGroup
|
||||||
local NONE = NONE
|
local NONE = NONE
|
||||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ E.LSM = LSM
|
|||||||
E.noop = function() end
|
E.noop = function() end
|
||||||
E.title = format("|cff175581E|r|cffC4C4C4lvUI|r")
|
E.title = format("|cff175581E|r|cffC4C4C4lvUI|r")
|
||||||
E.myfaction, E.myLocalizedFaction = UnitFactionGroup("player")
|
E.myfaction, E.myLocalizedFaction = UnitFactionGroup("player")
|
||||||
E.myLocalizedClass, E.myclass, E.myClassID = UnitClass("player")
|
E.myLocalizedClass, E.myclass = UnitClass("player")
|
||||||
E.myLocalizedRace, E.myrace = UnitRace("player")
|
E.myLocalizedRace, E.myrace = UnitRace("player")
|
||||||
E.myname = UnitName("player")
|
E.myname = UnitName("player")
|
||||||
E.myrealm = GetRealmName()
|
E.myrealm = GetRealmName()
|
||||||
@@ -1114,6 +1115,8 @@ function E:GetTopCPUFunc(msg)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function E:Initialize()
|
function E:Initialize()
|
||||||
|
self.myfaction, self.myLocalizedFaction = UnitFactionGroup("player")
|
||||||
|
|
||||||
twipe(self.db)
|
twipe(self.db)
|
||||||
twipe(self.global)
|
twipe(self.global)
|
||||||
twipe(self.private)
|
twipe(self.private)
|
||||||
|
|||||||
@@ -284,11 +284,11 @@ function AFK:Initialize()
|
|||||||
self.AFKMode.bottom.logo = self.AFKMode:CreateTexture(nil, "OVERLAY")
|
self.AFKMode.bottom.logo = self.AFKMode:CreateTexture(nil, "OVERLAY")
|
||||||
E:Size(self.AFKMode.bottom.logo, 320, 150)
|
E:Size(self.AFKMode.bottom.logo, 320, 150)
|
||||||
E:Point(self.AFKMode.bottom.logo, "CENTER", self.AFKMode.bottom, "CENTER", 0, 50)
|
E:Point(self.AFKMode.bottom.logo, "CENTER", self.AFKMode.bottom, "CENTER", 0, 50)
|
||||||
self.AFKMode.bottom.logo:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\logo")
|
self.AFKMode.bottom.logo:SetTexture("Interface\\AddOns\\ElvUI\\Media\\Textures\\logo")
|
||||||
|
|
||||||
self.AFKMode.bottom.faction = self.AFKMode.bottom:CreateTexture(nil, "OVERLAY")
|
self.AFKMode.bottom.faction = self.AFKMode.bottom:CreateTexture(nil, "OVERLAY")
|
||||||
E:Point(self.AFKMode.bottom.faction, "BOTTOMLEFT", self.AFKMode.bottom, "BOTTOMLEFT", -20, -16)
|
E:Point(self.AFKMode.bottom.faction, "BOTTOMLEFT", self.AFKMode.bottom, "BOTTOMLEFT", -20, -16)
|
||||||
self.AFKMode.bottom.faction:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\"..E.myfaction.."-Logo")
|
self.AFKMode.bottom.faction:SetTexture("Interface\\AddOns\\ElvUI\\Media\\Textures\\"..E.myfaction.."-Logo")
|
||||||
E:Size(self.AFKMode.bottom.faction, 140)
|
E:Size(self.AFKMode.bottom.faction, 140)
|
||||||
|
|
||||||
self.AFKMode.bottom.name = self.AFKMode.bottom:CreateFontString(nil, "OVERLAY")
|
self.AFKMode.bottom.name = self.AFKMode.bottom:CreateFontString(nil, "OVERLAY")
|
||||||
|
|||||||
Reference in New Issue
Block a user