Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-10-12, 06:42 AM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Find raid member roles, effectively

Ok so, I've been requested by a friend to create an addon for him to simply automark his arena partners once they've gotten into arena.

It seems currently even with forming a raid and marking individuals before joining the arena clears those raid marks once they join.

Marking them by name is fairly easy however he wanted to know if it were possible to set marks by their talents and their talent role, without having them to set their own roles.

After looking through some of the blizzard inspect coding and some other addons like tiptac talents, the only usable solution would be to build a table of inspected group members and somehow queue up each raid member for inspection that doesn't have their role set already. Due to the inspection restrictions placed after the whole GearScore fad this becomes a bit of an issue.

So here is what I have so far in terms of setting roles for the raid automatically:
Lua Code:
  1. local function SetMarksByTalents()
  2.     if IsInRaid() then --and inArena then
  3.         local index = 0
  4.         while index =< 40 do
  5.            
  6.             local unitID    = "raid"..index
  7.             local name      = UnitName(unitID)
  8.             local _,class   = UnitClass(unitID)
  9.             local level     = UnitLevel(unitID)
  10.             local spec      = nil
  11.             local currentRole = UnitGroupRolesAssigned(unitID)
  12.            
  13.             if name and class and level and not AAM_TALENTS[name] then
  14.                 if level < 10 or class == "ROGUE" or class == "HUNTER" or class == "MAGE" or class == "WARLOCK" then
  15.                     spec = "DAMAGER"
  16.                 elseif currentRole and currentRole ~= "NONE" then
  17.                     spec = currentRole
  18.                 else
  19.                     -- Use method for finding raid member role through inspection
  20.                     -- Possibly add to a table that's being cleared through OnUpdate parsing players that appear in that list.
  21.                     -- Register for INSPECT_READY and set the next indexed name for inspection.
  22.                     --if CanInspect(unitID) and (not IsInspectFrameOpen()) then
  23.                         --NotifyInspect(unitID)
  24.                     --end
  25.                 end
  26.                 if spec then
  27.                     AAM_TALENTS[name] = spec
  28.                     UnitSetRole(unitID, spec)
  29.                 end
  30.             end
  31.            
  32.             local index     = index +1
  33.             local unitID    = "raid"..index
  34.         end
  35.     end
  36. end

Last edited by suicidalkatt : 09-10-12 at 07:12 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Find raid member roles, effectively


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