Skip to content

Commit

Permalink
Merge branch 'andromeda' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
ffainy committed Apr 11, 2022
2 parents f08ae73 + d0f5871 commit c6995bd
Show file tree
Hide file tree
Showing 22 changed files with 223 additions and 89 deletions.
Binary file added assets/textures/bottom_glow.tga
Binary file not shown.
Binary file added assets/textures/np_boss.tga
Binary file not shown.
Binary file added assets/textures/np_elite.tga
Binary file not shown.
Binary file added assets/textures/np_rare.tga
Binary file not shown.
Binary file added assets/textures/np_skull.tga
Binary file not shown.
Binary file added assets/textures/np_target.tga
Binary file not shown.
Binary file added assets/textures/statusbar/overlay.tga
Binary file not shown.
File renamed without changes.
Binary file modified assets/textures/statusbar/stripe.tga
Binary file not shown.
5 changes: 5 additions & 0 deletions core/media.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ C.Assets.Texture = {
Backdrop = 'Interface\\ChatFrame\\ChatFrameBackground',
Shadow = C.ASSET_PATH .. 'textures\\shadow_tex',
Glow = C.ASSET_PATH .. 'textures\\glow_tex',
Rare = C.ASSET_PATH .. 'textures\\np_rare',
Elite = C.ASSET_PATH .. 'textures\\np_elite',
Boss = C.ASSET_PATH .. 'textures\\np_boss',
Skull = C.ASSET_PATH .. 'textures\\np_skull',
Target = C.ASSET_PATH .. 'textures\\np_target',
}

C.Assets.Statusbar = {
Expand Down
21 changes: 21 additions & 0 deletions libs/oUF/elements/castbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ local function resetAttributes(self)
self.spellID = nil
end

local function resetSpellTarget(self)
if self.Text then
self.Text:SetText('')
end
end

local function CastStart(self, event, unit)
if(self.unit ~= unit) then return end

Expand Down Expand Up @@ -148,6 +154,21 @@ local function CastStart(self, event, unit)
if(element.Text) then element.Text:SetText(name) end
if(element.Time) then element.Time:SetText() end

local unitTarget = unit and unit .. 'target'
if unitTarget and UnitExists(unitTarget) then
local tarName = ns[1].ShortenString(UnitName(unitTarget), 4)
local hexStr = ns[1]:RgbToHex(ns[1]:UnitColor(unitTarget))
local nameStr
if UnitIsUnit(unitTarget, 'player') then
nameStr = string.format('|cffff0000%s|r', string.upper(_G.YOU))
else
nameStr = string.format('%s%s|r', hexStr, tarName)
end
if(element.Text) then element.Text:SetFormattedText('%s (%s)', name, nameStr) end
else
resetSpellTarget(self) -- when unit loses target
end

local safeZone = element.SafeZone
if(safeZone) then
local isHoriz = element:GetOrientation() == 'HORIZONTAL'
Expand Down
8 changes: 6 additions & 2 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ L["Actionbar"] = true
L["Add Contacts"] = true
L["Add flash animation to the pressed actionbar buttons."] = true
L["Add font outline globally, if you run the game with a low resolution, this option may improve the clarity of the interface text."] = true
L["Add group tool at the top of the screen."] = true
L["Add micro menu bar at the bottom of the screen."] = true
L["Add shadow border to most of UI widgets."] = true
L["Add shadowed overlay to screen corner."] = true
Expand All @@ -52,6 +53,7 @@ L["All Buffs Ready!"] = true
L["All keybinds cleared for %s."] = true
L["Allow space bar, escape key and enter key to cancel cinematic without confirmation."] = true
L["Alt+Click to buy a stack"] = true
L["America"] = true
L["Anchor To Top"] = true
L["Anchor the editbox to the bottom."] = true
L["Announce Important Informations"] = true
Expand Down Expand Up @@ -139,6 +141,7 @@ L["Chat"] = true
L["Chat Text Fading"] = true
L["Chat Window Size"] = true
L["Check Flask & Food"] = true
L["China"] = true
L["Class Color"] = true
L["Class Color Customization"] = true
L["Class Power"] = true
Expand Down Expand Up @@ -322,6 +325,7 @@ L["Enter the spell\'s cooldown duration.|nParty watcher only support regular spe
L["Enter unit name or NPC ID. Use key SPACE between different units."] = true
L["Equipement Set"] = true
L["Equipped Item Border"] = true
L["Europe"] = true
L["Execute Indicator"] = true
L["Execute Ratio"] = true
L["Existing ID"] = true
Expand Down Expand Up @@ -399,7 +403,6 @@ L["Height"] = true
L["Hello"] = true
L["Hidden"] = true
L["Hidden in Combat"] = true
L["Hide Anima Buffs Frame"] = true
L["Hide Boss Banner"] = true
L["Hide Boss Emote"] = true
L["Hide Guild Rank"] = true
Expand All @@ -411,7 +414,6 @@ L["Hide chat frame in combat"] = true
L["Hide cooldown count on WeakAuras."] = true
L["Hide in Combat"] = true
L["Hide minimap automatically after enter combat and restores it after leave combat."] = true
L["Hide the anima buffs frame from Mythic+ Dungeon and Tarragrue."] = true
L["Hide the banner and loot list after the boss is killed."] = true
L["Hide the emote and whisper from boss during battle."] = true
L["Hide the frame"] = true
Expand Down Expand Up @@ -471,6 +473,7 @@ L["Key"] = true
L["Key Binding"] = true
L["Keybinds discarded."] = true
L["Keybinds saved."] = true
L["Korea"] = true
L["Korthia Relics"] = true
L["LEFT"] = true
L["LEFT_DOWN"] = "Left and Down"
Expand Down Expand Up @@ -702,6 +705,7 @@ L["Swap Icons Side"] = true
L["Switch Mode"] = true
L["Sync Party Watcher"] = true
L["System Stats"] = true
L["Taiwan"] = true
L["Take All"] = true
L["Take screenshots automatically based on specific events."] = true
L["Target Castbar"] = true
Expand Down
8 changes: 6 additions & 2 deletions locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ L["Actionbar"] = "Панель умений"
L["Add Contacts"] = "Добавить контакт"
L["Add flash animation to the pressed actionbar buttons."] = "Добавьте флэш-анимацию к нажатым кнопкам панели умений."
L["Add font outline globally, if you run the game with a low resolution, this option may improve the clarity of the interface text."] = "Добавляет контур шрифта глобально, если вы запускаете игру с низким разрешением, этот параметр может улучшить четкость текста интерфейса."
L["Add group tool at the top of the screen."] = true
L["Add micro menu bar at the bottom of the screen."] = true
L["Add shadow border to most of UI widgets."] = "Добавление тени к большинству виджетов пользовательского интерфейса."
L["Add shadowed overlay to screen corner."] = "Добавление тени по краям экрана."
Expand All @@ -52,6 +53,7 @@ L["All Buffs Ready!"] = "Все баффы готовы!"
L["All keybinds cleared for %s."] = "Все привязки клавиш отчищенны для %s."
L["Allow space bar, escape key and enter key to cancel cinematic without confirmation."] = "|nРазрешить использовать ПРОБЕЛ как клавишу выхода и клавишу ввода для отмены синиматика без подтверждения."
L["Alt+Click to buy a stack"] = "Alt + щелкните, чтобы купить стак"
L["America"] = true
L["Anchor To Top"] = "Привязка к верху"
L["Anchor the editbox to the bottom."] = "Прикрепите поле редактирования к нижней части."
L["Announce Important Informations"] = "Объявлять Важную информацию"
Expand Down Expand Up @@ -139,6 +141,7 @@ L["Chat"] = "Чат"
L["Chat Text Fading"] = "Затухание текста чата"
L["Chat Window Size"] = "Размер окна чата"
L["Check Flask & Food"] = "Проверка Настоев и Еды"
L["China"] = true
L["Class Color"] = "Цвет классов"
L["Class Color Customization"] = "Настройка цвета класса"
L["Class Power"] = "Ресурс класса"
Expand Down Expand Up @@ -322,6 +325,7 @@ L["Enter the spell\'s cooldown duration.|nParty watcher only support regular spe
L["Enter unit name or NPC ID. Use key SPACE between different units."] = "Введите имя или ID NPC. Используйте ПРОБЕЛ между различными ID."
L["Equipement Set"] = "Набор Экипировки"
L["Equipped Item Border"] = "Границы экипировки"
L["Europe"] = true
L["Execute Indicator"] = "Индикатор добивания"
L["Execute Ratio"] = "Коэффициент выполнения"
L["Existing ID"] = "Существущий ID"
Expand Down Expand Up @@ -399,7 +403,6 @@ L["Height"] = "Высота"
L["Hello"] = "Првиет"
L["Hidden"] = "Скрытый"
L["Hidden in Combat"] = true
L["Hide Anima Buffs Frame"] = "Скрыть баффы анимы"
L["Hide Boss Banner"] = "Скрыть баннер босса"
L["Hide Boss Emote"] = "Скрыть эмоции босса"
L["Hide Guild Rank"] = "Скрыть ранг гильдии"
Expand All @@ -411,7 +414,6 @@ L["Hide chat frame in combat"] = "Скрывать чат в бою"
L["Hide cooldown count on WeakAuras."] = true
L["Hide in Combat"] = "Скрыть в бою"
L["Hide minimap automatically after enter combat and restores it after leave combat."] = true
L["Hide the anima buffs frame from Mythic+ Dungeon and Tarragrue."] = "Скрывать баффы анимы в М+ подземельях и в торгасте"
L["Hide the banner and loot list after the boss is killed."] = "Скрыть лут после убийства босса"
L["Hide the emote and whisper from boss during battle."] = "Скрывать эмоции и лс в бою с боссом"
L["Hide the frame"] = "Скрыть фрейм"
Expand Down Expand Up @@ -471,6 +473,7 @@ L["Key"] = "Клавиша"
L["Key Binding"] = "Привязка клавиш"
L["Keybinds discarded."] = "Привязка клавишь сброшенна"
L["Keybinds saved."] = "Привзяка клавишь сохранена."
L["Korea"] = true
L["Korthia Relics"] = "Реликвии Кортии"
L["LEFT"] = "ЛЕВО"
L["LEFT_DOWN"] = "ЛЕВО_НИЗ"
Expand Down Expand Up @@ -702,6 +705,7 @@ L["Swap Icons Side"] = "Поменять иконки местами"
L["Switch Mode"] = "Режим переключения"
L["Sync Party Watcher"] = "Синхронизировать Party Watcher"
L["System Stats"] = "Системные статусы"
L["Taiwan"] = true
L["Take All"] = "Взять все"
L["Take screenshots automatically based on specific events."] = "Делать автоматические скриншоты в зависимости от выбранных настроек"
L["Target Castbar"] = "Кастбар цели"
Expand Down
8 changes: 6 additions & 2 deletions locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ L["Actionbar"] = "动作条"
L["Add Contacts"] = true
L["Add flash animation to the pressed actionbar buttons."] = true
L["Add font outline globally, if you run the game with a low resolution, this option may improve the clarity of the interface text."] = true
L["Add group tool at the top of the screen."] = true
L["Add micro menu bar at the bottom of the screen."] = true
L["Add shadow border to most of UI widgets."] = true
L["Add shadowed overlay to screen corner."] = true
Expand All @@ -52,6 +53,7 @@ L["All Buffs Ready!"] = true
L["All keybinds cleared for %s."] = "%s 绑定的所有按键已清除。"
L["Allow space bar, escape key and enter key to cancel cinematic without confirmation."] = true
L["Alt+Click to buy a stack"] = true
L["America"] = true
L["Anchor To Top"] = true
L["Anchor the editbox to the bottom."] = true
L["Announce Important Informations"] = true
Expand Down Expand Up @@ -139,6 +141,7 @@ L["Chat"] = "聊天"
L["Chat Text Fading"] = true
L["Chat Window Size"] = "聊天框大小"
L["Check Flask & Food"] = "检查合剂食物"
L["China"] = true
L["Class Color"] = true
L["Class Color Customization"] = "职业颜色自定义"
L["Class Power"] = true
Expand Down Expand Up @@ -322,6 +325,7 @@ L["Enter the spell\'s cooldown duration.|nParty watcher only support regular spe
L["Enter unit name or NPC ID. Use key SPACE between different units."] = true
L["Equipement Set"] = "装备方案"
L["Equipped Item Border"] = true
L["Europe"] = true
L["Execute Indicator"] = true
L["Execute Ratio"] = true
L["Existing ID"] = true
Expand Down Expand Up @@ -399,7 +403,6 @@ L["Height"] = "高度"
L["Hello"] = true
L["Hidden"] = true
L["Hidden in Combat"] = true
L["Hide Anima Buffs Frame"] = true
L["Hide Boss Banner"] = true
L["Hide Boss Emote"] = true
L["Hide Guild Rank"] = "隐藏公会级别"
Expand All @@ -411,7 +414,6 @@ L["Hide chat frame in combat"] = true
L["Hide cooldown count on WeakAuras."] = true
L["Hide in Combat"] = "战斗中隐藏"
L["Hide minimap automatically after enter combat and restores it after leave combat."] = true
L["Hide the anima buffs frame from Mythic+ Dungeon and Tarragrue."] = true
L["Hide the banner and loot list after the boss is killed."] = true
L["Hide the emote and whisper from boss during battle."] = true
L["Hide the frame"] = "隐藏面板"
Expand Down Expand Up @@ -471,6 +473,7 @@ L["Key"] = "按键"
L["Key Binding"] = true
L["Keybinds discarded."] = "按键绑定已撤销。"
L["Keybinds saved."] = "按键绑定已保存。"
L["Korea"] = true
L["Korthia Relics"] = "档案员圣物"
L["LEFT"] = true
L["LEFT_DOWN"] = true
Expand Down Expand Up @@ -702,6 +705,7 @@ L["Swap Icons Side"] = true
L["Switch Mode"] = true
L["Sync Party Watcher"] = true
L["System Stats"] = true
L["Taiwan"] = true
L["Take All"] = true
L["Take screenshots automatically based on specific events."] = true
L["Target Castbar"] = true
Expand Down
3 changes: 2 additions & 1 deletion modules/chat/abbr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ local function addMessage(chatFrame, msg, ...)

-- remove realm and bracket
msg = msg:gsub('|Hplayer:(.-)|h%[(.-)%]|h', formatPlayer)
msg = msg:gsub('|HBNplayer:(.-)|h%[(.-)%]|h', formatBNPlayer)
-- msg = msg:gsub('|HBNplayer:(.-)|h%[(.-)%]|h', formatBNPlayer)


msg = msg:gsub('|Hchannel:(.-)|h%[(.-)%]|h', formatChannel)

Expand Down
16 changes: 11 additions & 5 deletions modules/unitframe/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ function UNITFRAME.PostCreateIcon(element, button)

local style = element.__owner.unitStyle
local isGroup = style == 'party' or style == 'raid'
local isNP = style == 'nameplate'

if isGroup then
button.icon:SetTexCoord(unpack(C.TEX_COORD))
elseif isNP then
button.icon:SetTexCoord(.1,.9,.26,.74) -- precise texcoord for rectangular icons
else
button.icon:SetTexCoord(.1, .9, .22, .78) -- precise texcoord for rectangular icons
end
Expand Down Expand Up @@ -127,12 +130,15 @@ function UNITFRAME.PostUpdateIcon(element, unit, button, index, _, duration, exp

local style = element.__owner.unitStyle
local isGroup = style == 'party' or style == 'raid'
button:SetSize(element.size, isGroup and element.size or element.size * .7)
local isNP = style == 'nameplate'
button:SetSize(element.size, (isGroup and element.size) or (isNP and element.size * .6) or element.size * .7)

--[[ local squareness = .7
--[[ local squareness = .6
element.icon_height = element.size * squareness
element.icon_ratio = (1 - (element.icon_height / element.size)) / 2.5
element.tex_coord = {.1,.9,.1+element.icon_ratio,.9-element.icon_ratio} ]]
element.tex_coord = {.1,.9,.1+element.icon_ratio,.9-element.icon_ratio}
print('element.icon_height', element.icon_height)
print('element.icon_ratio', element.icon_ratio) ]]

local _, _, _, _, _, _, _, canStealOrPurge = UnitAura(unit, index, button.filter)
if element.desaturateDebuff and button.isDebuff and filteredUnits[style] and not button.isPlayer then
Expand Down Expand Up @@ -466,7 +472,7 @@ function NAMEPLATE:CreateAuras(self)
bu.spacing = 4
bu.numTotal = 32
bu.initialAnchor = 'BOTTOMLEFT'
bu:SetPoint('BOTTOM', self, 'TOP', 0, 12)
bu:SetPoint('BOTTOM', self, 'TOP', 0, 16)
bu['growth-x'] = 'RIGHT'
bu['growth-y'] = 'UP'
bu.iconsPerRow = C.DB.Nameplate.AuraPerRow
Expand Down Expand Up @@ -548,7 +554,7 @@ function UNITFRAME.GroupDebuffFilter(element, _, _, _, _, _, _, _, _, caster, _,
return false
elseif (C.DB.Unitframe.CornerIndicator and UNITFRAME.CornerSpellsList[spellID]) or parent.DebuffWatcher.spellID == spellID or parent.rawSpellID == spellID then
return false
elseif isBossAura or SpellIsPriorityAura(spellID) then
elseif isBossAura then
return true
else
local hasCustom, alwaysShowMine, showForMySpec = SpellGetVisibilityInfo(spellID, UnitAffectingCombat('player') and 'RAID_INCOMBAT' or 'RAID_OUTOFCOMBAT')
Expand Down
60 changes: 34 additions & 26 deletions modules/unitframe/castbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,15 @@ function UNITFRAME:OnCastbarUpdate(elapsed)
return
end

if self.__owner.unit == 'player' then
-- if self.delay ~= 0 then
-- self.Time:SetFormattedText(decimal .. ' | |cffff0000' .. decimal, duration, self.casting and self.max + self.delay or self.max - self.delay)
-- else
-- self.Time:SetFormattedText(decimal .. ' | ' .. decimal, duration, self.max)
-- if self.Lag and self.SafeZone and self.SafeZone.timeDiff and self.SafeZone.timeDiff ~= 0 then
-- self.Lag:SetFormattedText('%d ms', self.SafeZone.timeDiff * 1000)
-- end
-- end
self.Time:SetFormattedText(decimal, self.max - duration)
else
if duration > 1e4 then
self.Time:SetText('')
else
--self.Time:SetFormattedText(decimal .. ' | ' .. decimal, duration, self.casting and self.max + self.delay or self.max - self.delay)
if self.Time then
if self.__owner.unit == 'player' then
self.Time:SetFormattedText(decimal, self.max - duration)
else
if duration > 1e4 then
self.Time:SetText('')
else
self.Time:SetFormattedText(decimal, self.max - duration)
end
end
end

Expand Down Expand Up @@ -199,6 +192,10 @@ function UNITFRAME:PostCastStart(unit)
-- Spell target
UpdateSpellTarget(self, unit)
end




end

function UNITFRAME:PostCastUpdate(unit)
Expand Down Expand Up @@ -251,6 +248,9 @@ function UNITFRAME:PostCastFailed()
self:Show()

ResetSpellTarget(self)



end

local function UpdateSpellTarget_OnEvent(self, _, unit)
Expand Down Expand Up @@ -392,11 +392,11 @@ function UNITFRAME:CreateNamePlateCastBar(self)
text:SetShown(not compact)
castbar.Text = text

local time = F.CreateFS(castbar, font, 11, outline, '', nil, outline or 'THICK')
time:SetPoint('RIGHT')
time:SetShown(not compact)
castbar.Time = time
castbar.Decimal = '%.1f'
-- local time = F.CreateFS(castbar, font, 11, outline, '', nil, outline or 'THICK')
-- time:SetPoint('RIGHT')
-- time:SetShown(not compact)
-- castbar.Time = time
-- castbar.Decimal = '%.1f'

local icon = castbar:CreateTexture(nil, 'ARTWORK')
icon:SetTexCoord(unpack(C.TEX_COORD))
Expand Down Expand Up @@ -433,13 +433,21 @@ function UNITFRAME:CreateNamePlateCastBar(self)
castbar.glowFrame:SetPoint('CENTER', castbar.Icon)

-- Spell target
local spellTarget = F.CreateFS(castbar, C.Assets.Font.Bold, 11, outline, '', nil, outline or 'THICK')
spellTarget:ClearAllPoints()
spellTarget:SetJustifyH('CENTER')
spellTarget:SetPoint('TOP', castbar, 'BOTTOM', 0, -4)
castbar.spellTarget = spellTarget
-- local spellTarget = F.CreateFS(castbar, C.Assets.Font.Bold, 14, outline, '', nil, outline or 'THICK')
-- spellTarget:ClearAllPoints()
-- spellTarget:SetJustifyH('CENTER')
-- spellTarget:SetPoint('TOP', castbar, 'BOTTOM', 0, -4)
-- castbar.spellTarget = spellTarget

-- self:RegisterEvent('UNIT_TARGET', UpdateSpellTarget_OnEvent)








self:RegisterEvent('UNIT_TARGET', UpdateSpellTarget_OnEvent)

castbar.OnUpdate = UNITFRAME.OnCastbarUpdate
castbar.PostCastStart = UNITFRAME.PostCastStart
Expand Down
Loading

0 comments on commit c6995bd

Please sign in to comment.