cannot unregister EVENT_RAID_SCORE_NOTIFICATION_*
I am currently playing around with the notification system and have encountered some strangeness that I cannot explain to myself.
My test setup: Lua Code:
I expect this to hide the raid notifications until some other event refreshes the notification manager. When I load the addon I get: Code:
KeyboardNotifications When I already have got some of them in my notifications panel and press the delete button, it shows Code:
remove event Code:
[C]: in function 'error' Notifications_Common.lua:34 is inside the handler function that gets registered to both events in question and is - as far as I can see - never used anywhere else. Maybe somebody can explain to me what is happening. :( |
What is happening:
As you can see raid score notification will be eventually added to the list even if you unregister update events. |
Perhaps what you need to override is ZO_NotificationList:FilterScrollList()
edit: no, that wouldn't report correct numbers. So post-hook ZO_LeaderboardRaidProvider:BuildNotificationList(), removing undesired entries (which is all of them? if so, no need to call original, just ZO_ClearNumericallyIndexedTable(self.list) and done ;)) edit2: lol, exactly Garkin, I just edited it before reading your post :) |
Quote:
I think that's the best place where you can change which notifications will be displayed. If you modify FilterScrollList instead, I believe that when you receive new notification there will be glowing notification button on the chat window. It's becuae function just counts number of items on each notification list (#provider.list), it does not check if items are filtered or not. |
It's clear to me that it will trigger when any other notification event is fired, but that does not explain why it still happens in response to me clicking the delete button on a raid notification after I unregistered the EVENT_RAID_SCORE_NOTIFICATION_REMOVED event.
I will test it again with all other notification events unregistered in the evening. In that case the push function in line 34 should never be called, right? |
Quote:
|
Quote:
Quote:
|
Just tried to unregister every event related to notifications:
Lua Code:
The messages that were showing up when I revived obviously were caused by EVENT_PLAYER_ALIVE. When I join a campaign queue I get: Code:
EVENT_CAMPAIGN_QUEUE_JOINED |
Try unregistering for GAMEPAD_NOTIFICATIONS as well, not sure how they would only use one.
|
Lua Code:
You deserve a medal merlight! :banana: |
All times are GMT -6. The time now is 12:52 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI