Thread Tools Display Modes
05-28-16, 01:31 AM   #1
Ginji
A Defias Bandit
 
Ginji's Avatar
Join Date: Aug 2013
Posts: 3
Hide "earned by" and "not completed by"

hy guys,
is there a way to hide the "earned by" and "not completed by" from achievements?
so that there is nothing?
  Reply With Quote
06-11-16, 03:24 AM   #2
varren
A Defias Bandit
AddOn Author - Click to view addons
Join Date: May 2016
Posts: 3
I think you can use this script

Code:
/script hooksecurefunc("AchievementFrame_LoadUI", function() for _, v in pairs(AchievementFrameAchievementsContainer.buttons) do v.shield:SetScript("OnEnter", nil) end end)
or make simple addon with same 1 liner in lua file

Code:
/script hooksecurefunc("AchievementFrame_LoadUI", function() for _, v in pairs(AchievementFrameAchievementsContainer.buttons) do v.shield:SetScript("OnEnter", nil) end end)
or you can setup some custom function instead of nil. Default behavior is on line 3447 of Blizzard_AchievementUI.lua

Lua Code:
  1. function AchievementShield_OnEnter(self)
  2.     local parent = self:GetParent();
  3.     GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
  4.     if ( parent.accountWide ) then
  5.         if ( parent.completed ) then
  6.             GameTooltip:AddLine(ACCOUNT_WIDE_ACHIEVEMENT_COMPLETED);
  7.         else
  8.             GameTooltip:AddLine(ACCOUNT_WIDE_ACHIEVEMENT);
  9.         end
  10.         GameTooltip:Show();
  11.         return;
  12.     end
  13.     if ( self.earnedBy ) then
  14.         GameTooltip:AddLine(format(ACHIEVEMENT_EARNED_BY,self.earnedBy));
  15.         local me = UnitName("player")
  16.         if ( not self.wasEarnedByMe ) then
  17.             GameTooltip:AddLine(format(ACHIEVEMENT_NOT_COMPLETED_BY, me));
  18.         elseif ( me ~= self.earnedBy ) then
  19.             GameTooltip:AddLine(format(ACHIEVEMENT_COMPLETED_BY, me));
  20.         end
  21.         GameTooltip:Show();
  22.         return;
  23.     end
  24.     -- pass-through to the achievement button
  25.     local func = parent:GetScript("OnEnter");
  26.     if ( func ) then
  27.         func(parent);
  28.     end
  29.  
  30.     AchievementFrameAchievements_CheckGuildMembersTooltip(self);
  31.     GameTooltip:Show();
  32. end
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Hide "earned by" and "not completed by"


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off