private void OnNewNotices(List <NetCache.ProfileNotice> newNotices) { List <long> list = new List <long>(); foreach (NetCache.ProfileNotice notice in newNotices) { if (notice.Type == NetCache.ProfileNotice.NoticeType.ADVENTURE_PROGRESS) { NetCache.ProfileNoticeAdventureProgress progress = notice as NetCache.ProfileNoticeAdventureProgress; if (progress.Progress.HasValue) { this.CreateOrUpdateProgress(false, progress.Wing, progress.Progress.Value); } if (progress.Flags.HasValue) { this.CreateOrUpdateWingFlags(false, progress.Wing, progress.Flags.Value); } list.Add(notice.NoticeID); } } foreach (long num in list) { Network.AckNotice(num); } }
public void AcknowledgeNotices() { long[] numArray = this.m_noticeIDs.ToArray(); this.m_noticeIDs.Clear(); foreach (long num in numArray) { Network.AckNotice(num); } }
public void AddRewardNoticeID(long noticeID) { if (!this.m_rewardNoticeIDs.Contains(noticeID)) { if (this.IsCompleted() && !this.NeedToAcknowledgeProgress(false)) { Network.AckNotice(noticeID); } this.m_rewardNoticeIDs.Add(noticeID); } }
private void OnNewNotices(List <NetCache.ProfileNotice> newNotices) { List <CardRewardData> cardRewards = new List <CardRewardData>(); foreach (NetCache.ProfileNotice notice in newNotices) { if (notice.Type == NetCache.ProfileNotice.NoticeType.HERO_LEVEL_UP) { NetCache.ProfileNoticeLevelUp up = notice as NetCache.ProfileNoticeLevelUp; Get().TriggerHeroLevelAction(true, up.HeroClass, up.NewLevel, cardRewards); Network.AckNotice(notice.NoticeID); } } CollectionManager.Get().AddCardRewards(cardRewards, false); }
public void AckCurrentProgressAndRewardNotices(bool ackIntermediateProgress) { long[] numArray = this.m_rewardNoticeIDs.ToArray(); this.m_rewardNoticeIDs.Clear(); foreach (long num in numArray) { Network.AckNotice(num); } if (this.NeedToAcknowledgeProgress(ackIntermediateProgress)) { this.m_ackProgress = this.Progress; if (this.m_canAck) { Network.AckAchieveProgress(this.ID, this.AcknowledgedProgress); } } }
private void OkayButtonReleased(UIEvent e) { if ((this.m_currentMode == MODE.SEASON_WELCOME) || (this.m_currentMode == MODE.BOOSTED_WELCOME)) { this.Hide(); foreach (long num in this.m_seasonEndInfo.m_noticesToAck) { Network.AckNotice(num); } this.m_okayButton.Disable(); } else if (this.m_currentMode == MODE.RANK_EARNED) { this.m_ribbon.GetComponent <Renderer>().material = this.m_transparentMaterial; this.m_nameFlourish.GetComponent <Renderer>().material = this.m_transparentMaterial; iTween.FadeTo(this.m_nameFlourish.gameObject, 0f, 0.5f); iTween.FadeTo(this.m_rankName.gameObject, 0f, 0.5f); iTween.FadeTo(this.m_rankAchieved.gameObject, 0f, 0.5f); iTween.FadeTo(this.m_leftFiligree.gameObject, 0f, 0.5f); iTween.FadeTo(this.m_rightFiligree.gameObject, 0f, 0.5f); if (this.m_medal.GetMedal().rank == 0) { this.m_medalPlayMaker.SendEvent("JustMedal"); } else { this.m_medalPlayMaker.SendEvent("MedalBanner"); } this.m_okayButton.Disable(); this.m_rankPercentile.gameObject.SetActive(false); } else if (this.m_currentMode == MODE.BONUS_STARS) { this.GotoBoostedMedal(); } }
private void AckNotice(NetCache.ProfileNoticeDisconnectedGame notice) { Network.AckNotice(notice.NoticeID); }
private void OnNewNotices(List <NetCache.ProfileNotice> newNotices) { NetCache.NetCacheAccountLicenses netObject = NetCache.Get().GetNetObject <NetCache.NetCacheAccountLicenses>(); if (netObject == null) { Debug.LogWarning("AccountLicenses.OnNewNotices netCacheAccountLicenses is null -- going to ack all ACCOUNT_LICENSE notices assuming NetCache is not yet loaded"); } HashSet <long> set = new HashSet <long>(); foreach (NetCache.ProfileNotice notice in newNotices) { if (notice.Type == NetCache.ProfileNotice.NoticeType.ACCOUNT_LICENSE) { NetCache.ProfileNoticeAcccountLicense license = notice as NetCache.ProfileNoticeAcccountLicense; if (netObject != null) { if (!netObject.AccountLicenses.ContainsKey(license.License)) { AccountLicenseInfo info = new AccountLicenseInfo { License = license.License, Flags_ = 0L, CasId = 0L }; netObject.AccountLicenses[license.License] = info; } if (license.CasID > netObject.AccountLicenses[license.License].CasId) { netObject.AccountLicenses[license.License].CasId = license.CasID; if (notice.Origin == NetCache.ProfileNotice.NoticeOrigin.ACCOUNT_LICENSE_FLAGS) { netObject.AccountLicenses[license.License].Flags_ = (ulong)notice.OriginData; } else { object[] args = new object[] { notice.Origin, notice.OriginData, license.License, license.CasID }; Debug.LogWarning(string.Format("AccountLicenses.OnNewNotices unexpected notice origin {0} (data={1}) for license {2} casID {3}", args)); } set.Add(license.License); } } Network.AckNotice(notice.NoticeID); } } if (netObject != null) { List <AccountLicenseInfo> changedLicensesInfo = new List <AccountLicenseInfo>(); foreach (long num in set) { if (netObject.AccountLicenses.ContainsKey(num)) { changedLicensesInfo.Add(netObject.AccountLicenses[num]); } } if (changedLicensesInfo.Count != 0) { foreach (AccountLicensesChangedListener listener in this.m_accountLicensesChangedListeners.ToArray()) { listener.Fire(changedLicensesInfo); } } } }