View Single Post
08/22/14, 02:30 AM   #14
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by circonian View Post
Oh, yeah your right it is local.
No I hadn't looked at it, but I see you were all ready doing what I suggested.

Looks like it would work to me. Although I think you could get rid of one of the loops by doing this:

Warning: Spoiler


EDIT:
Or I may have spoke to soon. I've never done any pvp/raid stuff. I have no idea how any of it even works. I may be wrong about what I said above...I thought this memberIndex:
Lua Code:
  1. local numMembers = GetNumRaidScoreNotificationMembers(notificationId)
  2.         local hasFriend = false
  3.         local hasGuildMember = false
  4.         for memberIndex = 1, numMembers do
  5.             local displayName, characterName, isFriend, isGuildMember = GetRaidScoreNotificationMemberInfo(notificationId, memberIndex)

was refering to the same memberIndex used for a guild members index,
Lua Code:
  1. local displayName = GetGuildMemberInfo(guildId, memberIndex)

but I read it again and think they might not be the same? Does the first one refer to memberIndex as the "memberIndex" for members of a raid party (people involved in that notification)? If so what I said would not work.
The first member index is in the raid group and it's not the same as member index in guild.

Originally Posted by circonian View Post
Sorry for the jumble of 1,000 different ideas :P and I still see nothing wrong with what you did, but another option is that you could also hook: NOTIFICATIONS:BuildMasterList().

It would be the same result as what you did so this may not be useful for what your doing, but I saw it & thought I would point it out in case you (or anyone else reading this post later) had any reason to hook any other notifications it might be easier to grab them all in one place:
Lua Code:
  1. -- hook this:
  2. function ZO_NotificationManager:BuildMasterList()
  3.     for i = 1, #self.providers do
  4.         self.providers[i]:BuildNotificationList()
  5.     end
  6. end
  7. -- with this:
  8. --function NOTIFICATIONS:BuildMasterList()

and just intercept self.providers[10] (or whatever provider is needed).
ZO_NotificationManager is a local name, so if I want to do it this way I will have to hook NOTIFICATIONS
(global instance of ZO_NotificationManager). But I think that for my purpose is better to hook directly instance of ZO_LeaderboardRaidProvider which is NOTIFICATIONS.providers[10].
  Reply With Quote