Exemplo n.º 1
0
    /// <summary>
    /// 更新大厅公告
    /// </summary>
    private void GetNoticeInfo(byte[] bytes)
    {
        NoticeConfigS2C package = NetMgr.Instance.DeSerializes <NoticeConfigS2C>(bytes);

        foreach (NoticeConfigDataS2C data in package.noticeConfigData)
        {
            if (this.HallInfo.NoticeList.ContainsKey((HallNoticeType)data.type))
            {
                this.HallInfo.NoticeList[(HallNoticeType)data.type] = data;
            }
            else
            {
                this.HallInfo.NoticeList.Add((HallNoticeType)data.type, data);
            }
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// 更新大厅公告
    /// </summary>
    private void GetNoticeInfo(byte[] bytes)
    {
        NoticeConfigS2C package = NetMgr.Instance.DeSerializes <NoticeConfigS2C>(bytes);

        foreach (NoticeConfigDataS2C data in package.noticeConfigData)
        {
            if (this.HallInfo.noticeList.ContainsKey((HallNoticeType)data.type))
            {
                this.HallInfo.noticeList[(HallNoticeType)data.type] = data;
            }
            else
            {
                this.HallInfo.noticeList.Add((HallNoticeType)data.type, data);
            }
            if (data.type == 2)//喇叭
            {
                HallInfo.announcementQueue.Enqueue(new AnnouncementData(data.content, 1));
            }
        }
        //(NotificationConstant.MEDI_HALL_REFRESHANNOUNCEMENT);
    }