Thread Tools Display Modes
Prev Previous Post   Next Post Next
08/21/14, 07:29 PM   #6
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Garkin View Post
If you want to completely disable raid leaderboard notifications, just unregister notifications provider:
Lua Code:
  1. EVENT_MANAGER:UnregisterForEvent("Notifications", EVENT_RAID_SCORE_NOTIFICATION_ADDED)
  2. EVENT_MANAGER:UnregisterForEvent("Notifications", EVENT_RAID_SCORE_NOTIFICATION_REMOVED)

Right now I'm trying to figure out how to disable notifications just for selected guilds.
I dont mess with pvp stuff, so I may be way off on what your trying to do, or there may be a better way but at a quick glance it looks like you could you hook this:
Lua Code:
  1. -- Notifications.lua Line 462 --
  2. function ZO_LeaderboardRaidProvider:BuildNotificationList()

Grab the raid score notifications yourself & check to see if the person is a guild member (you could also set options for showing friend notifications as well while your here it seems):
Lua Code:
  1. for notificationIndex = 1, GetNumRaidScoreNotifications() do
  2.         local notificationId = GetRaidScoreNotificationId(notificationIndex)
  3.         local raidId, raidScore, millisecondsSinceRequest = GetRaidScoreNotificationInfo(notificationId)
  4.         local numMembers = GetNumRaidScoreNotificationMembers(notificationId)
  5.         local hasFriend = false
  6.         local hasGuildMember = false
  7.         for memberIndex = 1, numMembers do
  8.             local displayName, characterName, isFriend, isGuildMember = GetRaidScoreNotificationMemberInfo(notificationId, memberIndex)
  9. ...
? Is there a way to get a list of guilds a player is in I didn't see a function for it?

If so loop through those or loop through all of the guilds to find out which guildId that characterName is in (or there may be a better way to do this part?). You all ready have the memberIndex so you dont need to check every guild member (just compare the characterNames to see if they match) using:
Lua Code:
  1. GetGuildMemberCharacterInfo(integer guildId, luaindex memberIndex)
  2.     -- Returns: bool hasCharacter, string characterName, string zoneName, integer classId, integer alliance, integer level, integer veteranRank

That would tell you which guild they are in and then decide if you want to show the notification and pass it on to the original function you hooked (or not)....or that might not work...I dont think you can pass single notifications back to the original function it checks all notifications it seems.

But, you could just rewrite the function to suit your needs. I'll leave the rest of my post up there though because it would still be the basic idea of how you would want to rewrite ZO_LeaderboardRaidProvider:BuildNotificationList() to do what your looking for.
  Reply With Quote
 

ESOUI » AddOns » AddOn Search/Requests » Notification Accept and One-Click-Logout [request]


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off