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
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
|
using System;
using System.Collections.Generic;
using UILib;
using UnityEngine;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient
{
internal class XGuildJokerCommonView<T> : DlgBase<T, XGuildJokerBehaviour> where T : IXUIDlg, new()
{
public override int layer
{
get
{
return 1;
}
}
public override bool pushstack
{
get
{
return true;
}
}
public override bool hideMainMenu
{
get
{
return true;
}
}
public override bool autoload
{
get
{
return true;
}
}
protected virtual int CurrentStore
{
get
{
return 0;
}
}
protected virtual int CurrentCardCount
{
get
{
return 0;
}
}
protected virtual uint CardResult
{
get
{
return 0u;
}
}
protected virtual List<uint> BestCard
{
get
{
return new List<uint>();
}
}
protected virtual string BestName
{
get
{
return string.Empty;
}
}
protected virtual List<uint> CurrentCard
{
get
{
return new List<uint>();
}
}
protected uint _currentChangeCard;
private uint _oldCardNum;
private uint _oldCardType;
private uint _newCardNum;
private uint _newCardType;
private int _cardChangeNum;
protected bool _changeCardLock;
protected bool _cardLock;
public XTimerMgr.ElapsedEventHandler ResetJokerStatusCb = null;
public XGuildJokerCommonView()
{
this.ResetJokerStatusCb = new XTimerMgr.ElapsedEventHandler(this.ResetJokerStatus);
}
protected override void Init()
{
base.Init();
this.CreateCard();
}
protected override void OnUnload()
{
base.OnUnload();
}
protected override void OnShow()
{
base.OnShow();
base.uiBehaviour.m_Rule.gameObject.SetActive(false);
this.ClearCard();
this.SetGameTipStatus(false);
this.ResetJokerStatus(null);
this._cardLock = false;
this._changeCardLock = false;
}
public virtual void SetCurrentReward()
{
}
protected virtual bool OnCloseClick(IXUIButton button)
{
return false;
}
protected virtual bool OnEndGameClicked(IXUIButton button)
{
return false;
}
protected virtual bool OnStartGameClicked(IXUIButton button)
{
return false;
}
protected virtual void OnCardClick(IXUISprite sp)
{
}
protected override void OnHide()
{
base.OnHide();
base.uiBehaviour.m_JokerPic.SetTexturePath("");
}
public override void RegisterEvent()
{
base.RegisterEvent();
base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClick));
base.uiBehaviour.m_ReCharge.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRechargeClicked));
base.uiBehaviour.m_AddCoin.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAddCoinClicked));
base.uiBehaviour.m_StartGame.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnStartGameClicked));
base.uiBehaviour.m_RuleClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRuleCloseClicked));
}
private bool OnRuleCloseClicked(IXUIButton sp)
{
base.uiBehaviour.m_Rule.gameObject.SetActive(false);
return true;
}
private bool OnHelpClick(IXUIButton button)
{
base.uiBehaviour.m_Rule.gameObject.SetActive(true);
this.SetupRuleFrame();
return true;
}
private bool OnRechargeClicked(IXUIButton button)
{
XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Recharge, 0UL);
return true;
}
private bool OnAddCoinClicked(IXUIButton button)
{
XPurchaseView singleton = DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton;
singleton.ReqQuickCommonPurchase(ItemEnum.GOLD);
return true;
}
public void SetButtonTip(string tip)
{
base.uiBehaviour.m_ButtonTip.SetText(XStringDefineProxy.GetString(tip));
}
private void CreateCard()
{
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 13; j++)
{
string location = string.Format("UI/Guild/Card/Card{0}", j + 1);
base.uiBehaviour.m_Card[i, j] = (XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefab(location, true, false) as GameObject).transform;
bool flag = i == 0;
if (flag)
{
base.uiBehaviour.m_Card[i, j].Find("T1").gameObject.SetActive(false);
(base.uiBehaviour.m_Card[i, j].Find("Hs").GetComponent("XUISprite") as IXUISprite).SetSprite("pk_01");
}
else
{
bool flag2 = i == 1;
if (flag2)
{
base.uiBehaviour.m_Card[i, j].Find("T1").gameObject.SetActive(false);
(base.uiBehaviour.m_Card[i, j].Find("Hs").GetComponent("XUISprite") as IXUISprite).SetSprite("pk_02");
}
else
{
bool flag3 = i == 2;
if (flag3)
{
base.uiBehaviour.m_Card[i, j].Find("T2").gameObject.SetActive(false);
(base.uiBehaviour.m_Card[i, j].Find("Hs").GetComponent("XUISprite") as IXUISprite).SetSprite("pk_03");
}
else
{
bool flag4 = i == 3;
if (flag4)
{
base.uiBehaviour.m_Card[i, j].Find("T2").gameObject.SetActive(false);
(base.uiBehaviour.m_Card[i, j].Find("Hs").GetComponent("XUISprite") as IXUISprite).SetSprite("pk_04");
}
}
}
}
base.uiBehaviour.m_Card[i, j].parent = base.uiBehaviour.m_CardBag;
base.uiBehaviour.m_Card[i, j].localScale = Vector3.one;
base.uiBehaviour.m_Card[i, j].name = (i * 13 + j).ToString();
IXUISprite ixuisprite = base.uiBehaviour.m_Card[i, j].GetComponent("XUISprite") as IXUISprite;
ixuisprite.ID = (ulong)((j + 1) * 16 + i);
ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCardClick));
base.uiBehaviour.m_Card[i, j].gameObject.SetActive(false);
}
}
}
public void ClearCard()
{
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 13; j++)
{
base.uiBehaviour.m_Card[i, j].gameObject.SetActive(false);
base.uiBehaviour.m_Card[i, j].gameObject.transform.Find("Back").gameObject.SetActive(false);
base.uiBehaviour.m_Card[i, j].gameObject.transform.Find("Select").gameObject.SetActive(false);
(base.uiBehaviour.m_Card[i, j].GetComponent("XUIPlayTween") as IXUITweenTool).ResetTween(true);
}
}
this._changeCardLock = false;
}
public void RefreshCard()
{
this.ClearCard();
XSingleton<XDebug>.singleton.AddGreenLog("RefreshCard Times ??????", this.CurrentCardCount.ToString(), null, null, null, null);
bool flag = this.CurrentCardCount != 0;
if (flag)
{
XSingleton<XTimerMgr>.singleton.SetTimer(0.5f, new XTimerMgr.ElapsedEventHandler(this.SetupCard), 0);
this._cardLock = true;
}
else
{
this._cardLock = false;
}
}
private void SetupCard(object o)
{
int num = (int)o;
bool flag = num >= this.CurrentCardCount;
if (!flag)
{
uint num2 = this.CardAnalyze(this.CurrentCard[num]);
uint num3 = num2 >> 4;
uint num4 = num2 % 16u;
base.uiBehaviour.m_Card[(int)num4, (int)(num3 - 1u)].gameObject.SetActive(true);
(base.uiBehaviour.m_Card[(int)num4, (int)(num3 - 1u)].GetComponent("XUIPlayTween") as IXUITweenTool).ResetTween(true);
base.uiBehaviour.m_Card[(int)num4, (int)(num3 - 1u)].transform.position = base.uiBehaviour.m_CardPos[num].position;
base.uiBehaviour.m_Card[(int)num4, (int)(num3 - 1u)].transform.rotation = base.uiBehaviour.m_CardPos[num].rotation;
this.OnCardTween4Finish(base.uiBehaviour.m_Card[(int)num4, (int)(num3 - 1u)].GetComponent("XUIPlayTween") as IXUITweenTool);
bool flag2 = num + 1 < this.CurrentCardCount;
if (flag2)
{
XSingleton<XTimerMgr>.singleton.SetTimer(0.2f, new XTimerMgr.ElapsedEventHandler(this.SetupCard), num + 1);
}
else
{
this._cardLock = false;
}
}
}
private uint CardAnalyze(uint cardNum)
{
uint num = cardNum >> 4;
uint num2 = cardNum % 16u;
bool flag = num == 14u;
if (flag)
{
num = 1u;
}
return (num << 4) + num2;
}
protected uint CardReAnalyze(uint cardNum)
{
uint num = cardNum >> 4;
uint num2 = cardNum % 16u;
bool flag = num == 1u;
if (flag)
{
num = 14u;
}
return (num << 4) + num2;
}
public void ChangeCard(uint oldCard, uint newCard, int cardNum)
{
bool flag = newCard == 0u || oldCard == 0u || cardNum == -1;
if (!flag)
{
uint num = this.CardAnalyze(oldCard);
uint num2 = this.CardAnalyze(newCard);
this._oldCardNum = num >> 4;
this._oldCardType = num % 16u;
this._newCardNum = num2 >> 4;
this._newCardType = num2 % 16u;
this._cardChangeNum = cardNum;
XSingleton<XDebug>.singleton.AddGreenLog("Change Card:", this._oldCardNum.ToString(), " ", this._oldCardType.ToString(), null, null);
bool flag2 = this._oldCardType < 4u && this._oldCardNum < 14u;
if (flag2)
{
this.ClearCardSelect();
this.PlayCardTween(base.uiBehaviour.m_Card[(int)this._oldCardType, (int)(this._oldCardNum - 1u)].GetComponent("XUIPlayTween") as IXUITweenTool);
}
}
}
public void SetCardStore()
{
bool flag = this.CurrentStore >= XGuildJokerDocument._CardStoreTable.Table.Length;
string jokerLabel;
if (flag)
{
jokerLabel = string.Format("{0}", XStringDefineProxy.GetString("NONE"));
}
else
{
jokerLabel = string.Format("{0}", XGuildJokerDocument._CardStoreTable.Table[this.CurrentStore].words);
}
this.SetJokerLabel(jokerLabel);
}
protected void SetJokerLabel(string strTmp)
{
base.uiBehaviour.m_JokerLabel.SetText(strTmp);
}
protected void SetCurrentRewardStr(string strTmp)
{
base.uiBehaviour.m_CurrentReward.InputText = strTmp;
}
private void ClearCardSelect()
{
for (int i = 0; i < this.CurrentCardCount; i++)
{
uint num = this.CardAnalyze(this.CurrentCard[i]);
uint num2 = num >> 4;
uint num3 = num % 16u;
base.uiBehaviour.m_Card[(int)num3, (int)(num2 - 1u)].Find("Select").gameObject.SetActive(false);
}
}
public void SetupBestCard()
{
bool flag = this.BestCard.Count == 0;
if (flag)
{
for (int i = 0; i < 5; i++)
{
base.uiBehaviour.m_BestCardColor[i].SetVisible(false);
base.uiBehaviour.m_BestCardNum1[i].SetVisible(false);
base.uiBehaviour.m_BestCardNum2[i].SetVisible(false);
}
}
for (int j = 0; j < this.BestCard.Count; j++)
{
uint num = this.CardAnalyze(this.BestCard[j]);
uint num2 = num >> 4;
uint num3 = num % 16u;
base.uiBehaviour.m_BestCardColor[j].SetVisible(true);
base.uiBehaviour.m_BestCardColor[j].SetSprite(string.Format("pk_0{0}", num3 + 1u));
bool flag2 = num3 < 2u;
if (flag2)
{
base.uiBehaviour.m_BestCardNum1[j].SetVisible(false);
base.uiBehaviour.m_BestCardNum2[j].SetVisible(true);
bool flag3 = num2 > 1u && num2 < 11u;
if (flag3)
{
base.uiBehaviour.m_BestCardNum2[j].SetText(num2.ToString());
}
else
{
bool flag4 = num2 == 1u;
if (flag4)
{
base.uiBehaviour.m_BestCardNum2[j].SetText("A");
}
else
{
bool flag5 = num2 == 11u;
if (flag5)
{
base.uiBehaviour.m_BestCardNum2[j].SetText("J");
}
else
{
bool flag6 = num2 == 12u;
if (flag6)
{
base.uiBehaviour.m_BestCardNum2[j].SetText("Q");
}
else
{
bool flag7 = num2 == 13u;
if (flag7)
{
base.uiBehaviour.m_BestCardNum2[j].SetText("K");
}
}
}
}
}
}
else
{
base.uiBehaviour.m_BestCardNum1[j].SetVisible(true);
base.uiBehaviour.m_BestCardNum2[j].SetVisible(false);
bool flag8 = num2 > 1u && num2 < 11u;
if (flag8)
{
base.uiBehaviour.m_BestCardNum1[j].SetText(num2.ToString());
}
else
{
bool flag9 = num2 == 1u;
if (flag9)
{
base.uiBehaviour.m_BestCardNum1[j].SetText("A");
}
else
{
bool flag10 = num2 == 11u;
if (flag10)
{
base.uiBehaviour.m_BestCardNum1[j].SetText("J");
}
else
{
bool flag11 = num2 == 12u;
if (flag11)
{
base.uiBehaviour.m_BestCardNum1[j].SetText("Q");
}
else
{
bool flag12 = num2 == 13u;
if (flag12)
{
base.uiBehaviour.m_BestCardNum1[j].SetText("K");
}
}
}
}
}
}
}
base.uiBehaviour.m_BestPlayerName.SetText(this.BestName);
}
protected virtual SeqListRef<uint> GetCardReward(int index)
{
return XGuildJokerDocument._CardRewardTable.Table[index].reward;
}
public void SetupRuleFrame()
{
base.uiBehaviour.m_RuleItemPool.FakeReturnAll();
for (int i = 0; i < XGuildJokerDocument._CardRewardTable.Table.Length; i++)
{
string text = string.Format("Bg/RulePanel/RuleTpl{0}/ScoreTip", i + 1);
IXUILabel ixuilabel = base.uiBehaviour.m_Rule.Find(text).GetComponent("XUILabel") as IXUILabel;
bool flag = ixuilabel != null;
if (flag)
{
ixuilabel.SetText(XGuildJokerDocument._CardRewardTable.Table[i].point.ToString());
}
SeqListRef<uint> cardReward = this.GetCardReward(i);
for (int j = 0; j < cardReward.Count; j++)
{
GameObject gameObject = base.uiBehaviour.m_RuleItemPool.FetchGameObject(false);
IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
ixuisprite.ID = (ulong)cardReward[j, 0];
XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)cardReward[j, 0], (int)cardReward[j, 1], false);
gameObject.transform.localPosition = base.uiBehaviour.m_RuleItemPool.TplPos + new Vector3((float)(j * base.uiBehaviour.m_RuleItemPool.TplWidth), (float)(-(float)i * base.uiBehaviour.m_RuleItemPool.TplHeight));
ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
}
}
base.uiBehaviour.m_RuleItemPool.ActualReturnAll(false);
base.uiBehaviour.m_RuleScrollView.ResetPosition();
}
private void PlayCardTween(IXUITweenTool cardTween)
{
bool flag = !base.IsVisible();
if (!flag)
{
bool flag2 = this.CurrentCardCount == 0;
if (!flag2)
{
XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/puke", true, AudioChannel.Action);
this._changeCardLock = true;
cardTween.PlayTween(true, -1f);
cardTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnCardTween1Finish));
}
}
}
private void OnCardTween1Finish(IXUITweenTool cardTween)
{
bool flag = !base.IsVisible();
if (!flag)
{
bool flag2 = this.CurrentCardCount == 0;
if (!flag2)
{
Transform transform = cardTween.gameObject.transform.Find("Back");
transform.gameObject.SetActive(true);
cardTween.PlayTween(false, -1f);
cardTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnCardTween2Finish));
}
}
}
private void PlayCardWaitTween(object o)
{
bool flag = !base.IsVisible();
if (!flag)
{
bool flag2 = this.CurrentCardCount == 0;
if (!flag2)
{
base.uiBehaviour.m_Card[(int)this._oldCardType, (int)(this._oldCardNum - 1u)].gameObject.SetActive(false);
base.uiBehaviour.m_Card[(int)this._newCardType, (int)(this._newCardNum - 1u)].gameObject.SetActive(true);
base.uiBehaviour.m_Card[(int)this._newCardType, (int)(this._newCardNum - 1u)].transform.position = base.uiBehaviour.m_CardPos[this._cardChangeNum].position;
base.uiBehaviour.m_Card[(int)this._newCardType, (int)(this._newCardNum - 1u)].transform.rotation = base.uiBehaviour.m_CardPos[this._cardChangeNum].rotation;
base.uiBehaviour.m_Card[(int)this._newCardType, (int)(this._newCardNum - 1u)].transform.Find("Back").gameObject.SetActive(true);
base.uiBehaviour.m_Card[(int)this._newCardType, (int)(this._newCardNum - 1u)].transform.Find("Select").gameObject.SetActive(false);
IXUITweenTool ixuitweenTool = base.uiBehaviour.m_Card[(int)this._newCardType, (int)(this._newCardNum - 1u)].GetComponent("XUIPlayTween") as IXUITweenTool;
ixuitweenTool.ResetTween(true);
ixuitweenTool.PlayTween(true, -1f);
ixuitweenTool.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnCardTween3Finish));
}
}
}
private void OnCardTween2Finish(IXUITweenTool cardTween)
{
bool flag = !base.IsVisible();
if (!flag)
{
bool flag2 = this.CurrentCardCount == 0;
if (!flag2)
{
XSingleton<XTimerMgr>.singleton.SetTimer(0.3f, new XTimerMgr.ElapsedEventHandler(this.PlayCardWaitTween), cardTween);
cardTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnCardTween3Finish));
}
}
}
private void OnCardTween4Finish(IXUITweenTool cardTween)
{
bool flag = !base.IsVisible();
if (!flag)
{
bool flag2 = this.CurrentCardCount == 0;
if (!flag2)
{
cardTween.gameObject.transform.Find("Back").gameObject.SetActive(true);
cardTween.gameObject.transform.Find("Select").gameObject.SetActive(false);
XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/puke", true, AudioChannel.Action);
this._changeCardLock = true;
cardTween.ResetTween(true);
cardTween.PlayTween(true, -1f);
cardTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnCardTween3Finish));
}
}
}
private void OnCardTween3Finish(IXUITweenTool cardTween)
{
bool flag = !base.IsVisible();
if (!flag)
{
bool flag2 = this.CurrentCardCount == 0;
if (!flag2)
{
Transform transform = cardTween.gameObject.transform.Find("Back");
transform.gameObject.SetActive(false);
cardTween.PlayTween(false, -1f);
cardTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnCardTweenOver));
}
}
}
private void OnCardTweenOver(IXUITweenTool cardTween)
{
bool flag = !base.IsVisible();
if (!flag)
{
bool flag2 = this.CurrentCardCount == 0;
if (!flag2)
{
this._changeCardLock = false;
this.SetCurrentReward();
}
}
}
protected void RefreshCardSelect()
{
bool flag = this.CardResult == 0u || this.CardResult == 2u || this.CardResult == 3u || this.CardResult == 4u;
if (flag)
{
for (int i = 0; i < this.CurrentCardCount; i++)
{
uint num = this.CardAnalyze(this.CurrentCard[i]);
uint num2 = num >> 4;
uint type = num % 16u;
this.SetCardSelected(type, num2 - 1u);
}
}
else
{
for (int j = 0; j < this.CurrentCardCount; j++)
{
uint num3 = this.CardAnalyze(this.CurrentCard[j]);
uint num4 = num3 >> 4;
uint type2 = num3 % 16u;
for (int k = j + 1; k < this.CurrentCardCount; k++)
{
uint num5 = this.CardAnalyze(this.CurrentCard[k]);
uint num6 = num5 >> 4;
uint type3 = num5 % 16u;
bool flag2 = num4 == num6;
if (flag2)
{
this.SetCardSelected(type2, num4 - 1u);
this.SetCardSelected(type3, num6 - 1u);
}
}
}
}
}
private void SetCardSelected(uint type, uint index)
{
bool flag = type >= 4u || index >= 13u;
if (flag)
{
XSingleton<XDebug>.singleton.AddErrorLog(string.Format("type == {0}, index={1}", type, index), null, null, null, null, null);
}
else
{
bool flag2 = base.uiBehaviour.m_Card[(int)type, (int)index] == null;
if (!flag2)
{
base.uiBehaviour.m_Card[(int)type, (int)index].Find("Select").gameObject.SetActive(true);
}
}
}
public void JokerStatus(int status)
{
switch (status)
{
case 1:
base.uiBehaviour.m_JokerPic.SetTexturePath("atlas/UI/Social/gh_bg_xcpk_xc0");
break;
case 2:
base.uiBehaviour.m_JokerPic.SetTexturePath("atlas/UI/Social/gh_bg_xcpk_xc1");
break;
case 3:
base.uiBehaviour.m_JokerPic.SetTexturePath("atlas/UI/Social/gh_bg_xcpk_xc2");
break;
}
}
private void ResetJokerStatus(object o = null)
{
bool flag = !base.IsVisible();
if (!flag)
{
this.JokerStatus(1);
}
}
public void SetGameTipStatus(bool status)
{
base.uiBehaviour.m_GameTip.gameObject.SetActive(status);
}
}
}
|