Skip to content

Commit f2d6d15

Browse files
committed
Merge branch 'main' into classic-beta
2 parents a7dc567 + 18b599c commit f2d6d15

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

ElvUI/Core/General/Core.lua

+8-10
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ local LSM = E.Libs.LSM
6262
E.noop = function() end
6363
E.title = format('%s%s|r', E.InfoColor, 'ElvUI')
6464
E.toc = tonumber(GetAddOnMetadata('ElvUI', 'X-Interface'))
65-
E.version, E.versionString = E:ParseVersionString('ElvUI')
65+
E.version, E.versionString, E.versionDev, E.versionGit = E:ParseVersionString('ElvUI')
6666
E.myfaction, E.myLocalizedFaction = UnitFactionGroup('player')
6767
E.myLocalizedClass, E.myclass, E.myClassID = UnitClass('player')
6868
E.myLocalizedRace, E.myrace, E.myRaceID = UnitRace('player')
@@ -900,14 +900,12 @@ end
900900
do
901901
local SendMessageWaiting -- only allow 1 delay at a time regardless of eventing
902902
function E:SendMessage()
903-
if E.version < 99999 then
904-
if IsInRaid() then
905-
C_ChatInfo_SendAddonMessage('ELVUI_VERSIONCHK', E.version, (not IsInRaid(LE_PARTY_CATEGORY_HOME) and IsInRaid(LE_PARTY_CATEGORY_INSTANCE)) and 'INSTANCE_CHAT' or 'RAID')
906-
elseif IsInGroup() then
907-
C_ChatInfo_SendAddonMessage('ELVUI_VERSIONCHK', E.version, (not IsInGroup(LE_PARTY_CATEGORY_HOME) and IsInGroup(LE_PARTY_CATEGORY_INSTANCE)) and 'INSTANCE_CHAT' or 'PARTY')
908-
elseif IsInGuild() then
909-
C_ChatInfo_SendAddonMessage('ELVUI_VERSIONCHK', E.version, 'GUILD')
910-
end
903+
if IsInRaid() then
904+
C_ChatInfo_SendAddonMessage('ELVUI_VERSIONCHK', E.version, (not IsInRaid(LE_PARTY_CATEGORY_HOME) and IsInRaid(LE_PARTY_CATEGORY_INSTANCE)) and 'INSTANCE_CHAT' or 'RAID')
905+
elseif IsInGroup() then
906+
C_ChatInfo_SendAddonMessage('ELVUI_VERSIONCHK', E.version, (not IsInGroup(LE_PARTY_CATEGORY_HOME) and IsInGroup(LE_PARTY_CATEGORY_INSTANCE)) and 'INSTANCE_CHAT' or 'PARTY')
907+
elseif IsInGuild() then
908+
C_ChatInfo_SendAddonMessage('ELVUI_VERSIONCHK', E.version, 'GUILD')
911909
end
912910

913911
SendMessageWaiting = nil
@@ -957,10 +955,10 @@ do
957955
_G.C_ChatInfo.RegisterAddonMessagePrefix('ELVUI_VERSIONCHK')
958956

959957
local f = CreateFrame('Frame')
958+
f:SetScript('OnEvent', SendRecieve)
960959
f:RegisterEvent('CHAT_MSG_ADDON')
961960
f:RegisterEvent('GROUP_ROSTER_UPDATE')
962961
f:RegisterEvent('PLAYER_ENTERING_WORLD')
963-
f:SetScript('OnEvent', SendRecieve)
964962
end
965963

966964
function E:UpdateStart(skipCallback, skipUpdateDB)

ElvUI/Core/General/Tags.lua

+1
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,7 @@ do
12121212
if highestVersion < userVersion then
12131213
highestVersion = userVersion
12141214
end
1215+
12151216
return (userVersion < highestVersion) and '|cffFF3333E|r' or '|cff3366ffE|r'
12161217
end
12171218
end

ElvUI/Core/init.lua

+8-9
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
]]
66

77
local _G = _G
8-
local gsub, tinsert, next = gsub, tinsert, next
9-
local tostring, strfind, type, strsub = tostring, strfind, type, strsub
8+
local gsub, tinsert, next, type = gsub, tinsert, next, type
9+
local tostring, tonumber, strfind, strmatch = tostring, tonumber, strfind, strmatch
1010

1111
local CreateFrame = CreateFrame
1212
local GetBuildInfo = GetBuildInfo
@@ -115,13 +115,12 @@ do -- this is different from E.locale because we need to convert for ace locale
115115
end
116116

117117
function E:ParseVersionString(addon)
118-
local version = strsub(GetAddOnMetadata(addon, 'Version'), 2)
119-
if not strfind(version, '%-') then
120-
return tonumber(version), version
121-
elseif strfind(version, 'project%-version') then
122-
return 99999, 'Development'
118+
local version = GetAddOnMetadata(addon, 'Version')
119+
if strfind(version, 'project%-version') then
120+
return 13.60, '13.60-git', nil, true
123121
else
124-
return 99999, version
122+
local release, extra = strmatch(version, '^v?([%d.]+)(.*)')
123+
return tonumber(release), release..extra, extra ~= ''
125124
end
126125
end
127126

@@ -352,4 +351,4 @@ function E:OnInitialize()
352351
elseif GetAddOnEnableState(E.myname, 'Tukui') == 2 then
353352
E:StaticPopup_Show('TUKUI_ELVUI_INCOMPATIBLE')
354353
end
355-
end
354+
end

0 commit comments

Comments
 (0)