Esempio n. 1
0
        private void OnMailTake(PacketBase packet)
        {
            c2ss.MailTake msg = packet as c2ss.MailTake;

            Player player = UnitManager.Instance.GetPlayerByClientUID(msg.client_uid);

            if (player == null)
            {
                Log.Debug("OnMailList 未找到unit:" + msg.client_uid.srv_uid + ", " + msg.client_uid.conn_idx);
                return;
            }
            Mailbox mail_box = MailboxManager.Instance.GetMailBox(player.char_idx);

            if (mail_box != null)
            {
                mail_box.HandleTakeMail(msg.mail_idx, msg.delete_mail);
            }
        }
 /// <summary>
 /// 收取邮件附件
 /// </summary>
 public static void SendTakeMail(long mail_idx)
 {
     c2ss.MailTake msg = PacketPools.Get(c2ss.msg.MAIL_TAKE) as c2ss.MailTake;
     msg.mail_idx = mail_idx;
     ClientNetManager.Instance.Send(msg);
 }