public void OnCompleteTask(EB.Sparx.Response result) { InputBlockerManager.Instance.UnBlock(InputBlockReason.FUSION_BLOCK_UI_INTERACTION); if (result.sucessful) { if (result.hashtable != null) { DataLookupsCache.Instance.CacheData(result.hashtable); } List <LTShowItemData> mlist = TaskStaticData.GetItemRewardList(taskId); FusionTelemetry.ItemsUmengCurrency(mlist, "任务获得"); Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskId); FusionTelemetry.TaskData.PostEvent(taskId, taskTpl.task_name, taskTpl.task_type.ToString()); if (mlist.Count > 0) { var ht = Johny.HashtablePool.Claim(); ht.Add("reward", mlist); GlobalMenuManager.Instance.Open("LTShowRewardView", ht); } } else { result.CheckAndShowModal(); } }
public override void OnFetchData(EB.Sparx.Response res, int id) { LoadingSpinner.Hide(); if (res.sucessful) { List <Hotfix_LT.Data.TimeLimitActivityStageTemplate> stageTmps = Hotfix_LT.Data.EventTemplateManager.Instance.GetTimeLimitActivityStages(ActivityId); if (LTHotfixManager.GetManager <TaskManager>().CurrentIndex < stageTmps.Count - 1) { LTHotfixManager.GetManager <TaskManager>().CurrentIndex++; } string cachePath; cachePath = "user_prize_data.taskacm_reward." + m_Chest.StageData.Id; DataLookupsCache.Instance.CacheData(cachePath, true); //上传友盟获得钻石,任务 int hcCount = 0; List <LTShowItemData> mlist = m_Chest.StageData.Awards; for (int i = 0; i < mlist.Count; i++) { if (mlist[i].id == "hc") { hcCount += mlist[i].count; } } FusionTelemetry.PostBonus(hcCount, Umeng.GA.BonusSource.Source2); GlobalMenuManager.Instance.Open("LTShowRewardView", m_Chest.StageData.Awards); UpdateChest(); } else { res.CheckAndShowModal(); //SparxHub.Instance.FatalError(res.localizedError); } }
public override void OnFetchData(EB.Sparx.Response res, int reqInstanceID) { LoadingSpinner.Hide(); if (res.sucessful) { string key = mTaskType == eTaskType.Normal?"user_prize_data.taskliveness_reward.":"user_prize_data.taskliveness_week_reward."; string cachePath = key + m_CurrReceiveChest.StageData.Id; DataLookupsCache.Instance.CacheData(cachePath, true); //上传友盟获得钻石,任务 int hcCount = 0; List <LTShowItemData> mlist = m_CurrReceiveChest.StageData.Awards; for (int i = 0; i < mlist.Count; i++) { if (mlist[i].id == "hc") { hcCount += mlist[i].count; } } FusionTelemetry.PostBonus(hcCount, Umeng.GA.BonusSource.Source2); GlobalMenuManager.Instance.Open("LTShowRewardView", m_CurrReceiveChest.StageData.Awards); } else { res.CheckAndShowModal(); } }
public override void OnFetchData(EB.Sparx.Response res, int reqInstanceID) { if (res.sucessful) { VictoryAnimNode.CustomSetActive(true); FusionAudio.PostEvent("MUS/CombatView/Stinger/Victory", controller.gameObject, true); LTBountyTaskHudController.DeleteMonster(mNpcLocator); GameDataSparxManager.Instance.ProcessIncomingData(res.result, true); } else { res.CheckAndShowModal(); BtnClickLimit = false; } }