// Token: 0x06000DD6 RID: 3542 RVA: 0x001625B8 File Offset: 0x001607B8 public static int GiftCompare(AllianceActivityGiftDataType x, AllianceActivityGiftDataType y) { bool flag; if (x.Status == 0) { if (y.Status != 0) { return(-1); } flag = true; } else { if (y.Status == 0) { return(1); } flag = true; } if (!flag) { return(-1); } if (x.RcvTime < y.RcvTime) { return(-1); } if (x.RcvTime > y.RcvTime) { return(1); } if (x.serverIndex > y.serverIndex) { return(-1); } return(1); }
// Token: 0x06000DDA RID: 3546 RVA: 0x00162730 File Offset: 0x00160930 public void Recv_MSG_RESP_REDPOCKET_LIST(MessagePacket MP) { byte b = MP.ReadByte(-1); int num = (int)MP.ReadByte(-1); if (b == 255) { this.cleanListData(); for (int i = 0; i < num; i++) { AllianceActivityGiftDataType allianceActivityGiftDataType = new AllianceActivityGiftDataType(); allianceActivityGiftDataType.serverIndex = MP.ReadByte(-1); byte b2 = MP.ReadByte(-1); uint num2 = MP.ReadUInt(-1); bool flag = false; for (int j = 0; j < DataManager.Instance.FastivalSpecialDataTable.TableCount; j++) { flag = false; FastivalSpecialData recordByIndex = DataManager.Instance.FastivalSpecialDataTable.GetRecordByIndex(j); if (b2 == recordByIndex.GroupID) { if (num2 == recordByIndex.StoreID) { flag = true; allianceActivityGiftDataType.SN = recordByIndex.ID; allianceActivityGiftDataType.isLeader = (recordByIndex.StoreID == 0u); allianceActivityGiftDataType.CDtime = false; break; } } } allianceActivityGiftDataType.Name = StringManager.Instance.SpawnString(30); MP.ReadStringPlus(13, allianceActivityGiftDataType.Name, -1); allianceActivityGiftDataType.Rank = MP.ReadByte(-1); allianceActivityGiftDataType.RcvTime = MP.ReadLong(-1); allianceActivityGiftDataType.Num = MP.ReadByte(-1); allianceActivityGiftDataType.Status = MP.ReadByte(-1); if (flag) { this.mListActGift.Add(allianceActivityGiftDataType); } } this.sortData(); } else if (GameConstants.IsBetween((int)b, 0, 9)) { AllianceActivityGiftDataType allianceActivityGiftDataType2 = null; bool flag2 = false; for (int k = 0; k < this.mListActGift.Count; k++) { if (this.mListActGift[k].serverIndex == b) { allianceActivityGiftDataType2 = this.mListActGift[k]; flag2 = true; break; } } if (!flag2) { allianceActivityGiftDataType2 = new AllianceActivityGiftDataType(); allianceActivityGiftDataType2.Name = StringManager.Instance.SpawnString(30); } else { allianceActivityGiftDataType2.Name.ClearString(); } allianceActivityGiftDataType2.serverIndex = MP.ReadByte(-1); byte b3 = MP.ReadByte(-1); uint num3 = MP.ReadUInt(-1); bool flag3 = false; for (int l = 0; l < DataManager.Instance.FastivalSpecialDataTable.TableCount; l++) { flag3 = false; FastivalSpecialData recordByIndex2 = DataManager.Instance.FastivalSpecialDataTable.GetRecordByIndex(l); if (b3 == recordByIndex2.GroupID) { if (num3 == recordByIndex2.StoreID) { flag3 = true; allianceActivityGiftDataType2.SN = recordByIndex2.ID; allianceActivityGiftDataType2.isLeader = (recordByIndex2.StoreID == 0u); allianceActivityGiftDataType2.CDtime = false; break; } } } if (!flag3) { return; } MP.ReadStringPlus(13, allianceActivityGiftDataType2.Name, -1); allianceActivityGiftDataType2.Rank = MP.ReadByte(-1); allianceActivityGiftDataType2.RcvTime = MP.ReadLong(-1); allianceActivityGiftDataType2.Num = MP.ReadByte(-1); allianceActivityGiftDataType2.Status = MP.ReadByte(-1); if (!flag2) { this.mListActGift.Add(allianceActivityGiftDataType2); } } this.RecountGift(); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Alliance_ActivityGift, 1, 0); }