Jump to content

Check party class composition


penumbra

Recommended Posts

Hello robot wizards!

I am trying to improve my healer fightclass by understanding which classes are in the party

The below should work in theory, but I cannot get it to work. Anyone have done a similar function before?

Thanks in advance!

 

private bool _Partyclass_Druid;

public void UpdatePartyComposition()
{
        _Partyclass_Druid = false;

        var partyMembers = Party.GetPartyGUIDHomeAndInstance();
        if (partyMembers.Any())
        {
            foreach (Int128 u in partyMembers)
            {
                if (u.WowClass = "Druid") {
					_Partyclass_Druid = true;
				}
				// Repeat for other clases
            }
        }
}

 

Link to comment
Share on other sites

Hello, you code is bad, it is more like:

    private bool _Partyclass_Druid;

    public void UpdatePartyComposition()
    {
        _Partyclass_Druid = false;

        var partyMembers = Party.GetPartyHomeAndInstance();
        if (partyMembers.Any())
        {
            foreach (var u in partyMembers)
            {
                if (u.WowClass == WoWClass.Druid)
                {
                    _Partyclass_Druid = true;
                }
                // Repeat for other clases
            }
        }
    }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...