Aptechka

Aptechka

182k Downloads

Role equivilent for classic.

cdmichaelb opened this issue ยท 7 comments

commented

Back before we had built-in roles addons would let you assign roles. Can we get something similar to set tanks/healers, and be able to sort those (i.e. tanks first in groups). If that isn't possible/easy, can we just get custom sorting, let us use a hotkey or etc to drag people to where we want them in our group display?

Thanks. PS I hope suggestions for ok here. I don't have access to wowinterface.

commented

Ok, I made maintanks to go first in groups and then mainassists. Making healers go second is maybe possible in theory, but that's a lot more complicated without an actual role. Reordering can't be done outside of blizzard raid roster screen.

commented

Awesome thanks, I'll try it when it's released.

I have a theory, if you can point me to which file the roles are handled in the retail version of your addon.

commented

That's the thing, unit button creation and sorting is managed by protected blizzard code
https://github.com/Gethe/wow-ui-source/blob/live/FrameXML/SecureGroupHeaders.lua

commented

Ok, so it looks like none of this will work, then. The code you wrote works fine but blizzard has the functionality to set roles disabled. Classic doesn't appear to have any role functionality, no main assist, no main tank. I was able to emulate it partially, but it won't sort. Here is what it looks like https://i.imgur.com/qkFzhxs.png . Could be a useful feature by itself, but would need code written that allows people to set the "manual role" or do a "role call" probably not worth the effort unless you're bored.
I attempted to get sorting to work by overloading the function but didn't have any success there.

Since we can't use roles or do any sorting without roles, I have another suggestion:
Can you turn the class pullout frames (https://i.imgur.com/kNGQ8r6.png) into aptechka style frames? Followup: Can you blacklist (not show) people on those frames, or does it follow the same rule as sorting. If so, what about blackout (display no stats, blank out the frame, it's there but doesn't show anything). Could make a "kinda" tank frame that way.

commented

Wait, classic totally should have main tanks and main assists. Did you enable unit sorting in the settings? It's disabled by default. I myself only tested it on live, and sorting by maintanks first was working there. But considering secure group header is completely unchanged in classic, it should work there too.

commented

Sorry ignore me. I was using the wrong API calls. (For some reason the MT and MA seems to be hidden from the wow interface, short of using commands/api calls).

In short: it works.

One minor bug with the icons:

local icon = self.roleicon.texture if icon then if UnitGroupRolesAssigned(unit) == "HEALER" then -- icon:SetTexCoord(0, 0.25, 0, 1); icon:Show() -- icon:SetTexCoord(GetTexCoordsForRoleSmallCircle("HEALER")); icon:Show() icon:SetTexCoord(20/64, 39/64, 1/64, 20/64); icon:Show() elseif isTankRoleAssigned or isAnyTank then -- icon:SetTexCoord(0.25, 0.5, 0, 1); icon:Show() icon:SetTexCoord(0, 19/64, 22/64, 41/64); icon:Show() else icon:Hide() end end
Had to do this to get it to show the icons, the 'GetTexCoordsForRoleSmallCircle()' was showing all four icons. Also, isAnyTank was needed to show the MT assigned as tank.

One clarification before I make a fool of myself again. Is UnitGroupRolesAssigned(unit) retail only?

commented

UnitGroupRolesAssigned is retail only.
I thought they removed that role icon texture altogether from classic. But apparently not