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:
local function SetMarksByTalents()
if IsInRaid() then --and inArena then
local index = 0
while index =< 40 do
local unitID = "raid"..index
local name = UnitName(unitID)
local _,class = UnitClass(unitID)
local level = UnitLevel(unitID)
local spec = nil
local currentRole = UnitGroupRolesAssigned(unitID)
if name and class and level and not AAM_TALENTS[name] then
if level < 10 or class == "ROGUE" or class == "HUNTER" or class == "MAGE" or class == "WARLOCK" then
spec = "DAMAGER"
elseif currentRole and currentRole ~= "NONE" then
spec = currentRole
else
-- Use method for finding raid member role through inspection
-- Possibly add to a table that's being cleared through OnUpdate parsing players that appear in that list.
-- Register for INSPECT_READY and set the next indexed name for inspection.
--if CanInspect(unitID) and (not IsInspectFrameOpen()) then
--NotifyInspect(unitID)
--end
end
if spec then
AAM_TALENTS[name] = spec
UnitSetRole(unitID, spec)
end
end
local index = index +1
local unitID = "raid"..index
end
end
end