public void GetNoticeData(int type, string scene) { try { INotice notice = IApollo.get_Instance().GetService(5) as INotice; ApolloNoticeInfo apolloNoticeInfo = new ApolloNoticeInfo(); notice.GetNoticeData(type, scene, ref apolloNoticeInfo); for (int i = 0; i < apolloNoticeInfo.get_DataList().get_Count(); i++) { ApolloNoticeData apolloNoticeData = apolloNoticeInfo.get_DataList().get_Item(i); } NoticeSys.NOTICE_STATE noticeState = NoticeSys.NOTICE_STATE.LOGIN_Before; if (scene == "1") { noticeState = NoticeSys.NOTICE_STATE.LOGIN_Before; } else if (scene == "2") { noticeState = NoticeSys.NOTICE_STATE.LOGIN_After; } MonoSingleton <NoticeSys> .GetInstance().OnOpenForm(apolloNoticeInfo, noticeState); } catch (Exception ex) { DebugHelper.Assert(false, "Error In GetNoticeData, {0}", new object[] { ex.get_Message() }); } }
public void ShowIOSGuestNotice() { ApolloNoticeInfo apolloNoticeInfo = new ApolloNoticeInfo(); ApolloNoticeData apolloNoticeData = new ApolloNoticeData(); apolloNoticeData.set_MsgType(0); apolloNoticeData.set_ContentType(0); apolloNoticeData.set_MsgTitle("游客模式特别说明"); apolloNoticeData.set_MsgContent("敬爱的玩家,您正在使用游客模式进行游戏,游客模式下的游戏数据(包含付费数据)会在删除游戏、更换设备后清空。为了保障您的虚拟财产安全,以及让您获得更完善的游戏体验,我们建议您使用QQ/微信登录进行游戏!\n\n《王者荣耀》运营团队"); apolloNoticeInfo.get_DataList().Add(apolloNoticeData); for (int i = 0; i < apolloNoticeInfo.get_DataList().get_Count(); i++) { ApolloNoticeData apolloNoticeData2 = apolloNoticeInfo.get_DataList().get_Item(i); } MonoSingleton <NoticeSys> .GetInstance().OnOpenForm(apolloNoticeInfo, NoticeSys.NOTICE_STATE.LOGIN_Before); }
public List <string> GetNoticeUrl(int type, string scene) { List <string> list = new List <string>(); if (Singleton <BattleLogic> .GetInstance().isRuning) { return(list); } INotice notice = IApollo.get_Instance().GetService(5) as INotice; ApolloNoticeInfo apolloNoticeInfo = new ApolloNoticeInfo(); notice.GetNoticeData(type, scene, ref apolloNoticeInfo); for (int i = 0; i < apolloNoticeInfo.get_DataList().get_Count(); i++) { ApolloNoticeData apolloNoticeData = apolloNoticeInfo.get_DataList().get_Item(i); if (apolloNoticeData.get_ContentType() == 2) { list.Add(apolloNoticeData.get_ContentUrl()); } } return(list); }
public void OnOpenForm(ApolloNoticeInfo noticeInfo, NoticeSys.NOTICE_STATE noticeState) { this.m_CurState = noticeState; this.m_NoticeDataList = new ListView <ApolloNoticeData>(); int count = noticeInfo.get_DataList().get_Count(); for (int i = 0; i < count; i++) { ApolloNoticeData apolloNoticeData = noticeInfo.get_DataList().get_Item(i); if (apolloNoticeData.get_MsgType() == null) { this.m_NoticeDataList.Add(apolloNoticeData); } } if (count > 0) { this.ShowNoticeWindow(0); } else if (this.m_CurState == NoticeSys.NOTICE_STATE.LOGIN_After) { this.ShowOtherTips(); } }