View Single Post
04-24-22, 10:01 AM   #3
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Hi Ketho,

now it works thanks to your input and tips.

I have tried also with unitid in my past tries but I use in a wrongly way.

I used:

Lua Code:
  1. guid = UnitGUID("unit")

and then that value in the function to calculate the score.
But it doesn't work.

Now following your suggest I change the code in this way and it works nicely:

Lua Code:
  1. if event == "UPDATE_MOUSEOVER_UNIT" then
  2.         if (UnitIsPlayer("mouseover")) then
  3.             local score = C_PlayerInfo.GetPlayerMythicPlusRatingSummary("mouseover").currentSeasonScore
  4.             local r, g, b = C_ChallengeMode.GetDungeonScoreRarityColor(C_PlayerInfo.GetPlayerMythicPlusRatingSummary("mouseover").currentSeasonScore):GetRGB()
  5.             GameTooltip:AddLine(" ")
  6.             GameTooltip:AddDoubleLine("Mythic+ score",score,1,1,0,r,g,b)       
  7.             GameTooltip:Show()
  8.         end
  9.     end

Don't know why it didn't work in other way :/
But now it works and I am happy




Thanks so much for you tips.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.

Last edited by gmarco : 04-24-22 at 10:05 AM.
  Reply With Quote