Grid2

Grid2

9M Downloads

Unit roles filter for classic

praxxis opened this issue ยท 6 comments

commented

In classic the "Unit Role" loader doesn't have any effect, as the roles are loaded using an API that doesn't exist in classic. We could use the raid role to at least be able to support "Tank" and "Other" unit roles in classic (it's already used elsewhere in Grid2.)

I could PR this change if you're open to it too. I'd probably create a classic only PLAYER_ROLES in modules\statuses\Status.lua with just Tank and None, then somehow change GridStatusLoad to load the role from the raid index instead of unit identifier.

commented

Try out 2.7.1-beta-classic

commented

Im unsure about changing this behaviour because the Role API do exist in classic, only that currently is not used.

commented

Just tested in raid and it looks good. The only issue I saw is that statuses don't get loaded if you set/unset a main tank until you reload or zone. Might be a cache or something not getting busted.

commented

Umm, the required event to refresh the roles is not registered for classic. Unfortunatelly i cannot test this thing in classic era just now (i need to be in raid to test this thing).
Can you comment or remove lines 151 and 152 in GridCore.lua to activate the RegisterEvent() function and test if this fixes the issue ? The code should look like this:

-- if self.versionCli>=30000 then -- wotlk or superior
self:RegisterEvent("PLAYER_ROLES_ASSIGNED")
-- end

I know the PLAYER_ROLES_ASSIGNED exists in classic but i dont know if it is fired when the maintank is set/unset.

commented

2.7.2-beta works perfectly! Confirmed that indicators update when promoting/demoting without needing a reload

commented

Update to 2.7.2-beta