Skip to content

Commit 8f47409

Browse files
committed
Merge branch 'main' into classic-beta
2 parents ecf5214 + e68e20d commit 8f47409

File tree

6 files changed

+20
-27
lines changed

6 files changed

+20
-27
lines changed

ElvUI/Cata/Modules/DataTexts/Load_DataTexts.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
<Script file='..\..\..\Core\Modules\DataTexts\SpellHit.lua'/>
2020
<Script file='..\..\..\Core\Modules\DataTexts\SpellPower.lua'/>
2121
<Script file='..\..\..\Core\Modules\DataTexts\Spirit.lua'/>
22-
<Script file='DualSpec.lua'/>
22+
<Script file='..\..\..\Core\Modules\DataTexts\DualSpec.lua'/>
2323
</Ui>

ElvUI/Classic/Modules/DataTexts/Load_DataTexts.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
<Script file='..\..\..\Core\Modules\DataTexts\SpellHit.lua'/>
1313
<Script file='..\..\..\Core\Modules\DataTexts\SpellPower.lua'/>
1414
<Script file='..\..\..\Core\Modules\DataTexts\Spirit.lua'/>
15+
<Script file='..\..\..\Core\Modules\DataTexts\DualSpec.lua'/>
1516
</Ui>

ElvUI/Cata/Modules/DataTexts/DualSpec.lua renamed to ElvUI/Core/Modules/DataTexts/DualSpec.lua

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
local E, L, V, P, G = unpack(ElvUI)
2+
if not (E.Wrath or E.ClassicSOD) then return end
23
local DT = E:GetModule('DataTexts')
34

45
local _G = _G
@@ -20,27 +21,19 @@ local GetTalentTabInfo = GetTalentTabInfo
2021
local LoadAddOn = (C_AddOns and C_AddOns.LoadAddOn) or LoadAddOn
2122

2223
local displayString, db = ''
23-
local primaryStr, secondaryStr, activeGroup, hasDualSpec
24+
local primaryStr, secondaryStr, activeGroup, hasDualSpec = '', ''
2425

2526
local function BuildTalentString(talentGroup)
2627
local str = ''
2728

2829
for i = 1, MAX_TALENT_TABS do
29-
local _, _, _, _, pointsSpent = GetTalentTabInfo(i, false, false, talentGroup)
30-
if (str == '') then
31-
str = pointsSpent
32-
else
33-
str = strjoin('/', str, pointsSpent)
34-
end
30+
local _, _, pointsSpent = GetTalentTabInfo(i, false, false, talentGroup)
31+
str = (str == '' and pointsSpent) or strjoin('/', str, pointsSpent)
3532
end
3633

3734
return str
3835
end
3936

40-
local function ColorText(str, hex)
41-
return format('|cff%s%s|r',hex,str)
42-
end
43-
4437
local function OnEvent(self)
4538
primaryStr, secondaryStr = BuildTalentString(1), BuildTalentString(2)
4639

@@ -56,11 +49,10 @@ end
5649

5750
local function OnEnter()
5851
DT.tooltip:ClearLines()
59-
60-
DT.tooltip:AddDoubleLine(format('%s: %s', ColorText(PRIMARY, activeGroup == 1 and '0CD809' or 'FFFFFF'), primaryStr))
52+
DT.tooltip:AddLine(format('|cff%s%s:|r %s', activeGroup == 1 and '0CD809' or 'FFFFFF', PRIMARY, primaryStr), 1, 1, 1)
6153

6254
if hasDualSpec then
63-
DT.tooltip:AddDoubleLine(format('%s: %s', ColorText(SECONDARY, activeGroup == 2 and '0CD809' or 'FFFFFF'), secondaryStr))
55+
DT.tooltip:AddLine(format('|cff%s%s:|r %s', activeGroup == 2 and '0CD809' or 'FFFFFF', SECONDARY, secondaryStr), 1, 1, 1)
6456
end
6557

6658
DT.tooltip:AddLine(' ')
@@ -85,10 +77,8 @@ local function OnClick(_, button)
8577
else
8678
HideUIPanel(_G.PlayerTalentFrame)
8779
end
88-
else
89-
if hasDualSpec then
90-
SetActiveTalentGroup(activeGroup == 1 and 2 or 1)
91-
end
80+
elseif hasDualSpec then
81+
SetActiveTalentGroup(activeGroup == 1 and 2 or 1)
9282
end
9383
end
9484
end

ElvUI/Core/Modules/DataTexts/Gold.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ local CURRENCY = CURRENCY
2626

2727
local menuList, myGold = {}, {}
2828
local totalGold, totalHorde, totalAlliance = 0, 0, 0
29-
local iconString = '|T%s:16:16:0:0:64:64:4:60:4:60|t'
29+
local iconStringName = '|T%s:16:16:0:0:64:64:4:60:4:60|t %s'
3030
local db
3131

3232
local function sortFunction(a, b)
@@ -218,7 +218,7 @@ local function OnEnter()
218218
end
219219

220220
if info.quantity then
221-
DT.tooltip:AddDoubleLine(format('%s %s', format(iconString, info.iconFileID), name), BreakUpLargeNumbers(info.quantity), 1, 1, 1, 1, 1, 1)
221+
DT.tooltip:AddDoubleLine(format(iconStringName, info.iconFileID, name), BreakUpLargeNumbers(info.quantity), 1, 1, 1, 1, 1, 1)
222222
end
223223

224224
index = index + 1

ElvUI_Libraries/Core/LibRangeCheck-3.0/LibRangeCheck-3.0.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ License: MIT
4040
-- @class file
4141
-- @name LibRangeCheck-3.0
4242
local MAJOR_VERSION = "LibRangeCheck-3.0-ElvUI"
43-
local MINOR_VERSION = 15 -- real minor version: 13
43+
local MINOR_VERSION = 16 -- real minor version: 13
4444

4545
-- GLOBALS: LibStub, CreateFrame
4646

@@ -67,7 +67,7 @@ local CheckInteractDistance = CheckInteractDistance
6767
local GetInventoryItemLink = GetInventoryItemLink
6868
local GetItemInfo = GetItemInfo
6969
local GetNumSpellTabs = GetNumSpellTabs
70-
local GetSpellBookItemInfo = GetSpellBookItemInfo
70+
local GetSpellBookItemName = GetSpellBookItemName
7171
local GetSpellInfo = GetSpellInfo
7272
local GetSpellTabInfo = GetSpellTabInfo
7373
local GetTime = GetTime
@@ -134,6 +134,7 @@ local InteractLists = {
134134
}
135135

136136
local MeleeRange = 2
137+
local MatchSpellByID = {} -- specific matching to avoid incorrect index
137138
local FriendSpells, HarmSpells, ResSpells, PetSpells = {}, {}, {}, {}
138139

139140
for _, n in ipairs({ "EVOKER", "DEATHKNIGHT", "DEMONHUNTER", "DRUID", "HUNTER", "SHAMAN", "MAGE", "PALADIN", "PRIEST", "WARLOCK", "WARRIOR", "MONK", "ROGUE" }) do
@@ -197,6 +198,8 @@ if not isRetail then
197198
end
198199

199200
if isEraSOD then
201+
MatchSpellByID[401417] = true -- Regeneration (Rune): Conflicts with Racial Passive on Trolls
202+
200203
tinsert(FriendSpells.MAGE, 401417) -- Regeneration (40 yards)
201204
tinsert(FriendSpells.MAGE, 412510) -- Mass Regeneration (40 yards)
202205
end
@@ -654,15 +657,14 @@ local function getNumSpells()
654657
end
655658

656659
-- return the spellIndex of the given spell by scanning the spellbook
657-
local allowSpellType = { SPELL = true, FUTURESPELL = true }
658660
local function findSpellIdx(spellName, sid)
659661
if not spellName or spellName == "" then
660662
return nil
661663
end
662664

663665
for i = 1, getNumSpells() do
664-
local spellType, id = GetSpellBookItemInfo(i, BOOKTYPE_SPELL)
665-
if sid == id and allowSpellType[spellType] then
666+
local name, _, id = GetSpellBookItemName(i, BOOKTYPE_SPELL)
667+
if sid == id or (spellName == name and not MatchSpellByID[id]) then
666668
return i
667669
end
668670
end

ElvUI_Options/Core/UnitFrames.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ local function GetOptionsTable_GeneralGroup(updateFunc, groupName, numUnits)
976976

977977
config.args.positionsGroup = ACH:Group(L["Size and Positions"], nil, 100, nil, nil, function(info, value) E.db.unitframe.units[groupName][info[#info]] = value updateFunc(UF, groupName, numUnits) end)
978978
config.args.positionsGroup.inline = true
979-
config.args.positionsGroup.args.width = ACH:Range(L["Width"], nil, 1, { min = 40, max = 1000, step = 1 })
979+
config.args.positionsGroup.args.width = ACH:Range(L["Width"], nil, 1, { min = 15, max = 1000, step = 1 })
980980
config.args.positionsGroup.args.height = ACH:Range(L["Height"], nil, 2, { min = 5, max = 500, step = 1 })
981981

982982
if groupName == 'party' or strmatch(groupName, '^raid') then

0 commit comments

Comments
 (0)