Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
noname08662 authored Nov 27, 2024
1 parent 03955e4 commit 615dbbe
Show file tree
Hide file tree
Showing 16 changed files with 383 additions and 152 deletions.
58 changes: 26 additions & 32 deletions ElvUI_Extras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,34 +302,35 @@ if isAwesome then
core:RegisterEvent('PLAYER_TARGET_CHANGED', function()
if not UnitExists('target') then return end
if target.exists then
for _, np in pairs(GetNamePlates()) do
for _, np in ipairs(GetNamePlates()) do
NP:SetTargetFrame(np.UnitFrame)
NP:ResetNameplateFrameLevel(np.UnitFrame)
end
else
target.exists = true
target:SetScript('OnUpdate', function()
for _, np in pairs(GetNamePlates()) do
local frame = np.UnitFrame
if not frame.isTarget then
frame.alpha = np:GetAlpha()
np:SetAlpha(1)
NP:PlateFade(frame, NP.db.fadeIn and 1 or 0, frame:GetAlpha(), NP.db.nonTargetTransparency)
end
end
if not UnitExists('target') then
for _, np in pairs(GetNamePlates()) do
for _, np in ipairs(GetNamePlates()) do
NP:SetTargetFrame(np.UnitFrame)
end
target.exists = false
target:SetScript('OnUpdate', nil)
else
for _, np in ipairs(GetNamePlates()) do
local frame = np.UnitFrame
if not frame.isTarget then
frame.alpha = np:GetAlpha()
np:SetAlpha(1)
NP:PlateFade(frame, NP.db.fadeIn and 1 or 0, frame:GetAlpha(), NP.db.nonTargetTransparency)
end
end
end
end)
local plate = GetNamePlateForUnit('target')
if not plate or not plate.UnitFrame then return end
local frame = plate.UnitFrame
NP:SetTargetFrame(frame)
for _, np in pairs(GetNamePlates()) do
for _, np in ipairs(GetNamePlates()) do
NP:ResetNameplateFrameLevel(np.UnitFrame)
end
end
Expand All @@ -338,7 +339,7 @@ if isAwesome then
core:RegisterEvent('UPDATE_MOUSEOVER_UNIT', function()
local plate = GetNamePlateForUnit('mouseover')
if plate and plate.UnitFrame then
for _, np in pairs(GetNamePlates()) do
for _, np in ipairs(GetNamePlates()) do
local unitframe = np.UnitFrame
if unitframe and unitframe.isMouseover then
if unitframe.oldHighlight:IsShown() then
Expand All @@ -353,7 +354,7 @@ if isAwesome then
NP:SetMouseoverFrame(plate.UnitFrame)
mouseover:SetScript("OnUpdate", function()
if not UnitExists('mouseover') then
for _, np in pairs(GetNamePlates()) do
for _, np in ipairs(GetNamePlates()) do
local unitframe = np.UnitFrame
if unitframe and unitframe.isMouseover then
unitframe.isMouseover = nil
Expand All @@ -367,9 +368,9 @@ if isAwesome then
end)

core:RegisterEvent('UNIT_THREAT_LIST_UPDATE', function(_, unit)
if not unit then return end
if not unit or not find(unit, 'nameplate', 1, true) then return end
local plate = GetNamePlateForUnit(unit)
if not plate or not plate.UnitFrame or not find(unit, 'nameplate') then return end
if not plate or not plate.UnitFrame then return end
local status = UnitThreatSituation("player", unit)
if plate.UnitFrame.ThreatStatus ~= status then
plate.UnitFrame.ThreatStatus = status
Expand Down Expand Up @@ -414,7 +415,8 @@ if isAwesome then
end

function core:SetTargetFrame(_, frame)
local unit = frame:GetParent().unit
local parent = frame:GetParent()
local unit = parent.unit
if not unit then return end
local isTargetUnit = UnitGUID(unit) == UnitGUID("target")

Expand Down Expand Up @@ -446,17 +448,11 @@ if isAwesome then
if NP.db.useTargetScale then
NP:SetFrameScale(frame, (frame.ThreatScale or 1))
end
if not frame.isGroupUnit then
if frame.isEventsRegistered then
NP:UnregisterAllEvents(frame)
NP:Update_CastBar(frame)
end
end
if not NP.db.units[frame.UnitType].health.enable then
NP:UpdateAllFrame(frame, nil, true)
end
NP:Update_CPoints(frame)
frame:SetFrameLevel(#GetNamePlates())
frame:SetFrameLevel(parent:GetFrameLevel() + 1)
end
NP:StyleFilterUpdate(frame, "PLAYER_TARGET_CHANGED")
end
Expand Down Expand Up @@ -521,7 +517,7 @@ if isAwesome then
--highest possible should be level 880 and we add 1 to all so 881
--local leveledCount = NP.CollectedFrameLevelCount or 1
--level = (frame.FrameLevelChanged*(40*NP.levelStep)) + (leveledCount*NP.levelStep)
local level = #GetNamePlates() + frame.FrameLevelChanged * 10 + 100
local level = (frame:GetParent():GetFrameLevel() + 1) + frame.FrameLevelChanged * 10

frame:SetFrameLevel(level)
frame.Shadow:SetFrameLevel(level-1)
Expand All @@ -532,13 +528,11 @@ if isAwesome then
local targetPlate = GetNamePlateForUnit('target')
local plate = targetPlate and targetPlate.UnitFrame

if plate and plate:IsShown() and frame ~= plate then
if level > plate:GetFrameLevel() then
plate:SetFrameLevel(frame:GetFrameLevel() + 10)
end
if plate and plate:IsShown() and frame ~= plate and level > plate:GetFrameLevel() then
plate:SetFrameLevel(level + 10)
end
elseif frame.LevelHandled then
local level = #GetNamePlates() + 100
local level = frame:GetParent():GetFrameLevel() + 1
frame:SetFrameLevel(level)
frame.Shadow:SetFrameLevel(level-1)
frame.Buffs:SetFrameLevel(level)
Expand Down Expand Up @@ -591,7 +585,7 @@ function core:OnShowHide(frame, health)
end
end

core:SecureHook(NP, "OnCreated", function(self, plate)
core:SecureHook(NP, "OnCreated", function(_, plate)
local frame = plate.UnitFrame
local frameHealth = frame and frame.Health

Expand All @@ -611,7 +605,7 @@ core:SecureHook(NP, "OnCreated", function(self, plate)
end
end)

core:SecureHook(NP, "Configure_Elite", function(self, frame)
core:SecureHook(NP, "Configure_Elite", function(_, frame)
local unitType = frame.UnitType
local db = NP.db.units[unitType].eliteIcon

Expand Down Expand Up @@ -1773,4 +1767,4 @@ end
LSM:Register("font", "Extras_Favourite (Montserrat)", "Interface\\AddOns\\ElvUI_Extras\\Media\\Favourite.ttf")
LSM:Register("font", "Invisible", "Interface\\AddOns\\ElvUI_Extras\\Media\\Invisible.ttf")

E:RegisterModule(core:GetName(), InitializeCallback)
E:RegisterModule(core:GetName(), InitializeCallback)
17 changes: 10 additions & 7 deletions Locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ L["Handles the automated repositioning of the newly received items."..
" ilvl@number - matches ilvl,\n"..
" uselevel@number - matches equip level,\n"..
" quality@number - matches quality,\n"..
" equipslot@number - matches InventorySlotID,\n"..
" equipslot@number - matches inventorySlotID,\n"..
" maxstack@number - matches stack limit,\n"..
" price@number - matches sell price,\n\n"..
" tooltip@string - matches tooltip text,\n\n"..
Expand Down Expand Up @@ -963,10 +963,11 @@ L["Pre-Load"] = "Vor-Laden"
L["Executes commands during the addon's initialization process."] = "Führt Befehle während des Initialisierungsprozesses des Addons aus."
L["Justify"] = "Rechtfertigen"
L["Alt-Click: free bag slots, if possible."] = "Alt-Klick: Freie Taschenplätze, wenn möglich."
L["Click: Toggle layout mode."] = "Klicken: Layout-Modus umschalten."
L["Alt-Click: Re-evaluate all items."] = "Alt-Klick: Alle Gegenstände neu bewerten."
L["Drag-and-Drop: Evaluate and position the cursor item."] = "Ziehen und Ablegen: Bewerten und Positionieren des Cursor-Gegenstands."
L["Mouse-Wheel: Navigate between special and normal bags."] = "Mausrad: Zwischen speziellen und normalen Taschen navigieren."
L["Click: toggle layout mode."] = "Klicken: Layout-Modus umschalten."
L["Alt-Click: re-evaluate all items."] = "Alt-Klick: Alle Gegenstände neu bewerten."
L["Shift-Alt-Click: toggle these hints."] = "Shift-Alt-Klick: Diese Hinweise umschalten."
L["Mouse-Wheel: navigate between special and normal bags."] = "Mausrad: Zwischen speziellen und normalen Taschen navigieren."
L["This button accepts cursor item drops."] = "Dieser Button nimmt Gegenstände vom Cursor an."
L["Setup Sections"] = "Abschnitte einrichten"
L["Adds default sections set to the currently selected container."] = "Fügt Standardabschnitte zum aktuell ausgewählten Container hinzu."
L["Handles the automated repositioning of the newly received items."..
Expand All @@ -978,7 +979,7 @@ L["Handles the automated repositioning of the newly received items."..
" ilvl@number - matches ilvl,\n"..
" uselevel@number - matches equip level,\n"..
" quality@number - matches quality,\n"..
" equipslot@number - matches InventorySlotID,\n"..
" equipslot@number - matches inventorySlotID,\n"..
" maxstack@number - matches stack limit,\n"..
" price@number - matches sell price,\n\n"..
" tooltip@string - matches tooltip text,\n\n"..
Expand Down Expand Up @@ -1078,4 +1079,6 @@ L["0 to match frame width."] = "0 um die Rahmenbreite anzupassen."
L["Remove a NPC"] = "Einen NPC entfernen"
L["Change a NPC's Occupation"] = "Beruf eines NPC ändern"
L["...to the currently selected one."] = "...zum aktuell ausgewählten."
L["Select Occupation"] = "Beruf auswählen"
L["Select Occupation"] = "Beruf auswählen"
L["Sell"] = "Verkaufen"
L["Action Type"] = "Aktionstyp"
19 changes: 12 additions & 7 deletions Locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ L["Handles the automated repositioning of the newly received items."..
" ilvl@number - matches ilvl,\n"..
" uselevel@number - matches equip level,\n"..
" quality@number - matches quality,\n"..
" equipslot@number - matches InventorySlotID,\n"..
" equipslot@number - matches inventorySlotID,\n"..
" maxstack@number - matches stack limit,\n"..
" price@number - matches sell price,\n\n"..
" tooltip@string - matches tooltip text,\n\n"..
Expand Down Expand Up @@ -806,10 +806,12 @@ L["Pre-Load"] = true
L["Executes commands during the addon's initialization process."] = true
L["Justify"] = true
L["Alt-Click: free bag slots, if possible."] = true
L["Click: Toggle layout mode."] = true
L["Alt-Click: Re-evaluate all items."] = true
L["Drag-and-Drop: Evaluate and position the cursor item."] = true
L["Mouse-Wheel: Navigate between special and normal bags."] = true
L["Click: toggle layout mode."] = true
L["Alt-Click: re-evaluate all items."] = true
L["Drag-and-Drop: evaluate and position the cursor item."] = true
L["Shift-Alt-Click: toggle these hints."] = true
L["Mouse-Wheel: navigate between special and normal bags."] = true
L["This button accepts cursor item drops."] = true
L["Setup Sections"] = true
L["Adds default sections set to the currently selected container."] = true
L["Handles the automated repositioning of the newly received items."..
Expand All @@ -821,7 +823,7 @@ L["Handles the automated repositioning of the newly received items."..
" ilvl@number - matches ilvl,\n"..
" uselevel@number - matches equip level,\n"..
" quality@number - matches quality,\n"..
" equipslot@number - matches InventorySlotID,\n"..
" equipslot@number - matches inventorySlotID,\n"..
" maxstack@number - matches stack limit,\n"..
" price@number - matches sell price,\n\n"..
" tooltip@string - matches tooltip text,\n\n"..
Expand Down Expand Up @@ -873,4 +875,7 @@ L["0 to match frame width."] = true
L["Remove a NPC"] = true
L["Change a NPC's Occupation"] = true
L["...to the currently selected one."] = true
L["Select Occupation"] = true
L["Select Occupation"] = true
L["Sell"] = true
L["Action Type"] = true

14 changes: 9 additions & 5 deletions Locales/esMX.lua
Original file line number Diff line number Diff line change
Expand Up @@ -967,10 +967,12 @@ L["Pre-Load"] = "Pre-carga"
L["Executes commands during the addon's initialization process."] = "Ejecuta comandos durante el proceso de inicialización del addon."
L["Justify"] = "Justificar"
L["Alt-Click: free bag slots, if possible."] = "Alt-Clic: espacios de bolsa libres, si es posible."
L["Click: Toggle layout mode."] = "Clic: alternar modo de diseño."
L["Alt-Click: Re-evaluate all items."] = "Alt-Clic: reevaluar todos los objetos."
L["Drag-and-Drop: Evaluate and position the cursor item."] = "Arrastrar y soltar: evaluar y posicionar el objeto del cursor."
L["Mouse-Wheel: Navigate between special and normal bags."] = "Rueda del ratón: navegar entre bolsas especiales y normales."
L["Click: toggle layout mode."] = "Clic: alternar modo de diseño."
L["Alt-Click: re-evaluate all items."] = "Alt-Clic: reevaluar todos los objetos."
L["Drag-and-Drop: evaluate and position the cursor item."] = "Arrastrar y soltar: evaluar y posicionar el objeto del cursor."
L["Shift-Alt-Click: toggle these hints."] = "Shift-Alt-Clic: alternar estas pistas."
L["Mouse-Wheel: navigate between special and normal bags."] = "Rueda del ratón: navegar entre bolsas especiales y normales."
L["This button accepts cursor item drops."] = "Este botón acepta objetos soltados desde el cursor."
L["Setup Sections"] = "Configurar Secciones"
L["Adds default sections set to the currently selected container."] = "Agrega secciones predeterminadas al contenedor actualmente seleccionado."
L["Handles the automated repositioning of the newly received items."..
Expand Down Expand Up @@ -1082,4 +1084,6 @@ L["0 to match frame width."] = "0 para coincidir con el ancho del marco."
L["Remove a NPC"] = "Eliminar un NPC"
L["Change a NPC's Occupation"] = "Cambiar la ocupación de un NPC"
L["...to the currently selected one."] = "...al actualmente seleccionado."
L["Select Occupation"] = "Seleccionar ocupación"
L["Select Occupation"] = "Seleccionar ocupación"
L["Sell"] = "Vender"
L["Action Type"] = "Tipo de acción"
14 changes: 9 additions & 5 deletions Locales/frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,12 @@ L["Pre-Load"] = "Pré-chargement"
L["Executes commands during the addon's initialization process."] = "Exécute des commandes pendant le processus d'initialisation de l'addon."
L["Justify"] = "Justifier"
L["Alt-Click: free bag slots, if possible."] = "Alt-Clic : emplacements de sac libres, si possible."
L["Click: Toggle layout mode."] = "Clic : basculer le mode de mise en page."
L["Alt-Click: Re-evaluate all items."] = "Alt-Clic : réévaluer tous les objets."
L["Drag-and-Drop: Evaluate and position the cursor item."] = "Glisser-Déposer : évaluer et positionner l'objet du curseur."
L["Mouse-Wheel: Navigate between special and normal bags."] = "Molette de la souris : naviguer entre les sacs spéciaux et normaux."
L["Click: toggle layout mode."] = "Clic : basculer le mode de mise en page."
L["Alt-Click: re-evaluate all items."] = "Alt-Clic : réévaluer tous les objets."
L["Drag-and-Drop: evaluate and position the cursor item."] = "Glisser-Déposer : évaluer et positionner l'objet du curseur."
L["Shift-Alt-Click: toggle these hints."] = "Maj-Alt-Clic : activer/désactiver ces conseils."
L["Mouse-Wheel: navigate between special and normal bags."] = "Molette de la souris : naviguer entre les sacs spéciaux et normaux."
L["This button accepts cursor item drops."] = "Ce bouton accepte les objets déposés avec le curseur."
L["Setup Sections"] = "Configurer les Sections"
L["Adds default sections set to the currently selected container."] = "Ajoute des sections par défaut au conteneur actuellement sélectionné."
L["Handles the automated repositioning of the newly received items."..
Expand Down Expand Up @@ -1083,4 +1085,6 @@ L["0 to match frame width."] = "0 pour correspondre à la largeur du cadre."
L["Remove a NPC"] = "Supprimer un PNJ"
L["Change a NPC's Occupation"] = "Changer la profession d'un PNJ"
L["...to the currently selected one."] = "...à celui actuellement sélectionné."
L["Select Occupation"] = "Sélectionner la profession"
L["Select Occupation"] = "Sélectionner la profession"
L["Sell"] = "Vendre"
L["Action Type"] = "Type d'action"
14 changes: 9 additions & 5 deletions Locales/koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -967,10 +967,12 @@ L["Pre-Load"] = "미리 로드"
L["Executes commands during the addon's initialization process."] = "애드온 초기화 과정에서 명령을 실행합니다."
L["Justify"] = "정렬"
L["Alt-Click: free bag slots, if possible."] = "Alt-클릭: 가능한 경우 가방 슬롯 비우기."
L["Click: Toggle layout mode."] = "클릭: 레이아웃 모드 전환."
L["Alt-Click: Re-evaluate all items."] = "Alt-클릭: 모든 아이템 다시 평가."
L["Drag-and-Drop: Evaluate and position the cursor item."] = "드래그 앤 드롭: 커서 아이템 평가 및 위치 지정."
L["Mouse-Wheel: Navigate between special and normal bags."] = "마우스 휠: 특수 가방과 일반 가방 간 이동."
L["Click: toggle layout mode."] = "클릭: 레이아웃 모드 전환."
L["Alt-Click: re-evaluate all items."] = "Alt-클릭: 모든 아이템 다시 평가."
L["Drag-and-Drop: evaluate and position the cursor item."] = "드래그 앤 드롭: 커서 아이템 평가 및 위치 지정."
L["Shift-Alt-Click: toggle these hints."] = "Shift-Alt-클릭: 이 힌트 전환."
L["Mouse-Wheel: navigate between special and normal bags."] = "마우스 휠: 특수 가방과 일반 가방 간 이동."
L["This button accepts cursor item drops."] = "이 버튼은 커서에서 아이템을 드롭할 수 있습니다."
L["Setup Sections"] = "섹션 설정"
L["Adds default sections set to the currently selected container."] = "현재 선택된 컨테이너에 기본 섹션을 추가합니다."
L["Handles the automated repositioning of the newly received items."..
Expand Down Expand Up @@ -1082,4 +1084,6 @@ L["0 to match frame width."] = "프레임 너비에 맞추기 위한 0."
L["Remove a NPC"] = "NPC 제거"
L["Change a NPC's Occupation"] = "NPC의 직업 변경"
L["...to the currently selected one."] = "...현재 선택된 것으로."
L["Select Occupation"] = "직업 선택"
L["Select Occupation"] = "직업 선택"
L["Sell"] = "판매"
L["Action Type"] = "작업 유형"
14 changes: 9 additions & 5 deletions Locales/ptBR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -965,10 +965,12 @@ L["Pre-Load"] = "Pré-carregamento"
L["Executes commands during the addon's initialization process."] = "Executa comandos durante o processo de inicialização do addon."
L["Justify"] = "Justificar"
L["Alt-Click: free bag slots, if possible."] = "Alt-Clique: liberar slots da bolsa, se possível."
L["Click: Toggle layout mode."] = "Clique: Alternar modo de layout."
L["Alt-Click: Re-evaluate all items."] = "Alt-Clique: Reavaliar todos os itens."
L["Drag-and-Drop: Evaluate and position the cursor item."] = "Arraste e solte: Avaliar e posicionar o item do cursor."
L["Mouse-Wheel: Navigate between special and normal bags."] = "Roda do Mouse: Navegar entre bolsas especiais e normais."
L["Click: toggle layout mode."] = "Clique: alternar modo de layout."
L["Alt-Click: re-evaluate all items."] = "Alt-Clique: reavaliar todos os itens."
L["Drag-and-Drop: evaluate and position the cursor item."] = "Arraste e solte: avaliar e posicionar o item do cursor."
L["Shift-Alt-Click: toggle these hints."] = "Shift-Alt-Clique: alternar estas dicas."
L["Mouse-Wheel: navigate between special and normal bags."] = "Roda do Mouse: navegar entre bolsas especiais e normais."
L["This button accepts cursor item drops."] = "Este botão aceita itens soltos pelo cursor."
L["Setup Sections"] = "Configurar Seções"
L["Adds default sections set to the currently selected container."] = "Adiciona seções padrão ao recipiente atualmente selecionado."
L["Handles the automated repositioning of the newly received items."..
Expand Down Expand Up @@ -1080,4 +1082,6 @@ L["0 to match frame width."] = "0 para corresponder à largura do quadro."
L["Remove a NPC"] = "Remover um NPC"
L["Change a NPC's Occupation"] = "Mudar a ocupação de um NPC"
L["...to the currently selected one."] = "...para o atualmente selecionado."
L["Select Occupation"] = "Selecionar Ocupação"
L["Select Occupation"] = "Selecionar Ocupação"
L["Sell"] = "Vender"
L["Action Type"] = "Tipo de ação"
Loading

0 comments on commit 615dbbe

Please sign in to comment.