What is happening:
- Lets trigger any notification event, other then raid score. For example EVENT_CAMPAIGN_QUEUE_JOINED:
Lua Code:
EVENT_MANAGER:RegisterForEvent(self.notificationManager.eventNamespace, event, self.pushUpdateCallback)
translated to global reference it is:
Lua Code:
EVENT_MANAGER:RegisterForEvent("KeyboardNotifications", EVENT_CAMPAIGN_QUEUE_JOINED, NOTIFICATIONS.providers[3].pushUpdateCallback)
- NOTIFICATIONS.providers[3].pushUpdateCallback
Lua Code:
provider.pushUpdateCallback = function()
provider:PushUpdateToNotificationManager()
end
- NOTIFICATIONS.providers[3]:PushUpdateToNotificationManager()
Lua Code:
function ZO_NotificationProvider:PushUpdateToNotificationManager()
self:BuildNotificationList()
self.notificationManager:RefreshNotificationList()
end
- NOTIFICATIONS.providers[3].notificationManager:RefreshNotificationList() == NOTIFICATIONS:RefreshNotificationList()
Lua Code:
function ZO_NotificationManager:RefreshNotificationList()
self:ClearNotificationList()
self:BuildNotificationList()
self:FinishNotificationList()
end
- NOTIFICATIONS:BuildNotificationList()
Lua Code:
function ZO_NotificationManager:BuildNotificationList()
for i = 1, #self.providers do
self.providers[i]:BuildNotificationList()
end
--rest of the original code
end
- NOTIFICATIONS.providers[10]:BuildNotificationList() - NOTIFICATIONS.providers[10] is an instance of ZO_KeyboardLeaderboardRaidProvider
As you can see raid score notification will be eventually added to the list even if you unregister update events.