Skip to content

Commit

Permalink
Merge pull request #46 from mBlinkii/dev
Browse files Browse the repository at this point in the history
Ver. 2.94
  • Loading branch information
mBlinkii authored Mar 22, 2023
2 parents f7b1a93 + 2e8e7d1 commit 22af245
Show file tree
Hide file tree
Showing 22 changed files with 244 additions and 25 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
[Eng] - All changes to this project will be documented in this file. The latest changes are at the top.
[Ger] - Alle Änderungen an diesem Projekt werden in dieser Datei dokumentiert. Die neuesten Änderungen stehen ganz oben.

## [ver. 2.94] - 22.03.2023
### Update
- UPDATE TOC update
- UPDATE Update NP Healthmarker
- UPDATE Currencys Icons to fit the text size

-- IMPORTANT INFO -- With the next version of mMediaTag, the settings of mMediaTag will be reset. This is done for optimisation and because over time many corpses have accumulated in the settings.

## [ver. 2.93] - 09.02.2023
### Update
- UPDATE Healthmarker IDs
Expand Down
4 changes: 2 additions & 2 deletions ElvUI_mMediaTag.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 100002
## Interface: 100007
## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r
## Author: Blinkii
## Version: 2.93
## Version: 2.94
## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de
## RequiredDeps: ElvUI
## DefaultState: Enabled
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_mMediaTag_Classic.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 11403
## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r
## Author: Blinkii
## Version: 2.93
## Version: 2.94
## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de
## RequiredDeps: ElvUI
## DefaultState: Enabled
Expand Down
14 changes: 10 additions & 4 deletions ElvUI_mMediaTag_Mainline.toc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
## Interface: 100002
## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r
## Interface: 100007
## Title: |cff1784d1ElvUI|r |CFF6559F1m|r|CFF7A4DEFM|r|CFF8845ECe|r|CFFA037E9d|r|CFFA435E8i|r|CFFB32DE6a|r|CFFBC26E5T|r|CFFCB1EE3a|r|CFFDD14E0g|r
## Author: Blinkii
## Version: 2.93
## Version: 2.94
## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de
## RequiredDeps: ElvUI
# RequiredDeps: ElvUI
## Dependencies: ElvUI
## DefaultState: Enabled
## X-Interface: 100005
## X-Tukui-ProjectID: 60
## X-Curse-Project-ID: 289502
## X-Wago-ID: 9rN48AND


locales\load_locales.xml
core\load_core.xml
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_mMediaTag_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 30401
## Title: |cff1784d1ElvUI|r |CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r
## Author: Blinkii
## Version: 2.93
## Version: 2.94
## Notes: ElvUI Plugin from Blinkii@Eu-Arygos | Support: mMediaTag@gmx.de
## RequiredDeps: ElvUI
## DefaultState: Enabled
Expand Down
123 changes: 123 additions & 0 deletions core/core.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
local ElvUI_EltreumUI, E, L, V, P, G = unpack(select(2, ...))


local E, _, V, P, G = unpack(ElvUI)
local EP = LibStub('LibElvUIPlugin-1.0')
local addon, Engine = ...
local _G = _G
local ElvUI_EltreumUI = E:NewModule(addon, 'AceHook-3.0', 'AceEvent-3.0', 'AceTimer-3.0', 'AceConsole-3.0')
local L = E.Libs.ACL:GetLocale("ElvUI", E.global.general.locale)
local GetAddOnMetadata = _G.GetAddOnMetadata

Engine[1] = ElvUI_EltreumUI
Engine[2] = E --ElvUI Engine
Engine[3] = L --ElvUI Locales
Engine[4] = V --ElvUI PrivateDB
Engine[5] = P --ElvUI ProfileDB
Engine[6] = G --ElvUI GlobalDB
_G[addon] = Engine




local E, L, V, P, G = unpack(ElvUI)
local mPlugin = "mMediaTag"
local mMT = E:NewModule(mPlugin, "AceHook-3.0", "AceEvent-3.0", "AceTimer-3.0")
local EP = _G.LibStub("LibElvUIPlugin-1.0")
local addon, ns = ...

--Variables
local wipe = table.wipe
ns.mName = "|CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r"
ns.mNameClassic = "|CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r |cffff0066Classic|r"
ns.mColor1 = "|CFFFFFFFF" -- white
ns.mColor2 = "|CFFF7DC6F" -- yellow
ns.mColor3 = "|CFF8E44AD" -- purple
ns.mColor4 = "|CFFFE7B2C" -- orange
ns.mColor5 = "|CFFE74C3C" -- red
ns.mColor6 = "|CFF58D68D" -- green
ns.mColor7 = "|CFF3498DB" -- blue
ns.mColor8 = "|CFFB2BABB" -- gray
ns.normal = "|CFF82E0AA" -- nomral
ns.Heroic = "|CFF85C1E9 " -- HC
ns.Mythic = "|CFFBB8FCE" -- Mythic
ns.mVersion = GetAddOnMetadata(addon, "Version") -- addon version
ns.LeftButtonIcon = format("|T%s:16:16:0:0:32:32|t", "Interface\\AddOns\\ElvUI_mMediaTag\\media\\misc\\mouse_l.tga") -- maus icon für ttip
ns.RightButtonIcon = format("|T%s:16:16:0:0:32:32|t", "Interface\\AddOns\\ElvUI_mMediaTag\\media\\misc\\mouse_r.tga") -- maus icon für ttip
ns.MiddleButtonIcon = format("|T%s:16:16:0:0:32:32|t", "Interface\\AddOns\\ElvUI_mMediaTag\\media\\misc\\mouse_m.tga") -- maus icon für ttip
ns.Config = {} -- addon einstellung werden hier gesammelt

-- einstellungen in elvui eintragen
function mMT:AddOptions()
for _, func in pairs(ns.Config) do
func()
end
end

function mMT:Check_ElvUI_EltreumUI()
return (IsAddOnLoaded("ElvUI_EltreumUI") and E.db.ElvUI_EltreumUI.unitframes.gradientmode.enable)
end

-- addon laden
function mMT:Initialize()
if E.db[mPlugin].mCustomClassColors.enable and not mMT:Check_ElvUI_EltreumUI() then
mMT:SetCustomColors()
end

if E.db[mPlugin].mCustomClassColors.emediaenable then
mMT:SetElvUIMediaColor()
end

mMT:mMisc() -- module laden

if E.Retail then
if E.db[mPlugin].mHealthmarker.enable or E.db[mPlugin].mExecutemarker.enable then
mMT:StartNameplateTools()
end

if E.db[mPlugin].mRoleSymbols.enable then
mMT:RegisterEvent("PLAYER_ENTERING_WORLD") -- events registrieren
end

if E.db[mPlugin].mExecutemarker.auto or E.db[mPlugin].mCastbar.enable then
mMT:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") -- events registrieren
end

if E.db[mPlugin].mInstanceDifficulty.enable then
mMT:RegisterEvent("UPDATE_INSTANCE_INFO")
mMT:RegisterEvent("CHALLENGE_MODE_START")
mMT:SetupInstanceDifficulty()
end
end

EP:RegisterPlugin(addon, mMT:AddOptions()) -- einstellungen in elvui eintragen
ns.Config = wipe(ns.Config) -- tabele löschen
end

function mMT:PLAYER_ENTERING_WORLD()
if E.db[mPlugin] then
if E.db[mPlugin].mRoleSymbols.enable then
mMT:mStartRoleSmbols() -- rolensymbole ändern
end
end
end

function mMT:ACTIVE_TALENT_GROUP_CHANGED()
if E.db[mPlugin].mCastbar.enable then
mMT:mUpdateKick() -- castbar kick/ kick auf cd
end

if E.db[mPlugin].mExecutemarker.auto then
mMT:updateAutoRange()
end
end

function mMT:UPDATE_INSTANCE_INFO()
mMT:UpdateText()
end

function mMT:CHALLENGE_MODE_START()
mMT:UpdateText()
end

E:RegisterModule(mMT:GetName()) -- addon in elvui registrieren
4 changes: 2 additions & 2 deletions core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ local addon, ns = ...

--Variables
local wipe = table.wipe
ns.mName = "|CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r"
ns.mNameClassic = "|CFF8E44ADm|r|CFF2ECC71Media|r|CFF3498DBTag|r |cffff0066Classic|r"
ns.mName = "|CFF6559F1m|r|CFF7A4DEFM|r|CFF8845ECe|r|CFFA037E9d|r|CFFA435E8i|r|CFFB32DE6a|r|CFFBC26E5T|r|CFFCB1EE3a|r|CFFDD14E0g|r"
ns.mNameClassic = "|CFF6559F1m|r|CFF7A4DEFM|r|CFF8845ECe|r|CFFA037E9d|r|CFFA435E8i|r|CFFB32DE6a|r|CFFBC26E5T|r|CFFCB1EE3a|r|CFFDD14E0g|r |cffff0066Classic|r"
ns.mColor1 = "|CFFFFFFFF" -- white
ns.mColor2 = "|CFFF7DC6F" -- yellow
ns.mColor3 = "|CFF8E44AD" -- purple
Expand Down
2 changes: 1 addition & 1 deletion core/mChangelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local format = format

--Variables
local ChangelogText =
"## [ver. 2.93] - 09.02.2023\n### Update\n- |CFFFF7F50Update|r Healthmarker IDs\n- |CFFFF7F50Update|r LFD icon events, so the difficulty is displayed correctly\n### Added\n- |CFF6495EDNEW|r Datatext M+ Score\n- |CFF6495EDNEW|r Icons for Dock and Tags"
"## [ver. 2.94] - 22.03.2023\n\n### Update\n- |CFFFF7F50Update|r TOC update\n- |CFFFF7F50Update|r Update NP Healthmarker\n- |CFFFF7F50Update|r Currencys Icons to fit the text size\n\n\n\n\n|CFF6495EDIMPORTANT INFO -- With the next version of mMediaTag, the settings of mMediaTag will be reset. This is done for optimisation and because over time many corpses have accumulated in the settings.|r"

function mMT:Changelog(opt)
local Frame = CreateFrame("Frame", "mMediaTagChangelog", E.UIParent, "BackdropTemplate")
Expand Down
4 changes: 2 additions & 2 deletions core/mFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ function mMT:mNamePlateBorderColor()
E.db["nameplates"]["colors"]["glowColor"]["g"] = classColor.g
end

function mMT:mIcon(icon)
return format("|T%s:16:16:0:0:64:64:4:60:4:60|t", icon)
function mMT:mIcon(icon, x, y)
return format("|T%s:%s:%s:0:0:64:64:4:60:4:60|t", icon, x or 16, y or 16)
end

function mMT:mCurrencyLink(id)
Expand Down
2 changes: 1 addition & 1 deletion core/mOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -962,4 +962,4 @@ if E.Retail then
mInsert(ns.Config, OptionsCore)
else
mInsert(ns.Config, OptionsCoreClassic)
end
end
5 changes: 5 additions & 0 deletions core/settings/defaultSettings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
local mMT, E, L, V, P, G = unpack(select(2, ...))

P["mMT"] = {

}
4 changes: 4 additions & 0 deletions core/settings/load_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="defaultSettings.lua"/>
<Script file="main.lua"/>
</Ui>
Empty file added core/settings/main.lua
Empty file.
69 changes: 69 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
local E, _, V, P, G = unpack(ElvUI)
local EP = LibStub('LibElvUIPlugin-1.0')
local L = E.Libs.ACL:GetLocale("ElvUI", E.global.general.locale)

-- Addon Name and Namespace
local addonName, addon = ...

local mMT = E:NewModule(addonName, 'AceHook-3.0', 'AceEvent-3.0', 'AceTimer-3.0', 'AceConsole-3.0')

--Cache Lua / WoW API
local _G = _G
local collectgarbage = collectgarbage
local format = format
local hooksecurefunc = hooksecurefunc
local next = next
local print = print
local tonumber = tonumber

local GetAddOnMetadata = _G.GetAddOnMetadata

addon[1] = mMT
addon[2] = E --ElvUI Engine
addon[3] = L --ElvUI Locales
addon[4] = V --ElvUI PrivateDB
addon[5] = P --ElvUI ProfileDB
addon[6] = G --ElvUI GlobalDB
_G[addonName] = addon

--Constants
mMT.Version = GetAddOnMetadata(addonName, 'Version')
mMT.Name = "|CFF6559F1m|r|CFF7A4DEFM|r|CFF8845ECe|r|CFFA037E9d|r|CFFA435E8i|r|CFFB32DE6a|r|CFFBC26E5T|r|CFFCB1EE3a|r|CFFDD14E0g|r"
mMT.Config = {}

-- Load Settings
function mMT:addSettings()
for _, func in pairs(mMT.Config) do
func()
end
end

-- Initialize Addon
function mMT:Initialize()
EP:RegisterPlugin(addonName, mMT:addSettings())
print(E.Options.name)

if E.Retail then
print(E.Options.name)
end

E:Delay(1, collectgarbage, "collect")
end

function mMT:PLAYER_ENTERING_WORLD()

end

function mMT:ACTIVE_TALENT_GROUP_CHANGED()

end

function mMT:UPDATE_INSTANCE_INFO()

end

function mMT:CHALLENGE_MODE_START()

end

E:RegisterModule(mMT:GetName())
4 changes: 2 additions & 2 deletions misc/CurrencyDF/DragonIslesSupplies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ local function OnEvent(self, event, ...)

if E.db[mPlugin].mDragonIslesSupplies.icon then
if TextJustify == "RIGHT" then
name = format("%s %s", name, mMT:mIcon(info.iconFileID))
name = format("%s %s", name, mMT:mIcon(info.iconFileID, 12, 12))
else
name = format("%s %s", mMT:mIcon(info.iconFileID), name)
name = format("%s %s", mMT:mIcon(info.iconFileID, 12, 12), name)
end
end

Expand Down
4 changes: 2 additions & 2 deletions misc/CurrencyDF/ElementalOverflow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ local function OnEvent(self, event, ...)

if E.db[mPlugin].mElementalOverflow.icon then
if TextJustify == "RIGHT" then
name = format("%s %s", name, mMT:mIcon(info.iconFileID))
name = format("%s %s", name, mMT:mIcon(info.iconFileID, 12, 12))
else
name = format("%s %s", mMT:mIcon(info.iconFileID), name)
name = format("%s %s", mMT:mIcon(info.iconFileID, 12, 12), name)
end
end

Expand Down
4 changes: 2 additions & 2 deletions misc/CurrencyDungeon/TimewarpedBadge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ local function OnEvent(self, event, ...)

if E.db[mPlugin].mTimewarpedBadge.icon then
if TextJustify == "RIGHT" then
name = format("%s %s", name, mMT:mIcon(info.iconFileID))
name = format("%s %s", name, mMT:mIcon(info.iconFileID, 12, 12))
else
name = format("%s %s", mMT:mIcon(info.iconFileID), name)
name = format("%s %s", mMT:mIcon(info.iconFileID, 12, 12), name)
end
end

Expand Down
4 changes: 2 additions & 2 deletions misc/CurrencyDungeon/Valor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ local function OnEvent(self, event, ...)

if E.db[mPlugin].mValor.icon then
if TextJustify == "RIGHT" then
name = format("%s %s", name, mMT:mIcon(info.iconFileID))
name = format("%s %s", name, mMT:mIcon(info.iconFileID, 12, 12))
else
name = format("%s %s", mMT:mIcon(info.iconFileID), name)
name = format("%s %s", mMT:mIcon(info.iconFileID, 12, 12), name)
end
end

Expand Down
4 changes: 2 additions & 2 deletions misc/CurrencyPvP/Conquest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ local function OnEvent(self, event, ...)

if E.db[mPlugin].mConquest.icon then
if TextJustify == "RIGHT" then
name = format("%s %s", name, mMT:mIcon(info.iconFileID))
name = format("%s %s", name, mMT:mIcon(info.iconFileID, 12, 12))
else
name = format("%s %s", mMT:mIcon(info.iconFileID), name)
name = format("%s %s", mMT:mIcon(info.iconFileID, 12, 12), name)
end
end

Expand Down
4 changes: 3 additions & 1 deletion misc/mMPScore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local addon, ns = ...

local displayString = ''

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

local keyText = mMT:OwenKeystone()
Expand All @@ -31,6 +31,8 @@ local function OnEnter()
DT.tooltip:AddDoubleLine(DUNGEON_SCORE, mMT:GetDungeonScore())

DT.tooltip:Show()

self.text:SetFormattedText(displayString, mMT:GetDungeonScore())
end

local function OnEvent(self)
Expand Down
1 change: 1 addition & 0 deletions misc/mNameplateTools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ local HM_NPCs = {

-- Pandaria Dungeons
[59544] = { 50 }, --The Nodding Tiger
[56732] = { 70, 30 }, --Liu Flammenherz

-- ***RAID***
-- DF Raid
Expand Down
Loading

0 comments on commit 22af245

Please sign in to comment.