private void OnMailDelete(PacketBase packet) { c2ss.MailDelete msg = packet as c2ss.MailDelete; 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.HandleDeleteMail(msg.mail_list); } }
/// <summary> /// 删除邮件 /// </summary> public static void SendDeleteMail(long mail_idx) { c2ss.MailDelete msg = PacketPools.Get(c2ss.msg.MAIL_DELETE) as c2ss.MailDelete; msg.mail_list.Add(mail_idx); ClientNetManager.Instance.Send(msg); }