penumbra 4 Posted January 6, 2018 Share Posted January 6, 2018 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 https://wrobot.eu/forums/topic/8200-check-party-class-composition/ Share on other sites More sharing options...
Droidz 2738 Posted January 8, 2018 Share Posted January 8, 2018 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 https://wrobot.eu/forums/topic/8200-check-party-class-composition/#findComment-37494 Share on other sites More sharing options...
Matenia 628 Posted January 8, 2018 Share Posted January 8, 2018 bool partyHasDruid = Party.GetPartyHomeAndInstance().Any(u => u.WowClass == WowClass.Druid); Link to comment https://wrobot.eu/forums/topic/8200-check-party-class-composition/#findComment-37496 Share on other sites More sharing options...
penumbra 4 Posted January 10, 2018 Author Share Posted January 10, 2018 Thank you both! Link to comment https://wrobot.eu/forums/topic/8200-check-party-class-composition/#findComment-37559 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now