WoWInterface SVN CharAchievements

[/] [trunk/] [CharAchievements.lua] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 Phanx-28751
--[[--------------------------------------------------------------------
2 Phanx-28751
        CharAchievements
3 Phanx-28751
        Shows you only your current character's completed acheivements.
4 Phanx-28751
 
5 Phanx-28751
        Limitations:
6 Phanx-28751
 
7 Phanx-28751
        - This addon alters the functionality of a game API function, so it
8 Phanx-28751
          may interfere with the expected behavior of other achievement
9 Phanx-28751
          related addons.
10 Phanx-28751
 
11 Phanx-28751
        - This addon DOES NOT (and cannot) affect how other people see your
12 Phanx-28751
          achievements when they inspect you or view your character on the
13 Phanx-28751
          Battle.net website. If you want to limit which achievements other
14 Phanx-28751
          people can see, you need to enable the "Display Only Character
15 Phanx-28751
          Achievements to Others" option under Interface > Display.
16 Phanx-28751
          However, as of November 2012, this option does not appear to
17 Phanx-28751
          actually do anything. Please contact Blizzard to report the bug
18 Phanx-28751
          and request that they implement better privacy protections!
19 Phanx-28751
----------------------------------------------------------------------]]
20 Phanx-28751
 
21 Phanx-28751
local get = GetAchievementInfo
22 Phanx-28751
 
23 Phanx-28751
GetAchievementInfo = function(...)
24 Phanx-28751
        local id, name, points, completed, month, day, year, description, flags, image, rewardText, isGuild, wasEarnedByMe, earnedBy = get(...)
25 Phanx-28751
 
26 Phanx-28751
        if not wasEarnedByMe and not (completed and bit.band(flags, ACHIEVEMENT_FLAGS_ACCOUNT) == ACHIEVEMENT_FLAGS_ACCOUNT) then
27 Phanx-28751
                return id, name, points, false, nil, nil, nil, description, flags, image, rewardText, isGuild, false, nil
28 Phanx-28751
        end
29 Phanx-28751
 
30 Phanx-28751
        return id, name, points, wasEarnedByMe, month, day, year, description, flags, image, rewardText, isGuild, wasEarnedByMe, earnedBy
31 Phanx-28751
end