What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Ordered list of raidmembers

Ama

New Member
Joined
Jun 6, 2011
Messages
1,171
Reaction score
33
Is there anyway to get an ordered list of raidmembers(even if they are out of range). I want to have lists of each party so I can run a healing check for Prayer of healing more accurately.

I assume there is no easy way to check all party members of a non-local player?
 
This is probably the No.1 reason that Altarboy doesn't heal right now.

I'm pretty sure Gilderoy went through quite a bit of trouble to get this working with LUA calls. I know we messed around with a few methods to get this to perform at a decent balance of responsiveness/accuracy and couldn't get manage anything we were happy with.

A RaidGroup attribute on each WoWPlayer would certainly clean this up nicely, but I don't believe this is in the API and I'm not sure that Apoc and co. have any intentions of adding it as it's really only needed for PoH. Also, I think I begged for it a while back but I don't recall getting a response or the reasoning why it wasn't there.
 
Last edited:
That sucks. Right now my prayer of healing method returns a WoWPlayer. I check me and my party, then iterate through Me.RaidMembers in groups of 5. If they aren't me or my party member, they count towards that group. Then the 1st WoWPlayer of the winning group gets returned.

For the most part, I think it is working right. But the code is gross and I think if Prayer of Healing crits, then the heal target gets the crit.

I tried a LUA call one time and it took a while for it to return.
 
sound like you can do a loop and put everyone into an array then do a sort on the array and it will get the list in order. or instead of an array you can put the people into a list.
idk if that will help or not.
 
Have you considered doing the LUA calls as part of your Out-Of-Combat routine and then enumerating the raid membership (1 thru 8 for a 40-man max size group)? That's what we were thinking about doing; just have it run at sometime where the responsiveness doesn't really matter and maybe adding a force update button to the CC UI.

Of course, if party membership is shuffled between updates you're going to get inaccurate casts, but if you can optimize the downtime/travel time innate to most raids the effects should be minimal.

I also thought about just writing a WoW add-on that dumped the LUA results to a text file to skirt the sluggishness HB sees with LUA calls, but the other dev on AltarBoy didn't want to go this route and we never really trialed it.
 
what about just getting them from , Me.Raidmembers ?
That is what I am have now, but I don't think it includes Me. If it does, Me is at the beginning. So for that I do Me and Me.PartyMembers separate. It's just kinda annoying to iterate through Me.Raidmembers in groups of 5 and *hope* the groupings are right.
 
That is what I am have now, but I don't think it includes Me. If it does, Me is at the beginning. So for that I do Me and Me.PartyMembers separate. It's just kinda annoying to iterate through Me.Raidmembers in groups of 5 and *hope* the groupings are right.
get in a raid, dump a list of names for Me.Raidmembers. then you'll have your answer. it should include everyone but you. but since you can get to your self easily, there's no need.
 
Its fine, it just isn't the most accurate way to go. If 1 dude is out of range, it throws your whole list off. One time my raid leader rearranged the parties so they didn't all have 5 in them. It was really lame. Would it be possible to get a group attribute to WoWPlayer? I would ask blizz to change prayer of healing, but I don't think they would.
 
get in a raid, dump a list of names for Me.Raidmembers. then you'll have your answer. it should include everyone but you. but since you can get to your self easily, there's no need.

I believe Me.Raidmembers was added to the API after I quit playing, but it sounds like it does dump the raid members in the same order as the GUI. The problem is with the placement of "Me." If you're in Spot 25 in a 25-man raid, then everything is gravy, if you're in spot 10, it will throw the last 3 groups off unless you use more complicated logic as he was doing above.

From what jasf is saying, I'm guessing he wants to implement a primarily AOE-focused rotation (Holy Priest in Chakra: Sanctuary, maybe?) that first checks if AOE healing is needed by a group and then moves to checking individual players for diminished health. So in the tree it moves from "How many below 80% health in Group 1? Group 2? etc." rather than "Player 12 has lowest health, who is in his group? How many are below 80% health? Player 11 has next lowest health..."
 
This is what i've had for a while. I woke up one morning, hungover as hell, and wrote some crap code prayer of healing. Its the longest crap in my whole CC.

PHP:
        private WoWPlayer CheckPrayerOfHealing()
        {
            if (Me.IsInParty || Me.IsInRaid)
            {
                WoWPlayer[] targets = new WoWPlayer[(Me.RaidMembers.Count / 5)];
                int[] count = new int[(Me.RaidMembers.Count / 5)];
                int CurrentPlayerInParty = 0;
                int CurrentParty = 0;
                int MeCount = 0;
                int CompareCounts = 0;

                foreach (WoWPlayer p in Me.PartyMembers)
                {
                    if (p.Distance < 30
                        && p.HealthPercent < DiscSettings.Instance.PrayerHealingMax_SET
                        && p.HealthPercent > DiscSettings.Instance.PrayerHealingMin_SET
                        && !p.HasAura("Divine Aegis"))
                    {
                        MeCount++;
                    }                    
                }
                
                if (Me.Distance < 30
                        && Me.HealthPercent < DiscSettings.Instance.PrayerHealingMax_SET
                        && Me.HealthPercent > DiscSettings.Instance.PrayerHealingMin_SET
                        && !Me.HasAura("Divine Aegis"))
                {
                    MeCount++;
                }


                if (!Me.IsInRaid)
                {
                    if (MeCount >= DiscSettings.Instance.PrayerHealingNum_SET)
                    {
                        Logging.Write("PoH Party Count: " + MeCount);
                        return Me;
                    }
                    else
                    {
                        return null;
                    }
                }

                foreach (int c in count)
                {
                    count[c] = 0;
                }

                foreach (WoWPlayer p in Me.RaidMembers)
                {
                    if (!p.IsMe && !p.IsInMyParty)
                    {
                        if (CurrentPlayerInParty > 4)
                        {
                            CurrentPlayerInParty = 0;
                            CurrentParty++;
                        }
                        if (CurrentPlayerInParty == 0)
                        {
                            targets[CurrentParty] = p;
                        }
                        if (p.Distance < 30
                            && p.HealthPercent < DiscSettings.Instance.PrayerHealingMax_SET
                            && p.HealthPercent > DiscSettings.Instance.PrayerHealingMin_SET
                            && !p.HasAura("Divine Aegis"))
                        {
                            count[CurrentParty]++;
                        }
                        CurrentPlayerInParty++;
                    }                    
                }

                for (int i = 0; i < targets.Length; i++)
                {
                    if (count[i] > count[CompareCounts])
                    {
                        CompareCounts = i;
                    }
                }

                if (MeCount >= DiscSettings.Instance.PrayerHealingNum_SET
                    || count[CompareCounts] >= DiscSettings.Instance.PrayerHealingNum_SET)
                {
                    if (count[CompareCounts] == null)
                    {
                        return Me;
                    }
                    if (MeCount >= count[CompareCounts])
                    {
                        return Me;
                    }
                    else
                    {
                        return targets[CompareCounts];
                    }
                }
            }
            return null;
        }

I would be soooooo happy if I could do this...

PHP:
int PrayerOfHealingCount(WoWPlayer healTarget){
      int count;
      foreach(WoWPlayer p in healTarget.PartyMembers){
            if(blah blah)
                  count++
      }
      return count;
}
 
Back
Top