Esempio n. 1
0
 public PartyRequestPacket(PartyRequestType requestType, Player player) :
     base(
         BuildPacket(
             (byte)OutGoingPacket.InvitePlayer,
             new byte[] { (byte)requestType },
             BitConverter.GetBytes((uint)player.Id)
             )
         )
 {
 }
Esempio n. 2
0
        //handles a request to join/invite from another player
        private void _handlePartyRequest(Packet pkt)
        {
            if (OnPartyRequest == null)
            {
                return;
            }
            PartyRequestType type     = (PartyRequestType)pkt.GetChar();
            short            playerID = pkt.GetShort();
            string           name     = pkt.GetEndString();

            name = char.ToUpper(name[0]) + name.Substring(1);
            OnPartyRequest(type, playerID, name);
        }
Esempio n. 3
0
        /// <summary>
        /// Send a party request to another player
        /// </summary>
        /// <param name="type">Either Join or Invite</param>
        /// <param name="otherCharID">ID of the other character</param>
        /// <returns>True on successful send operation, false otherwise</returns>
        public bool PartyRequest(PartyRequestType type, short otherCharID)
        {
            if (!m_client.ConnectedAndInitialized || !Initialized)
            {
                return(false);
            }

            Packet pkt = new Packet(PacketFamily.Party, PacketAction.Request);

            pkt.AddChar((byte)type);
            pkt.AddShort(otherCharID);

            return(m_client.SendPacket(pkt));
        }
Esempio n. 4
0
 private void _partyRequest(PartyRequestType type, short id, string name)
 {
     EODialog.Show(name + " ",
                   type == PartyRequestType.Join ? DATCONST1.PARTY_GROUP_REQUEST_TO_JOIN : DATCONST1.PARTY_GROUP_SEND_INVITATION,
                   XNADialogButtons.OkCancel, EODialogStyle.SmallDialogSmallHeader,
                   (o, e) =>
     {
         if (e.Result == XNADialogResult.OK)
         {
             if (!m_packetAPI.PartyAcceptRequest(type, id))
             {
                 m_game.LostConnectionDialog();
             }
         }
     });
 }
        private void _partyRequest(PartyRequestType type, short id, string name)
        {
            if (!OldWorld.Instance.Interaction)
            {
                return;
            }

            EOMessageBox.Show(name + " ",
                              type == PartyRequestType.Join ? DialogResourceID.PARTY_GROUP_REQUEST_TO_JOIN : DialogResourceID.PARTY_GROUP_SEND_INVITATION,
                              EODialogButtons.OkCancel, EOMessageBoxStyle.SmallDialogSmallHeader,
                              (o, e) =>
            {
                if (e.Result == XNADialogResult.OK)
                {
                    if (!m_packetAPI.PartyAcceptRequest(type, id))
                    {
                        m_game.DoShowLostConnectionDialogAndReturnToMainMenu();
                    }
                }
            });
        }
 private void _partyRequest(PartyRequestType type, short id, string name)
 {
     EODialog.Show(name + " ",
            type == PartyRequestType.Join ? DATCONST1.PARTY_GROUP_REQUEST_TO_JOIN : DATCONST1.PARTY_GROUP_SEND_INVITATION,
            XNADialogButtons.OkCancel, EODialogStyle.SmallDialogSmallHeader,
            (o, e) =>
            {
                if (e.Result == XNADialogResult.OK)
                {
                    if (!m_packetAPI.PartyAcceptRequest(type, id))
                        m_game.LostConnectionDialog();
                }
            });
 }
		private void _partyRequest(PartyRequestType type, short id, string name)
		{
			if (!World.Instance.Interaction)
				return;

			EOMessageBox.Show(name + " ",
				   type == PartyRequestType.Join ? DATCONST1.PARTY_GROUP_REQUEST_TO_JOIN : DATCONST1.PARTY_GROUP_SEND_INVITATION,
				   XNADialogButtons.OkCancel, EOMessageBoxStyle.SmallDialogSmallHeader,
				   (o, e) =>
				   {
					   if (e.Result == XNADialogResult.OK)
					   {
						   if (!m_packetAPI.PartyAcceptRequest(type, id))
							   m_game.DoShowLostConnectionDialogAndReturnToMainMenu();
					   }
				   });
		}
Esempio n. 8
0
		/// <summary>
		/// Send a party request to another player
		/// </summary>
		/// <param name="type">Either Join or Invite</param>
		/// <param name="otherCharID">ID of the other character</param>
		/// <returns>True on successful send operation, false otherwise</returns>
		public bool PartyRequest(PartyRequestType type, short otherCharID)
		{
			if (!m_client.ConnectedAndInitialized || !Initialized)
				return false;

			Packet pkt = new Packet(PacketFamily.Party, PacketAction.Request);
			pkt.AddChar((byte)type);
			pkt.AddShort(otherCharID);

			return m_client.SendPacket(pkt);
		}