private void HandleClanInvitationResponse(ParseData pd) { DataReader dr = new DataReader(pd.Data); int cookie = dr.ReadInt32(); string tag = dr.ReadDwordString(0); string name = dr.ReadCString(); string inviter = dr.ReadCString(); ClanInvitationEventArgs args = new ClanInvitationEventArgs(cookie, tag, name, inviter) { EventData = pd }; OnClanInvitationReceived(args); }
/// <summary> /// Responds to a clan invitation received via the <see>ClanInvitationReceived</see> event. /// </summary> /// <param name="invitation">The arguments that accompanied the invitation.</param> /// <param name="accept"><see langword="true" /> to accept the invitation and join the clan; otherwise <see langword="false" />.</param> /// <remarks> /// <para>Following the acceptance of an invitation, the client should receive <see>ClanMembershipReceived</see> and automatically respond by requesting clan /// membership information.</para> /// </remarks> public void RespondToClanInvitation(ClanInvitationEventArgs invitation, bool accept) { BncsPacket pck = new BncsPacket((byte)BncsPacketId.ClanInvitationResponse); pck.InsertInt32(invitation.RequestID); pck.InsertDwordString(invitation.ClanTag); pck.InsertCString(invitation.Inviter); pck.InsertByte(accept ? (byte)6 : (byte)4); Send(pck); }
public void OnClanInvitationReceived(ClanInvitationEventArgs e) { m_host.OnClanInvitationReceived(e); }