Example #1
0
        private void OnMailRead(PacketBase packet)
        {
            c2ss.MailRead msg = packet as c2ss.MailRead;

            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.HandleReadMail(msg.mail_idx);
            }
        }
 /// <summary>
 /// 读邮件
 /// </summary>
 public static void SendReadMail(long mail_idx)
 {
     c2ss.MailRead msg = PacketPools.Get(c2ss.msg.MAIL_READ) as c2ss.MailRead;
     msg.mail_idx = mail_idx;
     ClientNetManager.Instance.Send(msg);
 }