1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
using System;
using System.Collections.Generic;
using KKSG;
using UnityEngine;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient
{
internal class XAnnouncementDocument : XDocComponent
{
public override uint ID
{
get
{
return XAnnouncementDocument.uuID;
}
}
public List<PlatNotice> NoticeList
{
get
{
return this._notice_list;
}
}
public bool RedPoint
{
get
{
return this._red_point;
}
set
{
this._red_point = value;
}
}
public new static readonly uint uuID = XSingleton<XCommon>.singleton.XHash("AnnouncementDocument");
public const int TAB_COUNT = 2;
private List<PlatNotice> _notice_list = new List<PlatNotice>();
private bool _red_point = false;
private bool[] _tab_red_point = new bool[2];
public int CurrentTab = 0;
public bool GetTabRedPoint(int index)
{
return this._tab_red_point[index];
}
public void SendFetchNotice()
{
RpcC2M_FetchPlatNotice rpcC2M_FetchPlatNotice = new RpcC2M_FetchPlatNotice();
rpcC2M_FetchPlatNotice.oArg.type = XSingleton<XClientNetwork>.singleton.AccountType;
RuntimePlatform platform = Application.platform;
if ((int)platform != 8)
{
if ((int)platform == 11)
{
rpcC2M_FetchPlatNotice.oArg.platid = PlatType.PLAT_ANDROID;
}
}
else
{
rpcC2M_FetchPlatNotice.oArg.platid = PlatType.PLAT_IOS;
}
XSingleton<XClientNetwork>.singleton.Send(rpcC2M_FetchPlatNotice);
}
public void SendClickNotice(PlatNotice notice)
{
RpcC2M_ClickNewNotice rpcC2M_ClickNewNotice = new RpcC2M_ClickNewNotice();
rpcC2M_ClickNewNotice.oArg.info = notice;
XSingleton<XClientNetwork>.singleton.Send(rpcC2M_ClickNewNotice);
}
public void GetNoticeData(List<PlatNotice> noticeList)
{
this._red_point = false;
Array.Clear(this._tab_red_point, 0, 2);
this._notice_list.Clear();
for (int i = 0; i < noticeList.Count; i++)
{
this._notice_list.Add(noticeList[i]);
uint type = noticeList[i].type;
if (type - 3u > 1u)
{
if (type == 6u)
{
this._tab_red_point[0] |= noticeList[i].isnew;
this._red_point |= noticeList[i].isnew;
}
}
else
{
this._tab_red_point[1] |= noticeList[i].isnew;
this._red_point |= noticeList[i].isnew;
}
}
XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_Announcement, true);
bool flag = DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.IsVisible();
if (flag)
{
bool flag2 = DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.m_AnnouncementHandler != null;
if (flag2)
{
DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.m_AnnouncementHandler.RefreshData();
}
}
bool flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Patface);
if (flag3)
{
DlgBase<XPatfaceView, XPatfaceBehaviour>.singleton.ShowPatface();
}
else
{
XSingleton<XPandoraSDKDocument>.singleton.CheckPandoraPLPanel();
}
}
public void RefreshRedPoint()
{
this._red_point = false;
Array.Clear(this._tab_red_point, 0, 2);
for (int i = 0; i < this._notice_list.Count; i++)
{
uint type = this._notice_list[i].type;
if (type - 3u > 1u)
{
if (type == 6u)
{
this._tab_red_point[0] |= this._notice_list[i].isnew;
this._red_point |= this._notice_list[i].isnew;
}
}
else
{
this._tab_red_point[1] |= this._notice_list[i].isnew;
this._red_point |= this._notice_list[i].isnew;
}
}
XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_Announcement, true);
XOperatingActivityDocument specificDocument = XDocuments.GetSpecificDocument<XOperatingActivityDocument>(XOperatingActivityDocument.uuID);
specificDocument.RefreshRedPoints();
bool flag = DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.IsVisible();
if (flag)
{
bool flag2 = DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.m_AnnouncementHandler != null;
if (flag2)
{
DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.m_AnnouncementHandler.RefreshTab();
}
}
}
protected override void OnReconnected(XReconnectedEventArgs arg)
{
}
}
}
|