r681: Beta roster issues #298


  • Defect
  • Fixed
Closed
Assigned to michaelsp
  • _ForgeUser7773765 created this issue Aug 24, 2012

    The issues others are reporting with range not working in groups has to do with the new GetNumGroupMembers function returning the number of members in your group (including the player) in *both* raids and parties. So when joining a 5 man group automatically (like through LFD tool), the code in GridRoster.lua thinks it's a raid group. Namely, the code on line 261:

    local units = (GetNumRaidMembers() == 0) and party_units or raid_units
    

    GetNumRaidMembers() aliased to the new GetNumGroupMembers() will never be zero when the player is in a party so units will always be set to raid_units. Then when the range check module is run it is called against UnitID raid1, raid2, etc which are invalid while in a five man group, causing the UnitInRange(...) call to fail and resulting in the unit being marked out of range.

    I changed that line of code to be:

    local units = (GetNumRaidMembers() < 6) and party_units or raid_units
    

    and now the range checking works fine.

  • _ForgeUser7773765 added the tags New Defect Aug 24, 2012
  • _ForgeUser7773765 posted a comment Aug 24, 2012

    I forgot another change to make sure the proper group type is detected. The function on line 121 of GridRoster.lua looks like:

    local function GetGroupType(...)
    	local count = GetNumRaidMembers()
    	for i = select("#",...)-1, 1, -1 do 
    		if count > select(i,...) then 
    			return "raid"..select(i+1,...)	
    		end
    	end
    	return GetNumPartyMembers()>0 and "party" or "solo"
    end
    

    This code again calls GetNumRaidmembers() aliased to the new GetNumGroupMembers() which returns a number between 2 and 5 when a player is in a 5 man group. This causes grid2 to set the layout to Raid10.

    When I changed the function to the following it fixed this issue:

    local function GetGroupType(...)
    	local count = GetNumRaidMembers()
    	if count > 5 then
    		for i = select("#",...)-1, 1, -1 do 
    			if count > select(i,...) then 
    				return "raid"..select(i+1,...)	
    			end
    		end
    	end
    	return GetNumPartyMembers()>0 and "party" or "solo"
    end
    
  • michaelsp posted a comment Aug 26, 2012

    @Riory: Go

    Thank you for your explanations about the issue. Uploaded a new revision.

  • michaelsp removed a tag New Aug 26, 2012
  • michaelsp added a tag Accepted Aug 26, 2012
  • _ForgeUser7773765 posted a comment Aug 27, 2012

    I tested the new version in 5 mans on Beta and it properly detected the group as a party instead of a raid and the 38y range check was working correctly.

    There is still a strange issue with LFR not properly updating the layout to Raid25 but the queues for LFR are so long I haven't been able to really figure out what the problem might be.

  • michaelsp removed a tag Accepted Aug 29, 2012
  • michaelsp added a tag Started Aug 29, 2012
  • michaelsp removed a tag Started Sep 1, 2012
  • michaelsp added a tag Fixed Sep 1, 2012
  • michaelsp closed issue Sep 1, 2012

To post a comment, please login or register a new account.