diff --git a/Addon/ElvUI_mMediaTag/modules/Dock/mLFDTool.lua b/Addon/ElvUI_mMediaTag/modules/Dock/mLFDTool.lua index 57d72ec0..2b2491c3 100644 --- a/Addon/ElvUI_mMediaTag/modules/Dock/mLFDTool.lua +++ b/Addon/ElvUI_mMediaTag/modules/Dock/mLFDTool.lua @@ -113,6 +113,7 @@ end local function mLFDTooltip() local _, hc, myth, mythp, other, title, tip = mMT:mColorDatatext() + local isMaxLevel = E:XPIsLevelMax() mInstanceInfoText = mMT:InstanceInfo() if mInstanceInfoText then @@ -122,7 +123,7 @@ local function mLFDTooltip() DT.tooltip:AddLine(mInstanceInfoText[3]) end - if E.Retail and E.db.mMT.dockdatatext.lfd.keystone then + if E.Retail and E.db.mMT.dockdatatext.lfd.keystone and isMaxLevel then keyText = mMT:OwenKeystone() if keyText then DT.tooltip:AddLine(" ") @@ -131,7 +132,7 @@ local function mLFDTooltip() end end - if E.Retail and E.db.mMT.dockdatatext.lfd.score then + if E.Retail and E.db.mMT.dockdatatext.lfd.score and isMaxLevel then DT.tooltip:AddLine(" ") DT.tooltip:AddDoubleLine(DUNGEON_SCORE, mMT:GetDungeonScore()) end @@ -149,7 +150,7 @@ local function mLFDTooltip() end end - if E.Retail and E.db.mMT.dockdatatext.lfd.greatvault and UnitLevel("player") == 70 then + if E.Retail and E.db.mMT.dockdatatext.lfd.greatvault and isMaxLevel then local vaultinfohighest, ok = nil, false vaultinforaidText, vaultinfomplusText, vaultinfopvpText, vaultinfohighest, ok = mMT:mGetVaultInfo() if ok then diff --git a/Addon/ElvUI_mMediaTag/modules/datatexts/Dungeon.lua b/Addon/ElvUI_mMediaTag/modules/datatexts/Dungeon.lua index f4d8a2e3..1220344e 100644 --- a/Addon/ElvUI_mMediaTag/modules/datatexts/Dungeon.lua +++ b/Addon/ElvUI_mMediaTag/modules/datatexts/Dungeon.lua @@ -17,6 +17,8 @@ local C_ChallengeMode = C_ChallengeMode local mText = L["Dungeon"] local function mSetup(self) + local isMaxLevel = E:XPIsLevelMax() + local mInstanceInfo = mMT:InstanceInfo() if mInstanceInfo then DT.tooltip:AddLine(" ") @@ -41,7 +43,7 @@ local function mSetup(self) DT.tooltip:AddLine(infoMythicPlus[2] or "-") end - if E.Retail and E.db.mMT.dungeon.key then + if E.Retail and E.db.mMT.dungeon.key and isMaxLevel then local key = mMT:OwenKeystone() if key then DT.tooltip:AddLine(" ") @@ -50,7 +52,7 @@ local function mSetup(self) end end - if E.Retail and E.db.mMT.dungeon.score then + if E.Retail and E.db.mMT.dungeon.score and isMaxLevel then DT.tooltip:AddLine(" ") DT.tooltip:AddDoubleLine(DUNGEON_SCORE, mMT:GetDungeonScore()) end diff --git a/Addon/ElvUI_mMediaTag/modules/datatexts/Score.lua b/Addon/ElvUI_mMediaTag/modules/datatexts/Score.lua index ac99f090..f2939c24 100644 --- a/Addon/ElvUI_mMediaTag/modules/datatexts/Score.lua +++ b/Addon/ElvUI_mMediaTag/modules/datatexts/Score.lua @@ -34,6 +34,7 @@ local IconOverall = E:TextureString("Interface\\AddOns\\ElvUI_mMediaTag\\media\\ local IconTyrannical = E:TextureString("Interface\\AddOns\\ElvUI_mMediaTag\\media\\icons\\datatext\\tyrannical.tga", ":14:14") local IconFortified = E:TextureString("Interface\\AddOns\\ElvUI_mMediaTag\\media\\icons\\datatext\\fortified.tga", ":14:14") local LeadIcon = E:TextureString("Interface\\AddOns\\ElvUI_mMediaTag\\media\\icons\\misc\\crown1.tga", ":14:14") +local isMaxLevel = E:XPIsLevelMax() local function GetPlayerScore() local ratingSummary = C_PlayerInfo_GetPlayerMythicPlusRatingSummary("PLAYER") @@ -138,7 +139,7 @@ local function GetDungeonScores() if overAllScore then color = C_ChallengeMode_GetSpecificDungeonOverallScoreRarityColor(overAllScore) - ScoreTable[mapID].color = color and color:GenerateHexColor() or 'FFFFFFFF' + ScoreTable[mapID].color = color and color:GenerateHexColor() or "FFFFFFFF" else ScoreTable[mapID].color = "FFB2BABB" end @@ -156,7 +157,7 @@ local function GetDungeonScores() ScoreTable[mapID][affixScores[j].name].color = "FFB2BABB" else color = C_ChallengeMode_GetSpecificDungeonScoreRarityColor(affixScores[j].score) - ScoreTable[mapID][affixScores[j].name].color = color and color:GenerateHexColor() or 'FFFFFFFF' + ScoreTable[mapID][affixScores[j].name].color = color and color:GenerateHexColor() or "FFFFFFFF" end else if tmpName and tmpName == tyrannical then @@ -268,7 +269,7 @@ local function GetGroupKeystone() local mapName, _, _, icon = C_ChallengeMode.GetMapUIInfo(info.mythicPlusMapID) if mapName then local scoreColor = C_ChallengeMode_GetDungeonScoreRarityColor(info.rating) - scoreColor = scoreColor and scoreColor:GenerateHexColor() or 'FFFFFFFF' + scoreColor = scoreColor and scoreColor:GenerateHexColor() or "FFFFFFFF" icon = E:TextureString(icon, ":14:14") local key = format("%s %s%s|r %s", icon, E.db.mMT.datatextcolors.colormyth.hex, mapName, mMT:GetKeyColor(info.level)) @@ -283,16 +284,20 @@ local function GetGroupKeystone() end end local function OnEnter(self) + isMaxLevel = E:XPIsLevelMax() + local inCombat = InCombatLockdown() DT.tooltip:ClearLines() if not inCombat then SaveMyKeystone() - local keyText = mMT:OwenKeystone() - if keyText then - DT.tooltip:AddLine(keyText[1]) - DT.tooltip:AddLine(keyText[2]) + if isMaxLevel then + local keyText = mMT:OwenKeystone() + if keyText then + DT.tooltip:AddLine(keyText[1]) + DT.tooltip:AddLine(keyText[2]) + end end DT.tooltip:AddLine(" ") @@ -301,7 +306,7 @@ local function OnEnter(self) DT.tooltip:AddDoubleLine(v.name, v.key) end - if E.db.mMT.mpscore.groupkeys and LOR and IsInGroup() then + if E.db.mMT.mpscore.groupkeys and LOR and IsInGroup() and isMaxLevel then DT.tooltip:AddLine(" ") DT.tooltip:AddLine(L["Keystones in your Group"]) GetGroupKeystone() @@ -319,7 +324,7 @@ local function OnEnter(self) end end - if MPlusDataLoaded and GetPlayerScore() > 0 then + if isMaxLevel and MPlusDataLoaded and GetPlayerScore() > 0 then DT.tooltip:AddLine(" ") DT.tooltip:AddDoubleLine(DUNGEON_SCORE, mMT:GetDungeonScore()) DT.tooltip:AddLine(" ") @@ -334,23 +339,27 @@ local function OnEnter(self) DT.tooltip:Show() - self.text:SetFormattedText(displayString, mMT:GetDungeonScore()) + self.text:SetFormattedText(displayString, isMaxLevel and mMT:GetDungeonScore() or L["Level: "] .. E.mylevel) end local function OnEvent(self, event, ...) - if event == "ELVUI_FORCE_UPDATE" then - C_MythicPlus_RequestMapInfo() - C_MythicPlus_RequestCurrentAffixes() - elseif event == "MYTHIC_PLUS_CURRENT_AFFIX_UPDATE" then - affixes = C_MythicPlus_GetCurrentAffixes() - weeklyAffixID = affixes and affixes[1] and affixes[1].id - weeklyAffixName = weeklyAffixID and C_ChallengeMode_GetAffixInfo(weeklyAffixID) - MPlusDataLoaded = true - end + isMaxLevel = E:XPIsLevelMax() + + if isMaxLevel then + if event == "ELVUI_FORCE_UPDATE" then + C_MythicPlus_RequestMapInfo() + C_MythicPlus_RequestCurrentAffixes() + elseif event == "MYTHIC_PLUS_CURRENT_AFFIX_UPDATE" then + affixes = C_MythicPlus_GetCurrentAffixes() + weeklyAffixID = affixes and affixes[1] and affixes[1].id + weeklyAffixName = weeklyAffixID and C_ChallengeMode_GetAffixInfo(weeklyAffixID) + MPlusDataLoaded = true + end - SaveMyKeystone() + SaveMyKeystone() + end - self.text:SetFormattedText(displayString, mMT:GetDungeonScore()) + self.text:SetFormattedText(displayString, isMaxLevel and mMT:GetDungeonScore() or L["Level: "] .. E.mylevel) end local function ValueColorUpdate(self, hex)