View Single Post
04-23-22, 07:09 AM   #1
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Is it possible for others players ?

Hi all,

I am trying to put a m+ score in the tooltip, using the function:

C_PlayerInfo.GetPlayerMythicPlusRatingSummary(name).currentSeasonScore

But it works only for me



The code is:

Lua Code:
  1. if event == "UPDATE_MOUSEOVER_UNIT" then
  2.         if (UnitIsPlayer("mouseover")) then
  3.             local name,realm = UnitFullName("mouseover")
  4.            
  5.             -- realm is needed ?
  6.             if realm == nil then
  7.                 realm = GetRealmName()
  8.             end
  9.            
  10.             local score = C_PlayerInfo.GetPlayerMythicPlusRatingSummary(name).currentSeasonScore
  11.             local r, g, b = C_ChallengeMode.GetDungeonScoreRarityColor(C_PlayerInfo.GetPlayerMythicPlusRatingSummary(name).currentSeasonScore):GetRGB()
  12.    
  13.             GameTooltip:AddLine(" ")
  14.             GameTooltip:AddDoubleLine("Mythic+ score",score,1,1,0,r,g,b)       
  15.             GameTooltip:Show()
  16.         end
  17.     end

The links to the function on wowpedia is this:
https://wowpedia.fandom.com/wiki/API...sRatingSummary

and it states:
Returns the players mythic+ rating summary which includes the runs they've completed as well as their current season m+ rating

Now I am not a native speakers but this could be understood also as other players as well ...

Thanks for any help
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote