public ActivityHalloweenDataEx(ActivityHalloweenData ahd, int id, int luckyNum, string playerName) { this.mProductID = id; this.mItemID = null; if (luckyNum != 0) { for (int i = 0; i < ahd.Ext.Data.Count; i++) { if (ahd.Ext.Data[i].ID == id) { this.mItemID = ahd.Ext.Data[i].Rewards; break; } } } this.mLuckyNum = luckyNum; this.mPlayerName = playerName; }
public AHDataEx(ActivityHalloweenData ahd, int id, int num, bool notOpen, bool unlucky, bool lucky) { List<RewardData> mItemID = null; if (lucky) { for (int i = 0; i < ahd.Ext.Data.Count; i++) { if (ahd.Ext.Data[i].ID == id) { mItemID = ahd.Ext.Data[i].Rewards; break; } } } this.mItemID = mItemID; this.mNum = num; this.mNotOpen = notOpen; this.mUnlucky = unlucky; }
private void _RefreshEndTime() { if (Globals.Instance.Player == null) { return; } this.RefreshTimeFlag1 = 1f; int num = (Globals.Instance.Player.ActivitySystem.FireRewardTimestamp <= 0) ? 0 : (Globals.Instance.Player.ActivitySystem.FireRewardTimestamp - Globals.Instance.Player.GetTimeStamp()); if (num == 0 && this.lastTime1 == num) { return; } this.lastTime1 = num; this.mData = Globals.Instance.Player.ActivitySystem.HData; if (num > 0) { this.mJinDuCount.text = Singleton<StringManager>.Instance.GetString("festival15", new object[] { Tools.FormatTime(num) }); } }
private void Refresh() { this.mData = Globals.Instance.Player.ActivitySystem.HData; int hScore = Globals.Instance.Player.ActivitySystem.HScore; List<ActivityHalloweenScoreReward> scoreReward = Globals.Instance.Player.ActivitySystem.HData.Ext.ScoreReward; if (Globals.Instance.Player.ActivitySystem.PlayerScore > 0) { this.mCurScoreShow.text = Singleton<StringManager>.Instance.GetString("festival28", new object[] { Globals.Instance.Player.ActivitySystem.PlayerScore }); } else { this.mCurScoreShow.text = string.Empty; } for (int i = 0; i < scoreReward.Count; i++) { UITweener[] components = this.mScoreIcon[i].GetComponents<UITweener>(); this.num[i].text = Globals.Instance.Player.ActivitySystem.HData.Ext.ScoreReward[i].Score.ToString(); if (Globals.Instance.Player.ActivitySystem.PlayerScore < scoreReward[i].Score) { this.mScoreEffect[i].SetActive(false); for (int j = 0; j < components.Length; j++) { components[j].enabled = false; } } else if (GUIHallowmasCupScene.IsGet(i)) { this.mScoreEffect[i].SetActive(false); for (int k = 0; k < components.Length; k++) { components[k].enabled = false; } this.mScoreIcon[i].transform.localRotation = Quaternion.identity; } else { for (int l = 0; l < components.Length; l++) { components[l].enabled = true; } this.mScoreEffect[i].SetActive(true); } } float num = 0f; for (int m = 0; m < scoreReward.Count; m++) { if (Globals.Instance.Player.ActivitySystem.PlayerScore <= scoreReward[m].Score) { float num2 = 0f; if (m > 0) { num2 = (float)scoreReward[m - 1].Score; } num += ((float)Globals.Instance.Player.ActivitySystem.PlayerScore - num2) / ((float)scoreReward[m].Score - num2); break; } num += 1f; } this.mDeedJinDu.fillAmount = num * (1f / (float)scoreReward.Count); this.mZheZhaoJinDu.fillAmount = 1f - this.mXiShu * (float)hScore / (float)this.mData.Ext.FireScore; if (Globals.Instance.Player.ActivitySystem.FireRewardTimestamp - Globals.Instance.Player.GetTimeStamp() > 0) { Globals.Instance.Player.ActivitySystem.HData.Fire = true; this.mEffect.SetActive(true); } else { this.mEffect.SetActive(false); } if (Globals.Instance.Player.ActivitySystem.FireRewardTimestamp - Globals.Instance.Player.GetTimeStamp() > 0) { this.mBtnName[0].text = Singleton<StringManager>.Instance.GetString("festival21"); this.mBtnName[1].text = Singleton<StringManager>.Instance.GetString("festival22"); this.mBtnName[2].text = Singleton<StringManager>.Instance.GetString("festival23"); this._RefreshEndTime(); this.mJinDuCountDiamond.gameObject.SetActive(false); this.mCurDiamond.gameObject.SetActive(true); this.mCurDiamond.text = Singleton<StringManager>.Instance.GetString("festival27", new object[] { Globals.Instance.Player.ActivitySystem.HScore }); } else { this.mCurDiamond.gameObject.SetActive(false); this.mBtnName[0].text = Singleton<StringManager>.Instance.GetString("festival24"); this.mBtnName[1].text = Singleton<StringManager>.Instance.GetString("festival25"); this.mBtnName[2].text = Singleton<StringManager>.Instance.GetString("festival26"); this.mJinDuCount.text = string.Empty; this.mJinDuCountDiamond.gameObject.SetActive(true); this.mJinDuCountDiamond.text = Singleton<StringManager>.Instance.GetString("festival19", new object[] { hScore, this.mData.Ext.FireScore }); this.mJinDuCountDiamondTxt.text = Singleton<StringManager>.Instance.GetString("festival16"); } this.mCupJinDu.fillAmount = this.mXiShu * (float)hScore / (float)this.mData.Ext.FireScore; List<int> hFreeContractIDs = Globals.Instance.Player.ActivitySystem.HFreeContractIDs; List<ActivityHalloweenItem> data = this.mData.Ext.Data; for (int n = 0; n < data.Count; n++) { bool flag = false; if (hFreeContractIDs != null) { for (int num3 = 0; num3 < hFreeContractIDs.Count; num3++) { if (hFreeContractIDs[num3] == data[n].ID) { flag = true; break; } } } if (flag) { this.mDiamondIcon[n].gameObject.SetActive(false); this.mDeedTxt[n].text = Singleton<StringManager>.Instance.GetString("festival5"); this.mDeedTxt[n].transform.localPosition = new Vector3(0f, -41f, 0f); } else { this.mDiamondIcon[n].gameObject.SetActive(true); this.mDeedTxt[n].text = Singleton<StringManager>.Instance.GetString("festival1", new object[] { data[n].Cost }); this.mDeedTxt[n].transform.localPosition = new Vector3(15f, -41f, 0f); } } }
public void LoadData(int buyFundNum, int worldOpenTimeStamp, uint sevenDayVersion, List<SevenDayRewardData> sdrData, uint shareVersion, List<ShareAchievementData> shareData, uint activityAchievementVersion, List<ActivityAchievementData> aaData, uint activityValueVersion, List<ActivityValueData> avData, uint activityShopDataVersion, List<ActivityShopData> asData, ActivityPayData apData, List<ActivityPayShopData> apsData, ActivityRollEquipData reData, ActivitySpecifyPayData spData, ActivityGroupBuyingData gbData, ActivityNationalDayData ieData, ActivityHalloweenData hData) { if (!this.initFlag) { this.InitInfos(); } this.BuyFundNum = buyFundNum; this.WorldOpenTimeStamp = worldOpenTimeStamp; if (sevenDayVersion != 0u && sevenDayVersion != this.SevenDayVersion) { this.SevenDayVersion = sevenDayVersion; for (int i = 0; i < sdrData.Count; i++) { SevenDayRewardDataEx sevenDayReward = this.GetSevenDayReward(sdrData[i].ID); if (sevenDayReward == null) { global::Debug.LogErrorFormat("GetSevenDayReward error, id = {0}", new object[] { sdrData[i].ID }); } else { sevenDayReward.Data.Value = sdrData[i].Value; sevenDayReward.Data.TakeReward = sdrData[i].TakeReward; } } } if (shareVersion != 0u && shareVersion != this.ShareVersion) { this.ShareVersion = shareVersion; for (int j = 0; j < shareData.Count; j++) { ShareAchievementDataEx shareAchievement = this.GetShareAchievement(shareData[j].ID); if (shareAchievement == null) { global::Debug.LogErrorFormat("GetShareAchievement error, id = {0}", new object[] { shareData[j].ID }); } else { shareAchievement.Data.Value = shareData[j].Value; shareAchievement.Data.Shared = shareData[j].Shared; shareAchievement.Data.TakeReward = shareData[j].TakeReward; } } } if (activityAchievementVersion != 0u && activityAchievementVersion != this.ActivityAchievementVersion) { this.ActivityAchievementVersion = activityAchievementVersion; this.AADatas = aaData; } if (activityValueVersion != 0u && activityValueVersion != this.ActivityValueVersion) { this.ActivityValueVersion = activityValueVersion; this.AVDatas = avData; } if (activityShopDataVersion != 0u && activityShopDataVersion != this.ActivityShopVersion) { this.ActivityShopVersion = activityShopDataVersion; this.ActivityShops = asData; } this.APData = apData; if (apsData != null) { this.APSDatas = apsData; } this.REData = reData; this.SPData = spData; this.GBData = gbData; this.IEData = ieData; this.HData = hData; }