@@ -610,22 +610,30 @@ local function Buffalo_ScanRaid()
610610 if grouptype == " solo" then
611611 unitid = " player"
612612 roster [unitid ] = { [" Group" ]= 1 , [" IsOnline" ]= true , [" IsDead" ]= nil , [" BuffMask" ]= 0 , [" ClassMask" ]= BUFFALO_CLASS_ALL };
613- else
613+
614+ elseif grouptype == " party" then
615+ unitid = " player" ;
616+ for raidIndex = startNum , endNum , 1 do
617+ if raidIndex > 0 then
618+ unitid = grouptype .. raidIndex ;
619+ end ;
620+
621+ local isOnline = 0 and UnitIsConnected (unitid ) and 1 ;
622+ local isDead = 0 and UnitIsDead (unitid ) and 1 ;
623+ local _ , classname = UnitClass (unitid );
624+
625+ roster [unitid ] = { [" Group" ]= 1 , [" IsOnline" ]= isOnline , [" IsDead" ]= isDead , [" BuffMask" ]= 0 , [" ClassMask" ]= CLASS_MATRIX [classname ] };
626+ end ;
627+
628+ else -- Raid
614629 for raidIndex = 1 , 40 , 1 do
615630 local name , rank , subgroup , level , _ , filename , zone , online , dead , role , isML = GetRaidRosterInfo (raidIndex );
616631 if name then
617632 local isOnline = 0 and online and 1 ;
618633 local isDead = 0 and dead and 1 ;
619634
620- if grouptype == " raid" then
621- unitid = grouptype .. raidIndex ;
622- else
623- unitid = " player"
624- if raidIndex > 1 then
625- unitid = grouptype .. (raidIndex - 1 );
626- end ;
627- end ;
628-
635+ unitid = grouptype .. raidIndex ;
636+
629637 -- Find unitid on current player:
630638 if name == playername then
631639 currentUnitid = unitid ;
@@ -712,8 +720,7 @@ local function Buffalo_ScanRaid()
712720
713721 -- If groupMask is 0 then this group does not have any buffs to apply.
714722 if groupMask > 0 then
715-
716- -- echo(string.format("Group=%s, mask=%s", groupIndex, combiMask));
723+ -- echo(string.format("Group=%s, mask=%s", groupIndex, groupMask));
717724 -- We have found an assigned group now.
718725 -- Search through the buffs, and count each buff per group and unit combo:
719726 for buffName , buffInfo in next , BUFF_MATRIX do
@@ -723,7 +730,7 @@ local function Buffalo_ScanRaid()
723730
724731 -- Skip buffs which we haven't committed to do. That includes GREATER/PRAYER buffs:
725732 if (bit .band (buffInfo [" BITMASK" ], groupMask ) > 0 ) and not buffInfo [" GROUP" ] then
726- -- echo(string.format("Buff=%s, bmask=%d, group=%d, gmask=%d", buffName, bitMask, groupIndex, combiMask ));
733+ -- echo(string.format("Buff=%s, bmask=%d, group=%d, gmask=%d", buffName, bitMask, groupIndex, groupMask ));
727734 local waitForCooldown = false ;
728735 if buffInfo [" COOLDOWN" ] then
729736 local start , duration , enabled = GetSpellCooldown (buffName );
@@ -737,12 +744,11 @@ local function Buffalo_ScanRaid()
737744 if raidIndex > 0 then unitid = grouptype .. raidIndex ; end ;
738745 unitname = Buffalo_GetPlayerAndRealm (unitid );
739746
740- -- local unitIsCurrentPlayer = (unitname == castingPlayerAndRealm);
741747 local rosterInfo = roster [unitid ];
742-
748+
743749 -- Check 1: Target must be online and alive:
744750 if rosterInfo and rosterInfo [" IsOnline" ] and not rosterInfo [" IsDead" ] then
745- -- echo(string.format("Checking %s (%s) in group %s", unitname, unitid, groupIndex));
751+ -- echo(string.format("Checking %s (%s) in group %s", unitname, unitid, groupIndex));
746752 -- Check 2: Target must be in the current group:
747753 if rosterInfo [" Group" ] == groupIndex then
748754 groupMemberCounter = groupMemberCounter + 1 ;
@@ -767,9 +773,6 @@ local function Buffalo_ScanRaid()
767773 if (bit .band (groupMask , buffInfo [" BITMASK" ]) > 0 ) then -- Raid buff
768774 buffMissingCounter = buffMissingCounter + 1 ;
769775 local priority = buffInfo [" PRIORITY" ];
770- -- if unitIsCurrentPlayer then
771- -- priority = priority + CONFIG_PlayerBuffPriority;
772- -- end;
773776 -- echo(string.format("Adding: unit=%s, group=%d, buff=%s", unitname, groupIndex, buffName));
774777 MissingBuffsInGroup [buffMissingCounter ] = { unitid , buffName , buffInfo [" ICONID" ], priority };
775778 end ;
@@ -836,7 +839,7 @@ local function Buffalo_ScanRaid()
836839 -- echo(string.format("Found missing buff, unit=%s, group=%d, buff=%s", UnitName(unitid), groupIndex, buffName));
837840
838841 if (bit .band (groupMask , buffInfo [" BITMASK" ]) > 0 ) then
839- -- echo(string.format("Adding: unit=%s, group=%d, buff=%s", unitname, groupIndex, buffName));
842+ -- echo(string.format("Adding: unitid=%s, unit=%s, group=%d, buff=%s", unitid , unitname, groupIndex, buffName));
840843 missingBuffIndex = missingBuffIndex + 1 ;
841844 local priority = buffInfo [" PRIORITY" ];
842845 if not buffInfo [" GROUP" ] then
0 commit comments