Skip to content

Commit

Permalink
Merge branch 'main' into classic-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Apr 8, 2024
2 parents ecf5214 + e68e20d commit 8f47409
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ElvUI/Cata/Modules/DataTexts/Load_DataTexts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
<Script file='..\..\..\Core\Modules\DataTexts\SpellHit.lua'/>
<Script file='..\..\..\Core\Modules\DataTexts\SpellPower.lua'/>
<Script file='..\..\..\Core\Modules\DataTexts\Spirit.lua'/>
<Script file='DualSpec.lua'/>
<Script file='..\..\..\Core\Modules\DataTexts\DualSpec.lua'/>
</Ui>
1 change: 1 addition & 0 deletions ElvUI/Classic/Modules/DataTexts/Load_DataTexts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
<Script file='..\..\..\Core\Modules\DataTexts\SpellHit.lua'/>
<Script file='..\..\..\Core\Modules\DataTexts\SpellPower.lua'/>
<Script file='..\..\..\Core\Modules\DataTexts\Spirit.lua'/>
<Script file='..\..\..\Core\Modules\DataTexts\DualSpec.lua'/>
</Ui>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local E, L, V, P, G = unpack(ElvUI)
if not (E.Wrath or E.ClassicSOD) then return end
local DT = E:GetModule('DataTexts')

local _G = _G
Expand All @@ -20,27 +21,19 @@ local GetTalentTabInfo = GetTalentTabInfo
local LoadAddOn = (C_AddOns and C_AddOns.LoadAddOn) or LoadAddOn

local displayString, db = ''
local primaryStr, secondaryStr, activeGroup, hasDualSpec
local primaryStr, secondaryStr, activeGroup, hasDualSpec = '', ''

local function BuildTalentString(talentGroup)
local str = ''

for i = 1, MAX_TALENT_TABS do
local _, _, _, _, pointsSpent = GetTalentTabInfo(i, false, false, talentGroup)
if (str == '') then
str = pointsSpent
else
str = strjoin('/', str, pointsSpent)
end
local _, _, pointsSpent = GetTalentTabInfo(i, false, false, talentGroup)
str = (str == '' and pointsSpent) or strjoin('/', str, pointsSpent)
end

return str
end

local function ColorText(str, hex)
return format('|cff%s%s|r',hex,str)
end

local function OnEvent(self)
primaryStr, secondaryStr = BuildTalentString(1), BuildTalentString(2)

Expand All @@ -56,11 +49,10 @@ end

local function OnEnter()
DT.tooltip:ClearLines()

DT.tooltip:AddDoubleLine(format('%s: %s', ColorText(PRIMARY, activeGroup == 1 and '0CD809' or 'FFFFFF'), primaryStr))
DT.tooltip:AddLine(format('|cff%s%s:|r %s', activeGroup == 1 and '0CD809' or 'FFFFFF', PRIMARY, primaryStr), 1, 1, 1)

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

DT.tooltip:AddLine(' ')
Expand All @@ -85,10 +77,8 @@ local function OnClick(_, button)
else
HideUIPanel(_G.PlayerTalentFrame)
end
else
if hasDualSpec then
SetActiveTalentGroup(activeGroup == 1 and 2 or 1)
end
elseif hasDualSpec then
SetActiveTalentGroup(activeGroup == 1 and 2 or 1)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions ElvUI/Core/Modules/DataTexts/Gold.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local CURRENCY = CURRENCY

local menuList, myGold = {}, {}
local totalGold, totalHorde, totalAlliance = 0, 0, 0
local iconString = '|T%s:16:16:0:0:64:64:4:60:4:60|t'
local iconStringName = '|T%s:16:16:0:0:64:64:4:60:4:60|t %s'
local db

local function sortFunction(a, b)
Expand Down Expand Up @@ -218,7 +218,7 @@ local function OnEnter()
end

if info.quantity then
DT.tooltip:AddDoubleLine(format('%s %s', format(iconString, info.iconFileID), name), BreakUpLargeNumbers(info.quantity), 1, 1, 1, 1, 1, 1)
DT.tooltip:AddDoubleLine(format(iconStringName, info.iconFileID, name), BreakUpLargeNumbers(info.quantity), 1, 1, 1, 1, 1, 1)
end

index = index + 1
Expand Down
12 changes: 7 additions & 5 deletions ElvUI_Libraries/Core/LibRangeCheck-3.0/LibRangeCheck-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ License: MIT
-- @class file
-- @name LibRangeCheck-3.0
local MAJOR_VERSION = "LibRangeCheck-3.0-ElvUI"
local MINOR_VERSION = 15 -- real minor version: 13
local MINOR_VERSION = 16 -- real minor version: 13

-- GLOBALS: LibStub, CreateFrame

Expand All @@ -67,7 +67,7 @@ local CheckInteractDistance = CheckInteractDistance
local GetInventoryItemLink = GetInventoryItemLink
local GetItemInfo = GetItemInfo
local GetNumSpellTabs = GetNumSpellTabs
local GetSpellBookItemInfo = GetSpellBookItemInfo
local GetSpellBookItemName = GetSpellBookItemName
local GetSpellInfo = GetSpellInfo
local GetSpellTabInfo = GetSpellTabInfo
local GetTime = GetTime
Expand Down Expand Up @@ -134,6 +134,7 @@ local InteractLists = {
}

local MeleeRange = 2
local MatchSpellByID = {} -- specific matching to avoid incorrect index
local FriendSpells, HarmSpells, ResSpells, PetSpells = {}, {}, {}, {}

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

if isEraSOD then
MatchSpellByID[401417] = true -- Regeneration (Rune): Conflicts with Racial Passive on Trolls

tinsert(FriendSpells.MAGE, 401417) -- Regeneration (40 yards)
tinsert(FriendSpells.MAGE, 412510) -- Mass Regeneration (40 yards)
end
Expand Down Expand Up @@ -654,15 +657,14 @@ local function getNumSpells()
end

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

for i = 1, getNumSpells() do
local spellType, id = GetSpellBookItemInfo(i, BOOKTYPE_SPELL)
if sid == id and allowSpellType[spellType] then
local name, _, id = GetSpellBookItemName(i, BOOKTYPE_SPELL)
if sid == id or (spellName == name and not MatchSpellByID[id]) then
return i
end
end
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_Options/Core/UnitFrames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ local function GetOptionsTable_GeneralGroup(updateFunc, groupName, numUnits)

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)
config.args.positionsGroup.inline = true
config.args.positionsGroup.args.width = ACH:Range(L["Width"], nil, 1, { min = 40, max = 1000, step = 1 })
config.args.positionsGroup.args.width = ACH:Range(L["Width"], nil, 1, { min = 15, max = 1000, step = 1 })
config.args.positionsGroup.args.height = ACH:Range(L["Height"], nil, 2, { min = 5, max = 500, step = 1 })

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

0 comments on commit 8f47409

Please sign in to comment.