1. Hello,

    I'm new on developing wow addon. In want my addon to show target highest rating in 2s and 3s Arena. This will be display in the "character info" tab when you inspect someone. Game version : 3.3.5

    Show rating

    I can get Highest rating information in achievements (Achievements -> Statistics -> Player vs Player).

    First I was looking for the event that fire when you inspect someone, but can't find it. The closest I find is INSPECT_HONOR_UPDATE but I want it for character tab instead of honor tab.

    Secondly when the "inspect" event fire, I need to scan highest rating. I've got absolutely no idea about how to do this and can't find anything on the web.

    edit : I found how to do it :

     /run SetAchievementComparisonUnit("target");
     /run rate = GetComparisonStatistic(370); print(rate);
    

    Finally I need to display it on the "character tab".

    I will appreciate any help, I'm a beginner but really want to do this addon.

    http://wowprogramming.com/docs/api/GetInspectArenaTeamData

    If you want to add some text to InspectWindow you need to know name of this Window.

    Use this code

     function OnModifierPressed()
     local frame = GetMouseFocus()
     if not frame then
      ChatFrame1:AddMessage("There is no mouse enabled frame under the cursor")
     else
      local name = frame:GetName() or tostring(frame)
      ChatFrame1:AddMessage(name .. "     has the mouse focus")
     end
     end
    
     --XXX :SetScript("OnEvent",OnModifierPressed)
     --XXX :RegisterEvent("MODIFIER_STATE_CHANGED") set this script to frame
    

    Thanks for your quick reply.

    I use this macro to get the inspect Frame name :

    /run message( "The mouse is over " .. GetMouseFocus():GetName() );

    As a result I know his name is InspectFrame.

    Which event should I use now to trigger when I inspect someone ?

    edit : I'm trying to use OnShow(self)

    i think you can use this : INSPECT_READY but i am not sure.