Skip to content

Commit

Permalink
13.53
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Dec 2, 2023
2 parents 88ded46 + 440ef23 commit 2f6a731
Show file tree
Hide file tree
Showing 41 changed files with 1,397 additions and 643 deletions.
2 changes: 1 addition & 1 deletion ElvUI/Classic/Modules/Skins/Bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local GetItemQualityColor = GetItemQualityColor
local GetInventoryItemID = GetInventoryItemID
local GetItemInfo = GetItemInfo

local BANK_CONTAINER = BANK_CONTAINER
local BANK_CONTAINER = Enum.BagIndex.Bank
local LE_ITEM_CLASS_QUESTITEM = LE_ITEM_CLASS_QUESTITEM

local bagIconCache = {
Expand Down
13 changes: 13 additions & 0 deletions ElvUI/Classic/Modules/Skins/Character.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@ function S:CharacterFrame()
S:HandleTab(_G['CharacterFrameTab'..i])
end

-- Seasonal
local runeButton = E.ClassicSOD and _G.RuneFrameControlButton
if runeButton then
S:HandleButton(runeButton, true)

if not runeButton.runeIcon then -- make then icon
runeButton.runeIcon = runeButton:CreateTexture(nil, 'ARTWORK')
runeButton.runeIcon:SetTexture(134419) -- Interface\Icons\INV_Misc_Rune_06
runeButton.runeIcon:SetTexCoord(unpack(E.TexCoords))
runeButton.runeIcon:SetInside(runeButton)
end
end

-- Reposition Tabs
hooksecurefunc('PetTab_Update', HandleTabs)
HandleTabs()
Expand Down
45 changes: 45 additions & 0 deletions ElvUI/Classic/Modules/Skins/Engraving.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
local E, L, V, P, G = unpack(ElvUI)
local S = E:GetModule('Skins')

if not E.ClassicSOD then return end

local _G = _G
local hooksecurefunc = hooksecurefunc
local C_Engraving_GetRuneCategories = C_Engraving.GetRuneCategories

local function UpdateRuneList()
local categories = C_Engraving_GetRuneCategories(true, true)
for i = 1, (categories and #categories or 0) do
local header = _G['EngravingFrameHeader'..i]
if header and not header.template then
header:StripTextures()
header:SetTemplate('Transparent')
end
end

local frame = _G.EngravingFrame
local buttons = frame and frame.scrollFrame and frame.scrollFrame.buttons
for i = 1, (buttons and #buttons or 0) do
local button = _G['EngravingFrameScrollFrameButton'..i]
if button and not button.isSkinned then
S:HandleButton(button)
button.isSkinned = true
end
end
end

function S:SkinEngravings()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.engraving) then return end

S:HandleFrame(_G.EngravingFrame, true, nil, -7, 58, 8, -18)
_G.EngravingFrame.Border.NineSlice:Kill()
_G.EngravingFrameSideInset:Kill()

S:HandleEditBox(_G.EngravingFrameSearchBox)
S:HandleDropDownBox(_G.EngravingFrameFilterDropDown, 210)
S:HandleScrollBar(_G.EngravingFrameScrollFrameScrollBar)

hooksecurefunc('EngravingFrame_UpdateRuneList', UpdateRuneList)
end

S:AddCallbackForAddon('Blizzard_EngravingUI', 'SkinEngravings')
4 changes: 2 additions & 2 deletions ElvUI/Classic/Modules/Skins/Gossip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function S:GossipFrame()
GreetingPanel:StripTextures()
GreetingPanel:CreateBackdrop('Transparent')
GreetingPanel.backdrop:Point('TOPLEFT', GreetingPanel.ScrollBox, 0, 0)
GreetingPanel.backdrop:Point('BOTTOMRIGHT', GreetingPanel.ScrollBox, 0, 80)
GreetingPanel.backdrop:Point('BOTTOMRIGHT', GreetingPanel.ScrollBox, 0, 11)

local ItemTextFrame = _G.ItemTextFrame
ItemTextFrame:StripTextures()
Expand All @@ -111,7 +111,7 @@ function S:GossipFrame()

GossipFrame.backdrop:ClearAllPoints()
GossipFrame.backdrop:Point('TOPLEFT', GreetingPanel.ScrollBox, -10, 70)
GossipFrame.backdrop:Point('BOTTOMRIGHT', GreetingPanel.ScrollBox, 40, 40)
GossipFrame.backdrop:Point('BOTTOMRIGHT', GreetingPanel.ScrollBox, 40, -28)

S:HandleNextPrevButton(_G.ItemTextNextPageButton)
S:HandleNextPrevButton(_G.ItemTextPrevPageButton)
Expand Down
1 change: 1 addition & 0 deletions ElvUI/Classic/Modules/Skins/Load_Skins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Script file='Craft.lua'/>
<Script file='Debug.lua'/>
<Script file='DressingRoom.lua'/>
<Script file='Engraving.lua'/>
<Script file='EventTrace.lua'/>
<Script file='Friends.lua'/>
<Script file='GMChat.lua'/>
Expand Down
2 changes: 1 addition & 1 deletion ElvUI/Core/Defaults/Global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ G.datatexts = {
Haste = { Label = '', NoLabel = false, decimalLength = 1 },
Hit = { Label = '', NoLabel = false, decimalLength = 1 },
Intellect = { Label = '', NoLabel = false},
['Item Level'] = { rarityColor = true },
['Item Level'] = { onlyEquipped = false, rarityColor = true },
Location = { showZone = true, showSubZone = true, showContinent = false, color = 'REACTION', customColor = {r = 1, g = 1, b = 1} },
Mastery = { Label = '', NoLabel = false, decimalLength = 1 },
MovementSpeed = { Label = '', NoLabel = false, decimalLength = 1 },
Expand Down
1 change: 1 addition & 0 deletions ElvUI/Core/Defaults/Private.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ V.skins = {
debug = true,
dressingroom = true,
encounterjournal = true,
engraving = true,
eventLog = true,
friends = true,
garrison = true,
Expand Down
21 changes: 20 additions & 1 deletion ElvUI/Core/General/API.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ local TT = E:GetModule('Tooltip')
local LCS = E.Libs.LCS

local _G = _G
local wipe, max, next, tinsert = wipe, max, next, tinsert
local type, ipairs, pairs, unpack = type, ipairs, pairs, unpack
local wipe, max, next, tinsert, date, time = wipe, max, next, tinsert, date, time
local strfind, strlen, tonumber, tostring = strfind, strlen, tonumber, tostring
local hooksecurefunc = hooksecurefunc

local CreateFrame = CreateFrame
local GetBattlefieldArenaFaction = GetBattlefieldArenaFaction
local GetClassInfo = GetClassInfo
local GetGameTime = GetGameTime
local GetInstanceInfo = GetInstanceInfo
local GetNumGroupMembers = GetNumGroupMembers
local GetServerTime = GetServerTime
local GetSpecializationInfoForSpecID = GetSpecializationInfoForSpecID
local HideUIPanel = HideUIPanel
local InCombatLockdown = InCombatLockdown
Expand Down Expand Up @@ -163,6 +165,23 @@ E.SpecName = { -- english locale
[73] = 'Protection',
}

function E:GetDateTime(localTime, unix)
if not localTime then -- try to properly handle realm time
local dateTable = date('*t', GetServerTime())
dateTable.hour = GetGameTime() -- realm time since it doesnt match ServerTimeLocal

if unix then
return time(dateTable)
else
return dateTable
end
elseif unix then
return GetServerTime()
else
return date('*t', GetServerTime())
end
end

function E:ClassColor(class, usePriestColor)
if not class then return end

Expand Down
2 changes: 1 addition & 1 deletion ElvUI/Core/General/Fonts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function E:UpdateBlizzardFonts()
if replaceFonts then
E:MapFont(FontMap.questsmall, NORMAL, (blizz and 12) or unscale or medium, 'NONE')
E:MapFont(FontMap.questtext, NORMAL, (blizz and 13) or unscale or medium, 'NONE')
E:MapFont(FontMap.mailbody, NORMAL, (blizz and 15) or unscale or big, outline)
E:MapFont(FontMap.mailbody, NORMAL, (blizz and 15) or unscale or big, 'NONE')
E:MapFont(FontMap.cooldown, NORMAL, (blizz and 16) or unscale or big, 'SHADOW')
E:MapFont(FontMap.errortext, NORMAL, (blizz and 16) or unscale or big, 'SHADOW')
E:MapFont(FontMap.questtitle, NORMAL, (blizz and 18) or unscale or big, 'NONE')
Expand Down
2 changes: 2 additions & 0 deletions ElvUI/Core/Modules/ActionBars/ActionBars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,8 @@ function AB:UpdateButtonSettings(specific)
if LAB.FlyoutButtons then
AB:LAB_FlyoutSpells()
end
elseif (E.Wrath and E.myclass == 'SHAMAN') and AB.db.totemBar.enable then
AB:PositionAndSizeTotemBar()
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions ElvUI/Core/Modules/Bags/Bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ local LE_ITEM_CLASS_QUESTITEM = LE_ITEM_CLASS_QUESTITEM
local REAGENTBANK_PURCHASE_TEXT = REAGENTBANK_PURCHASE_TEXT
local BINDING_NAME_TOGGLEKEYRING = BINDING_NAME_TOGGLEKEYRING

local BANK_CONTAINER = BANK_CONTAINER
local BACKPACK_CONTAINER = BACKPACK_CONTAINER
local REAGENTBANK_CONTAINER = REAGENTBANK_CONTAINER
local KEYRING_CONTAINER = KEYRING_CONTAINER
local REAGENT_CONTAINER = E.Retail and 5 or math.huge -- impossible id to prevent code on classic
local BANK_CONTAINER = Enum.BagIndex.Bank
local BACKPACK_CONTAINER = Enum.BagIndex.Backpack
local REAGENTBANK_CONTAINER = Enum.BagIndex.Reagentbank
local KEYRING_CONTAINER = Enum.BagIndex.Keyring
local REAGENT_CONTAINER = Enum.BagIndex.ReagentBag

local BAG_FILTER_ASSIGN_TO = BAG_FILTER_ASSIGN_TO
local BAG_FILTER_CLEANUP = BAG_FILTER_CLEANUP
Expand Down
4 changes: 2 additions & 2 deletions ElvUI/Core/Modules/Bags/Sort.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ local SplitGuildBankItem = SplitGuildBankItem

local ITEMQUALITY_POOR = Enum.ItemQuality.Poor
local NUM_BAG_SLOTS = NUM_BAG_SLOTS + (E.Retail and 1 or 0) -- add the profession bag
local BANK_CONTAINER = BANK_CONTAINER
local REAGENT_CONTAINER = E.Retail and 5 or math.huge -- impossible id to prevent code on classic
local BANK_CONTAINER = Enum.BagIndex.Bank
local REAGENT_CONTAINER = Enum.BagIndex.ReagentBag

local BagSlotFlags = Enum.BagSlotFlags
local FILTER_FLAG_TRADE_GOODS = LE_BAG_FILTER_FLAG_TRADE_GOODS or BagSlotFlags.PriorityTradeGoods
Expand Down
23 changes: 6 additions & 17 deletions ElvUI/Core/Modules/Chat/Chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local LSM = E.Libs.LSM
local _G = _G
local issecurevariable = issecurevariable
local gsub, strfind, gmatch, format = gsub, strfind, gmatch, format
local ipairs, sort, wipe, date, time, difftime = ipairs, sort, wipe, date, time, difftime
local ipairs, sort, wipe, time, difftime = ipairs, sort, wipe, time, difftime
local pairs, unpack, select, pcall, next, tonumber, type = pairs, unpack, select, pcall, next, tonumber, type
local strlower, strsub, strlen, strupper, strtrim, strmatch = strlower, strsub, strlen, strupper, strtrim, strmatch
local tostring, tinsert, tremove, tconcat = tostring, tinsert, tremove, table.concat
Expand Down Expand Up @@ -53,7 +53,6 @@ local UnitIsUnit = UnitIsUnit
local UnitName = UnitName

local C_Club_GetInfoFromLastCommunityChatLine = C_Club.GetInfoFromLastCommunityChatLine
local C_DateAndTime_GetCurrentCalendarTime = C_DateAndTime.GetCurrentCalendarTime
local C_LFGList_GetActivityInfoTable = C_LFGList.GetActivityInfoTable
local C_LFGList_GetSearchResultInfo = C_LFGList.GetSearchResultInfo
local C_VoiceChat_GetMemberName = C_VoiceChat.GetMemberName
Expand Down Expand Up @@ -325,6 +324,9 @@ do --this can save some main file locals
if E.Classic then
-- Simpy (5099: Myzrael)
z['Player-5099-01947A77'] = itsSimpy -- Warlock: Simpy
-- Luckyone Seasonal (5826: Lone Wolf EU)
z['Player-5826-0202765F'] = ElvBlue -- [Alliance] Hunter: Luckyone
z['Player-5826-020F7F10'] = ElvBlue -- [Alliance] Paladin: Unluckyone
-- Luckyone Hardcore
z["Lucky-Nek'Rosh"] = ElvBlue -- [Horde] Rogue
z["Luckyone-Nek'Rosh"] = ElvBlue -- [Horde] Hunter
Expand Down Expand Up @@ -912,26 +914,13 @@ function CH:StyleChat(frame)
frame.styled = true
end

function CH:GetChatTime()
local unix = time()
local realm = not CH.db.timeStampLocalTime and C_DateAndTime_GetCurrentCalendarTime()
if realm then -- blizzard is weird
realm.day = realm.monthDay
realm.min = realm.minute
realm.sec = date('%S', unix) -- no seconds from CalendarTime
realm = time(realm)
end

return realm or unix
end

function CH:AddMessageEdits(frame, msg, isHistory, historyTime)
if not strmatch(msg, '^|Helvtime|h') and not strmatch(msg, '^|Hcpl:') then
local historyTimestamp --we need to extend the arguments on AddMessage so we can properly handle times without overriding
if isHistory == 'ElvUI_ChatHistory' then historyTimestamp = historyTime end

if CH.db.timeStampFormat and CH.db.timeStampFormat ~= 'NONE' then
local timeStamp = BetterDate(CH.db.timeStampFormat, historyTimestamp or CH:GetChatTime())
local timeStamp = BetterDate(CH.db.timeStampFormat, historyTimestamp or E:GetDateTime(CH.db.timeStampLocalTime, true))
timeStamp = gsub(timeStamp, ' ', '')
timeStamp = gsub(timeStamp, 'AM', ' AM')
timeStamp = gsub(timeStamp, 'PM', ' PM')
Expand Down Expand Up @@ -2764,7 +2753,7 @@ function CH:SaveChatHistory(event, ...)

if #tempHistory > 0 and not CH:MessageIsProtected(tempHistory[1]) then
tempHistory[50] = event
tempHistory[51] = CH:GetChatTime()
tempHistory[51] = E:GetDateTime(CH.db.timeStampLocalTime, true)

local coloredName, battleTag
if tempHistory[13] and tempHistory[13] > 0 then coloredName, battleTag = CH:GetBNFriendColor(tempHistory[2], tempHistory[13], true) end
Expand Down
42 changes: 28 additions & 14 deletions ElvUI/Core/Modules/DataTexts/Bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ local GetContainerNumFreeSlots = GetContainerNumFreeSlots or (C_Container and C_
local GetContainerNumSlots = GetContainerNumSlots or (C_Container and C_Container.GetContainerNumSlots)
local ContainerIDToInventoryID = ContainerIDToInventoryID or (C_Container and C_Container.ContainerIDToInventoryID)

local MAX_WATCHED_TOKENS = MAX_WATCHED_TOKENS or 3
local NUM_BAG_SLOTS = NUM_BAG_SLOTS
local CURRENCY = CURRENCY
local MAX_WATCHED_TOKENS = MAX_WATCHED_TOKENS or 3
local NUM_BAG_SLOTS = NUM_BAG_SLOTS + (E.Retail and 1 or 0)

local REAGENT_CONTAINER = Enum.BagIndex.ReagentBag

local displayString, db = ''
local iconString = '|T%s:14:14:0:0:64:64:4:60:4:60|t %s'
Expand All @@ -27,23 +29,30 @@ local BAG_TYPES = {
}

local function OnEvent(self)
local free, total = 0, 0
for i = 0, NUM_BAG_SLOTS + (E.Retail and db.includeReagents and 1 or 0) do
local freeNormal, totalNormal, freeReagent, totalReagent = 0, 0, 0, 0
for i = 0, NUM_BAG_SLOTS do
local freeSlots, bagType = GetContainerNumFreeSlots(i)
if not bagType or bagType == 0 then
free, total = free + freeSlots, total + GetContainerNumSlots(i)
local totalSlots = GetContainerNumSlots(i)
if i == REAGENT_CONTAINER then
totalReagent = totalReagent + totalSlots
freeReagent = freeReagent + freeSlots
else
totalNormal = totalNormal + totalSlots
freeNormal = freeNormal + freeSlots
end
end
end

local textFormat = db.textFormat
local textFormat, reagents = db.textFormat, db.includeReagents
if textFormat == 'FREE' then
self.text:SetFormattedText(displayString, free)
self.text:SetFormattedText(displayString, freeNormal, reagents and freeReagent or '')
elseif textFormat == 'USED' then
self.text:SetFormattedText(displayString, total - free)
elseif textFormat == 'FREE_TOTAL' then
self.text:SetFormattedText(displayString, free, total)
else
self.text:SetFormattedText(displayString, total - free, total)
self.text:SetFormattedText(displayString, totalNormal - freeNormal, reagents and (totalReagent - freeReagent) or '')
elseif textFormat == 'USED_TOTAL' then
self.text:SetFormattedText(displayString, totalNormal - freeNormal, totalNormal, reagents and (totalReagent - freeReagent) or '', reagents and totalReagent or '')
else -- FREE_TOTAL
self.text:SetFormattedText(displayString, freeNormal, totalNormal, reagents and freeReagent or '', reagents and totalReagent or '')
end
end

Expand All @@ -54,7 +63,7 @@ end
local function OnEnter()
DT.tooltip:ClearLines()

for i = 0, NUM_BAG_SLOTS + (E.Retail and 1 or 0) do
for i = 0, NUM_BAG_SLOTS do
local bagName = GetBagName(i)
if bagName then
local numSlots = GetContainerNumSlots(i)
Expand Down Expand Up @@ -103,7 +112,12 @@ local function ApplySettings(self, hex)
db = E.global.datatexts.settings[self.name]
end

displayString = strjoin('', db.NoLabel and '' or (db.Label ~= '' and db.Label) or strjoin('', L["Bags"], ': '), hex, (db.textFormat == 'FREE' or db.textFormat == 'USED') and '%d|r' or '%d/%d|r')
local name = (db.NoLabel and '') or (db.Label ~= '' and db.Label) or strjoin('', L["Bags"], ': ')
if db.textFormat == 'FREE' or db.textFormat == 'USED' then
displayString = strjoin('', name, hex, (db.includeReagents and '%d (%d)|r') or '%d|r')
else
displayString = strjoin('', name, hex, (db.includeReagents and '%d/%d (%d/%d)|r') or '%d/%d|r')
end
end

DT:RegisterDatatext('Bags', nil, { 'BAG_UPDATE' }, OnEvent, nil, OnClick, OnEnter, nil, L["Bags"], nil, ApplySettings)
2 changes: 1 addition & 1 deletion ElvUI/Core/Modules/DataTexts/ItemLevel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local function OnEvent(self)

local hex = db.rarityColor and E:RGBToHex(r, g, b) or '|cFFFFFFFF'

self.text:SetFormattedText(avg == avgEquipped and sameString or bothString, ITEM_LEVEL_ABBR, hex, avgEquipped or 0, hex, avg or 0)
self.text:SetFormattedText((db.onlyEquipped or avg == avgEquipped) and sameString or bothString, ITEM_LEVEL_ABBR, hex, avgEquipped or 0, hex, avg or 0)
else
self.text:SetText(NOT_APPLICABLE)
end
Expand Down
Loading

0 comments on commit 2f6a731

Please sign in to comment.