public static bool IsLeader(PartyId partyId) { if (partyId == null) { return(false); } PartyMember myselfMember = BnetParty.GetMyselfMember(partyId); if (myselfMember != null) { PartyType partyType = BnetParty.GetPartyType(partyId); if (myselfMember.IsLeader(partyType)) { return(true); } } return(false); }