Ejemplo n.º 1
0
    /// <summary>
    /// 邮件 返回邮件列表
    /// </summary>
    /// <param name="buf"></param>
    private void GetMailList(KProtoBuf buf)
    {
        S2C_MAIL_GET_LIST msg = buf as S2C_MAIL_GET_LIST;

        m_MailCount = (int)msg.totalMailsCount;
        m_IsGetList = true;
        for (int i = 0; i < msg.mailList.Count; i++)
        {
            MailSimpleData m_Data = msg.mailList[i];

            MailDataVO m_Maildate = new MailDataVO();

            m_Maildate.Id           = m_Data.id;
            m_Maildate.Tid          = m_Data.tid;
            m_Maildate.Index        = m_Data.index;
            m_Maildate.MaxCount     = m_Data.max_index;
            m_Maildate.ExpireTime   = m_Data.expireTime;
            m_Maildate.SendTime     = m_Data.recvTime;
            m_Maildate.Readed       = m_Data.readed;
            m_Maildate.Got          = m_Data.got;
            m_Maildate.IsMark       = m_Data.starred;
            m_Maildate.HasAccessory = m_Data.has_accessory;
            m_Maildate.IsNew        = m_Data.is_new;
            GetMailProxy().AddMail(m_Data.id, m_Maildate);
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 邮件 通知有新邮件
    /// </summary>
    /// <param name="buf"></param>
    private void MailNew(KProtoBuf buf)
    {
        S2C_MAIL_NEW msg = buf as S2C_MAIL_NEW;

        m_IsGetList = false;
        MailSimpleData m_Data = msg.new_mail;

        if (GetMailProxy().GetMails().TryGetValue(m_Data.id, out MailDataVO mailData))
        {
            return;
        }

        MailDataVO m_Maildate = new MailDataVO();

        m_Maildate.Id           = m_Data.id;
        m_Maildate.Tid          = m_Data.tid;
        m_Maildate.Index        = m_Data.index;
        m_Maildate.MaxCount     = m_Data.max_index;
        m_Maildate.ExpireTime   = m_Data.expireTime;
        m_Maildate.SendTime     = m_Data.recvTime;
        m_Maildate.Readed       = m_Data.readed;
        m_Maildate.Got          = m_Data.got;
        m_Maildate.IsMark       = m_Data.starred;
        m_Maildate.HasAccessory = m_Data.has_accessory;
        m_Maildate.IsNew        = m_Data.is_new;
        GetMailProxy().AddMail(m_Data.id, m_Maildate);
        GameFacade.Instance.SendNotification(NotificationName.MSG_EMAIL_RENDERLIST);
    }