public static void SetLeader(PartyId partyId, BnetGameAccountId memberId) { if (!BnetParty.IsInParty(partyId)) { return; } EntityId partyId2 = partyId.ToEntityId(); EntityId memberId2 = BnetEntityId.CreateEntityId(memberId); PartyType partyType = BnetParty.GetPartyType(partyId); uint leaderRoleId = PartyMember.GetLeaderRoleId(partyType); BattleNet.AssignPartyRole(partyId2, memberId2, leaderRoleId); }
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); }
public static PartyMember[] GetMembers(PartyId partyId) { if (partyId == null) { return(new PartyMember[0]); } PartyMember[] array; BattleNet.GetPartyMembers(partyId.ToEntityId(), out array); PartyMember[] array2 = new PartyMember[array.Length]; for (int i = 0; i < array2.Length; i++) { PartyMember partyMember = array[i]; array2[i] = new PartyMember { GameAccountId = BnetGameAccountId.CreateFromEntityId(partyMember.memberGameAccountId), RoleIds = new uint[] { partyMember.firstMemberRole } }; } return(array2); }
public bool IsLeader(PartyType partyType) { uint leaderRoleId = PartyMember.GetLeaderRoleId(partyType); return(this.HasRole(leaderRoleId)); }
public bool IsLeader(PartyType partyType) { return(this.HasRole(PartyMember.GetLeaderRoleId(partyType))); }