View Single Post
03/15/22, 08:27 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,027
The text "earned by" is this string constant:
"Earned by: <<1>>", -- SI_ACHIEVEMENT_EARNED_FORMATTER

If you search in the code for SI_ACHIEVEMENT_EARNED_FORMATTER you might find the place where it can be removed:
https://github.com/esoui/esoui/blob/...ments.lua#L861

You can overwrite the string constant with an empty string so the text is not shown anymore:
Lua Code:
  1. SafeAddString(SI_ACHIEVEMENT_EARNED_FORMATTER, "", 2)
or re-use ZO_CreateStringId but adding a newer versin 2 should be enough.


Else the tooltip control of achievements are created here:

Could be this control:
https://github.com/esoui/esoui/blob/...ments.xml#L270

ZO_AchievementTooltip

Connected to lua here:
https://github.com/esoui/esoui/blob/...ents.lua#L1480

Object:
ACHIEVEMENTS.tooltip

Function showing it:
https://github.com/esoui/esoui/blob/...ents.lua#L1752
ACHIEVEMENTS:ShowAchievementDetailedTooltip

Lua Code:
  1. ZO_PreHook(ACHIEVEMENTS, "ShowAchievementDetailedTooltip", function(selfAchievements, id, anchor)
  2.   return true --suppress call to original function
  3. end)

#Not tested, hope it works and was the correct one

If this was not intended you could also try to prehook the function and change the data in the function accordingly to your needs:

Lua Code:
  1. function Achievements:ShowAchievementDetailedTooltip(id, anchor)
  2. end
  3. ZO_PreHook(ACHIEVEMENTS, "ShowAchievementDetailedTooltip", function(selfAchievements, id, anchor)
  4.     selfAchievements.tooltip.parentControl:ClearAnchors()
  5.     anchor:Set(selfAchievements.tooltip.parentControl)
  6.  
  7.     --local progress = GetAchievementProgress(id)
  8.     local progress = 0 --chanegd to always use 0
  9.     local timestamp = GetAchievementTimestamp(id)
  10.     selfAchievements.tooltip:Show(id, progress, timestamp)
  11.   return true --suppress call to original function
  12. end)

Last edited by Baertram : 03/15/22 at 08:38 AM.
  Reply With Quote