summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XCardCollectDocument.cs
blob: 9df171b0d8b5b424e89d43d88c6d51829d4f0dfa (plain)
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
using System;
using System.Collections.Generic;
using KKSG;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;

namespace XMainClient
{
	internal class XCardCollectDocument : XDocComponent
	{
		public override uint ID
		{
			get
			{
				return XCardCollectDocument.uuID;
			}
		}

		public CardCollectView View
		{
			get
			{
				return this._view;
			}
			set
			{
				this._view = value;
			}
		}

		public XBetterDictionary<int, XItem> HasCardList
		{
			get
			{
				return this.m_HasCardList;
			}
		}

		public List<XDeck> CardsGroupInfo
		{
			get
			{
				return XCardCollectDocument._CardsGroupInfo;
			}
		}

		public XBetterDictionary<uint, uint> AttrSum
		{
			get
			{
				return this.m_AttrSum;
			}
		}

		public int CurSelectGroup
		{
			get
			{
				return (int)this.m_CurSelectGroup;
			}
		}

		public XDeck CurDeck
		{
			get
			{
				return this.CardsGroupInfo[this.CurSelectGroup];
			}
		}

		public uint CurOpenGroup
		{
			get
			{
				return this.m_CurOpenGroup;
			}
		}

		public uint CurShowGroup
		{
			get
			{
				return this.m_CurShowGroup;
			}
		}

		public static int GroupMax
		{
			get
			{
				return XCardCollectDocument._CardsGroupListTable.Table.Length;
			}
		}

		public new static readonly uint uuID = XSingleton<XCommon>.singleton.XHash("XCardCollectDocument");

		private CardCollectView _view = null;

		public static XTableAsyncLoader AsyncLoader = new XTableAsyncLoader();

		private static CardsFireProperty _CardsFirePropertyTable = new CardsFireProperty();

		private static CardsGroup _CardsGroupTable = new CardsGroup();

		private static CardsGroupList _CardsGroupListTable = new CardsGroupList();

		private static CardsList _CardsListTable = new CardsList();

		private XBetterDictionary<int, XItem> m_HasCardList = new XBetterDictionary<int, XItem>(0);

		public bool IsCardDirty;

		private static List<XDeck> _CardsGroupInfo = new List<XDeck>();

		private XBetterDictionary<uint, uint> m_AttrSum = new XBetterDictionary<uint, uint>(0);

		private uint m_CurSelectGroup = 1u;

		public uint m_CurOpenGroup;

		public uint m_CurShowGroup;

		private XItemFilter m_Filter = new XItemFilter();

		private List<XItem> m_ItemList = new List<XItem>();

		private Dictionary<uint, XItem> _CardList = new Dictionary<uint, XItem>();

		public override void OnAttachToHost(XObject host)
		{
			base.OnAttachToHost(host);
			this.m_Filter.Clear();
			this.m_Filter.AddItemType(ItemType.CARD);
		}

		public override void OnEnterSceneFinally()
		{
		}

		public override void Update(float fDeltaT)
		{
			base.Update(fDeltaT);
		}

		protected override void OnReconnected(XReconnectedEventArgs arg)
		{
			this.InitCardData(arg.PlayerInfo.atlas);
			bool flag = DlgBase<CardCollectView, CardCollectBehaviour>.singleton.IsVisible() && DlgBase<CardCollectView, CardCollectBehaviour>.singleton.CurPage == CardPage.Deck;
			if (flag)
			{
				DlgBase<CardCollectView, CardCollectBehaviour>.singleton.RefreshShowDeck(false);
			}
		}

		protected override void EventSubscribe()
		{
			base.EventSubscribe();
			base.RegisterEvent(XEventDefine.XEvent_AddItem, new XComponent.XEventHandler(this.OnAddItem));
			base.RegisterEvent(XEventDefine.XEvent_RemoveItem, new XComponent.XEventHandler(this.OnRemoveItem));
			base.RegisterEvent(XEventDefine.XEvent_ItemNumChanged, new XComponent.XEventHandler(this.OnItemNumChanged));
		}

		public bool OnAddItem(XEventArgs args)
		{
			XAddItemEventArgs xaddItemEventArgs = args as XAddItemEventArgs;
			for (int i = 0; i < xaddItemEventArgs.items.Count; i++)
			{
				bool flag = xaddItemEventArgs.items[i].type == 19u;
				if (flag)
				{
					this.IsCardDirty = true;
					CardsList.RowData cards = XCardCollectDocument.GetCards((uint)xaddItemEventArgs.items[i].itemID);
					bool flag2 = cards == null;
					bool result;
					if (flag2)
					{
						XSingleton<XDebug>.singleton.AddErrorLog("CardID:" + xaddItemEventArgs.items[i].itemID + " No Find", null, null, null, null, null);
						result = false;
					}
					else
					{
						int groupId = (int)cards.GroupId;
						bool flag3 = groupId >= XCardCollectDocument._CardsGroupInfo.Count;
						if (flag3)
						{
							XSingleton<XDebug>.singleton.AddErrorLog(string.Concat(new object[]
							{
								"CardID:",
								xaddItemEventArgs.items[i].itemID,
								"groupId:",
								cards.GroupId,
								" _CardsGroupInfo.Count:",
								XCardCollectDocument._CardsGroupInfo.Count
							}), null, null, null, null, null);
							result = false;
						}
						else
						{
							XCardCollectDocument._CardsGroupInfo[groupId].IsDeckDirty = true;
							XCardCollectDocument._CardsGroupInfo[groupId].RefreshRedPoint();
							bool flag4 = this.View != null;
							if (flag4)
							{
								this.View.RefreshDetail();
							}
							result = true;
						}
					}
					return result;
				}
			}
			return false;
		}

		public bool OnRemoveItem(XEventArgs args)
		{
			XRemoveItemEventArgs xremoveItemEventArgs = args as XRemoveItemEventArgs;
			for (int i = 0; i < xremoveItemEventArgs.types.Count; i++)
			{
				bool flag = xremoveItemEventArgs.types[i] == ItemType.CARD;
				if (flag)
				{
					this.IsCardDirty = true;
					CardsList.RowData cards = XCardCollectDocument.GetCards((uint)xremoveItemEventArgs.ids[i]);
					bool flag2 = cards == null;
					bool result;
					if (flag2)
					{
						XSingleton<XDebug>.singleton.AddErrorLog("CardID:" + xremoveItemEventArgs.ids[i] + " No Find", null, null, null, null, null);
						result = false;
					}
					else
					{
						int groupId = (int)cards.GroupId;
						bool flag3 = groupId >= XCardCollectDocument._CardsGroupInfo.Count;
						if (flag3)
						{
							XSingleton<XDebug>.singleton.AddErrorLog(string.Concat(new object[]
							{
								"CardID:",
								xremoveItemEventArgs.ids[i],
								"groupId:",
								cards.GroupId,
								" _CardsGroupInfo.Count:",
								XCardCollectDocument._CardsGroupInfo.Count
							}), null, null, null, null, null);
							result = false;
						}
						else
						{
							XCardCollectDocument._CardsGroupInfo[groupId].IsDeckDirty = true;
							XCardCollectDocument._CardsGroupInfo[groupId].RefreshRedPoint();
							bool flag4 = this.View != null;
							if (flag4)
							{
								this.View.RefreshDetail();
							}
							result = true;
						}
					}
					return result;
				}
			}
			return false;
		}

		public bool OnItemNumChanged(XEventArgs args)
		{
			XItemNumChangedEventArgs xitemNumChangedEventArgs = args as XItemNumChangedEventArgs;
			bool flag = xitemNumChangedEventArgs.item.Type == ItemType.CARD;
			bool result;
			if (flag)
			{
				this.IsCardDirty = true;
				CardsList.RowData cards = XCardCollectDocument.GetCards((uint)xitemNumChangedEventArgs.item.itemID);
				bool flag2 = cards == null;
				if (flag2)
				{
					XSingleton<XDebug>.singleton.AddErrorLog("CardID:" + xitemNumChangedEventArgs.item.itemID + " No Find", null, null, null, null, null);
					result = false;
				}
				else
				{
					int groupId = (int)cards.GroupId;
					bool flag3 = groupId >= XCardCollectDocument._CardsGroupInfo.Count;
					if (flag3)
					{
						XSingleton<XDebug>.singleton.AddErrorLog(string.Concat(new object[]
						{
							"CardID:",
							xitemNumChangedEventArgs.item.itemID,
							"groupId:",
							cards.GroupId,
							" _CardsGroupInfo.Count:",
							XCardCollectDocument._CardsGroupInfo.Count
						}), null, null, null, null, null);
						result = false;
					}
					else
					{
						XCardCollectDocument._CardsGroupInfo[groupId].IsDeckDirty = true;
						XCardCollectDocument._CardsGroupInfo[groupId].RefreshRedPoint();
						bool flag4 = this.View != null;
						if (flag4)
						{
							this.View.RefreshDetail();
						}
						result = true;
					}
				}
			}
			else
			{
				result = false;
			}
			return result;
		}

		public static void Execute(OnLoadedCallback callback = null)
		{
			XCardCollectDocument.AsyncLoader.AddTask("Table/CardsFireProperty", XCardCollectDocument._CardsFirePropertyTable, false);
			XCardCollectDocument.AsyncLoader.AddTask("Table/CardsGroup", XCardCollectDocument._CardsGroupTable, false);
			XCardCollectDocument.AsyncLoader.AddTask("Table/CardsGroupList", XCardCollectDocument._CardsGroupListTable, false);
			XCardCollectDocument.AsyncLoader.AddTask("Table/CardsList", XCardCollectDocument._CardsListTable, false);
			XCardCollectDocument.AsyncLoader.Execute(callback);
		}

		public static void OnTableLoaded()
		{
			XCardCollectDocument._CardsGroupInfo.Clear();
			for (int i = 0; i <= XCardCollectDocument.GroupMax; i++)
			{
				bool flag = i == 0;
				if (flag)
				{
					XCardCollectDocument._CardsGroupInfo.Add(null);
				}
				else
				{
					XDeck xdeck = new XDeck();
					xdeck.StarLevelMAX = XCardCollectDocument._CardsGroupListTable.Table[i - 1].BreakLevel.Length;
					xdeck.Name = XCardCollectDocument._CardsGroupListTable.Table[i - 1].GroupName;
					for (int j = 0; j <= xdeck.StarLevelMAX; j++)
					{
						xdeck.ActionNumReward.Add(new List<CardsFireProperty.RowData>());
					}
					XCardCollectDocument._CardsGroupInfo.Add(xdeck);
				}
			}
			for (int k = 0; k < XCardCollectDocument._CardsGroupTable.Table.Length; k++)
			{
				XCardCombination xcardCombination = new XCardCombination();
				xcardCombination.status = CardCombinationStatus.None;
				xcardCombination.data = XCardCollectDocument._CardsGroupTable.Table[k];
				xcardCombination.InitStarPostion(xcardCombination.data);
				int groupId = (int)xcardCombination.data.GroupId;
				XCardCollectDocument._CardsGroupInfo[groupId].combDic.Add(xcardCombination.data.TeamId, xcardCombination);
			}
			for (int l = 0; l < XCardCollectDocument._CardsFirePropertyTable.Table.Length; l++)
			{
				CardsFireProperty.RowData rowData = XCardCollectDocument._CardsFirePropertyTable.Table[l];
				int groupId2 = (int)rowData.GroupId;
				int breakLevel = (int)rowData.BreakLevel;
				XCardCollectDocument._CardsGroupInfo[groupId2].ActionNumReward[breakLevel].Add(rowData);
			}
			for (int m = 0; m < XCardCollectDocument._CardsListTable.Table.Length; m++)
			{
				CardsList.RowData rowData2 = XCardCollectDocument._CardsListTable.Table[m];
				int groupId3 = (int)rowData2.GroupId;
				bool flag2 = groupId3 < 0 || groupId3 >= XCardCollectDocument._CardsGroupInfo.Count;
				if (flag2)
				{
					XSingleton<XDebug>.singleton.AddLog(groupId3.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
				}
				XCardCollectDocument._CardsGroupInfo[groupId3].CardList.Add(rowData2);
			}
		}

		public static CardsGroup.RowData GetCardsGroup(uint teamId)
		{
			return XCardCollectDocument._CardsGroupTable.GetByTeamId(teamId);
		}

		public static CardsList.RowData GetCards(uint cardId)
		{
			return XCardCollectDocument._CardsListTable.GetByCardId(cardId);
		}

		public static CardsGroupList.RowData GetCardGroup(uint groupId)
		{
			return XCardCollectDocument._CardsGroupListTable.GetByGroupId(groupId);
		}

		public static CardsList.RowData[] GetCards()
		{
			return XCardCollectDocument._CardsListTable.Table;
		}

		public static SeqListRef<uint> GetCardGroupAttribute(uint teamId)
		{
			CardsGroup.RowData cardsGroup = XCardCollectDocument.GetCardsGroup(teamId);
			SeqListRef<uint> result = default(SeqListRef<uint>);
			uint key = (uint)XFastEnumIntEqualityComparer<RoleType>.ToInt(XSingleton<XAttributeMgr>.singleton.XPlayerData.Profession);
			AttackType attackType = (AttackType)XSingleton<XEntityMgr>.singleton.RoleInfo.GetByProfID(key).AttackType;
			AttackType attackType2 = attackType;
			if (attackType2 != AttackType.PhysicalAttack)
			{
				if (attackType2 != AttackType.MagicAttack)
				{
					XSingleton<XDebug>.singleton.AddErrorLog("AttackType No Find", null, null, null, null, null);
				}
				else
				{
					result = cardsGroup.FireProperty_2;
				}
			}
			else
			{
				result = cardsGroup.FireProperty_1;
			}
			return result;
		}

		public void InitCardData(SAtlasRecord record)
		{
			for (int i = 1; i <= XCardCollectDocument.GroupMax; i++)
			{
				XCardCollectDocument._CardsGroupInfo[i].Init();
			}
			bool flag = record == null;
			if (!flag)
			{
				for (int j = 0; j < record.atlas.Count; j++)
				{
					uint teamId = record.atlas[j];
					CardsGroup.RowData cardsGroup = XCardCollectDocument.GetCardsGroup(teamId);
					uint groupId = cardsGroup.GroupId;
					XDeck xdeck = XCardCollectDocument._CardsGroupInfo[(int)groupId];
					XCardCombination xcardCombination = xdeck.FindCardCombination(teamId);
					xcardCombination.status = CardCombinationStatus.Activated;
					xdeck.ActionNum++;
				}
				for (int k = 0; k < record.finishdata.Count; k++)
				{
					XDeck xdeck2 = XCardCollectDocument._CardsGroupInfo[(int)record.finishdata[k].groupid];
					xdeck2.CurStarLevel = (int)record.finishdata[k].finishid;
				}
				this.IsCardDirty = true;
				for (int l = 1; l <= XCardCollectDocument.GroupMax; l++)
				{
					XCardCollectDocument._CardsGroupInfo[l].RefreshRedPoint();
				}
			}
		}

		public void RefreshCardGroupListShow()
		{
			uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
			for (int i = 0; i < XCardCollectDocument.GroupMax; i++)
			{
				CardsGroupList.RowData rowData = XCardCollectDocument._CardsGroupListTable.Table[i];
				bool flag = rowData.ShowLevel <= level;
				if (flag)
				{
					this.m_CurShowGroup = rowData.GroupId;
				}
				bool flag2 = rowData.OpenLevel <= level;
				if (flag2)
				{
					this.m_CurOpenGroup = rowData.GroupId;
				}
			}
		}

		public void Select(uint index)
		{
			bool flag = index > 0u || (ulong)index <= (ulong)((long)XCardCollectDocument.GroupMax);
			if (flag)
			{
				this.m_CurSelectGroup = index;
			}
			bool flag2 = DlgBase<CardCollectView, CardCollectBehaviour>.singleton.IsVisible();
			if (flag2)
			{
				this.View.RefreshShowDeck(false);
			}
		}

		public void AddAttribute(uint id, uint addVal)
		{
			uint num;
			bool flag = !this.m_AttrSum.TryGetValue(id, out num);
			if (flag)
			{
				this.m_AttrSum.Add(id, addVal);
			}
			else
			{
				this.m_AttrSum[id] = num + addVal;
			}
		}

		public void OnRefreshAttr(PtcG2C_SynAtlasAttr roPtc)
		{
			this.m_AttrSum.Clear();
			for (int i = 0; i < roPtc.Data.allAttrs.Count; i++)
			{
				XCardCollectDocument._CardsGroupInfo[i + 1].RefreshAttr(roPtc.Data.allAttrs[i]);
			}
		}

		public List<XItem> GetCard()
		{
			ulong filterValue = this.m_Filter.FilterValue;
			this.m_ItemList.Clear();
			XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemsByType(filterValue, ref this.m_ItemList);
			return this.m_ItemList;
		}

		public void ReqActive(uint teamid)
		{
			RpcC2G_ActivatAtlas rpcC2G_ActivatAtlas = new RpcC2G_ActivatAtlas();
			rpcC2G_ActivatAtlas.oArg.teamid = teamid;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ActivatAtlas);
		}

		public void OnActive(ActivatAtlasArg oArg, ActivatAtlasRes oRes)
		{
			CardsGroup.RowData cardsGroup = XCardCollectDocument.GetCardsGroup(oArg.teamid);
			XDeck xdeck = XCardCollectDocument._CardsGroupInfo[(int)cardsGroup.GroupId];
			XCardCombination xcardCombination = null;
			xdeck.combDic.TryGetValue(oArg.teamid, out xcardCombination);
			xcardCombination.status = CardCombinationStatus.Activated;
			xdeck.ActionNum++;
			xdeck.IsDeckDirty = true;
			XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XSingleton<XStringTable>.singleton.GetString("CARD_ACTIVE_OK"), xcardCombination.data.TeamName), "fece00");
			bool flag = this.View != null;
			if (flag)
			{
				this.View.RefreshShowDeck(false);
			}
			for (int i = 0; i < xdeck.ActionNumReward[xdeck.CurStarLevel].Count; i++)
			{
				bool flag2 = (ulong)xdeck.ActionNumReward[xdeck.CurStarLevel][i].FireCounts == (ulong)((long)xdeck.ActionNum);
				if (flag2)
				{
					bool flag3 = this.View != null;
					if (flag3)
					{
						this.View.ShowGetReward(i);
					}
				}
			}
		}

		public void ReqBreak(int itemID, int num)
		{
			RpcC2G_breakAtlas rpcC2G_breakAtlas = new RpcC2G_breakAtlas();
			rpcC2G_breakAtlas.oArg.atlaId = (uint)itemID;
			rpcC2G_breakAtlas.oArg.atlaNum = (uint)num;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_breakAtlas);
		}

		public void OnBreak(breakAtlas oArg, breakAtlasRes oRes)
		{
		}

		public void ReqAutoBreak(List<uint> quality)
		{
			RpcC2G_AutoBreakAtlas rpcC2G_AutoBreakAtlas = new RpcC2G_AutoBreakAtlas();
			for (int i = 0; i < quality.Count; i++)
			{
				rpcC2G_AutoBreakAtlas.oArg.quilts.Add(quality[i]);
			}
			rpcC2G_AutoBreakAtlas.oArg.groupId = (uint)this.CurSelectGroup;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_AutoBreakAtlas);
		}

		public void OnAutoBreak(AutoBreakAtlasArg oArg, AutoBreakAtlasRes oRes)
		{
			bool flag = this.View != null && this.View.CurPage == CardPage.CardAll;
			if (flag)
			{
				this.View.TotalHandler.ShowHandler(false);
			}
		}

		public int GetCardCount(int itemID)
		{
			bool isCardDirty = this.IsCardDirty;
			if (isCardDirty)
			{
				this.RefreshCardList();
			}
			XItem xitem;
			this.m_HasCardList.TryGetValue(itemID, out xitem);
			return (xitem == null) ? 0 : xitem.itemCount;
		}

		public void RefreshCardList()
		{
			this.IsCardDirty = false;
			this.m_HasCardList.Clear();
			List<XItem> card = this.GetCard();
			for (int i = 0; i < card.Count; i++)
			{
				this.m_HasCardList.Add(card[i].itemID, card[i]);
			}
		}

		public bool GetRedPoint()
		{
			for (int i = 1; i <= XCardCollectDocument.GroupMax; i++)
			{
				bool redPoint = XCardCollectDocument._CardsGroupInfo[i].redPoint;
				if (redPoint)
				{
					return true;
				}
			}
			return false;
		}

		public void ReqUpStar()
		{
			RpcC2G_AtlasUpStar rpcC2G_AtlasUpStar = new RpcC2G_AtlasUpStar();
			rpcC2G_AtlasUpStar.oArg.groupid = (uint)this.CurSelectGroup;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_AtlasUpStar);
		}

		public void ChangeStar(int star, int groupid = 0)
		{
			bool flag = groupid == 0;
			if (flag)
			{
				groupid = this.CurSelectGroup;
			}
			XCardCollectDocument._CardsGroupInfo[groupid].Init();
			XCardCollectDocument._CardsGroupInfo[groupid].CurStarLevel = star;
			bool flag2 = this.View != null;
			if (flag2)
			{
				this.View.RefreshShowDeck(false);
			}
			DlgBase<CardCollectView, CardCollectBehaviour>.singleton.PlayLevelUpFx();
		}
	}
}