public static void RequestInvite(PartyId partyId, BnetGameAccountId whomToAskForApproval, BnetGameAccountId whomToInvite, PartyType partyType) { if (BnetParty.IsLeader(partyId)) { PartyError error = default(PartyError); error.IsOperationCallback = true; error.DebugContext = "RequestInvite"; error.ErrorCode = BattleNetErrors.ERROR_INVALID_TARGET_ID; error.Feature = BnetFeature.Party; error.FeatureEvent = BnetFeatureEvent.Party_RequestPartyInvite_Callback; error.PartyId = partyId; error.szPartyType = EnumUtils.GetString <PartyType>(partyType); error.StringData = "leaders cannot RequestInvite - use SendInvite instead."; BnetParty.OnError(error); return; } EntityId partyId2 = partyId.ToEntityId(); EntityId whomToAskForApproval2 = BnetEntityId.CreateEntityId(whomToAskForApproval); EntityId whomToInvite2 = BnetEntityId.CreateEntityId(whomToInvite); string @string = EnumUtils.GetString <PartyType>(partyType); BattleNet.RequestPartyInvite(partyId2, whomToAskForApproval2, whomToInvite2, @string); }