View Single Post
01/03/21, 04:51 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
The hook should work as the ACHIEVEMENTS global exists, is the correct object of the Achievment class.
I've read the code this way:
https://github.com/esoui/esoui/blob/...ents.lua#L1893

Called by the XML's OnInitialized event -> ZO_Achievements_OnInitialize(self) -> ACHIEVEMENTS = Achievements:New(self) ->
https://github.com/esoui/esoui/blob/...ments.lua#L949
-> object:Initialize(...) -> https://github.com/esoui/esoui/blob/...ments.lua#L963
-> function Achievements:Initialize(control) -> self:InitializeSummary()
-> function Achievements:InitializeSummary()

Maybe it was done before the chat output is ready so you are not seeing it (will first be visible at event_player_activated!).
-> Install the addon pChat which should fix this.
-> OR/AND use the LibDebugLogger and the DebugLogViewer UI to see the addon debug messages prior the chat output is ready + stored in your SavedVariables.

Edit1: I've added your code to any of my addons event_player_activated callback function and I also do not see it.

Edit2:
I think it is because the Achievements "class" is defined local:
--[[ Achievements ]]--
local Achievements = ZO_Object:Subclass()

And it's not a ZO_Achievements global variable. I guess this is intended so noone can manipulate the summaries etc.

The only globals are the ones at the bottom of the file below
--[[ XML Handlers ]]--

Last edited by Baertram : 01/03/21 at 05:04 PM.
  Reply With Quote