private void OnClickedSave() { if (!this.partyMember.IsScroll()) { string arg = string.Empty; int num = 0; bool flag = false; GameWebAPI.WD_Req_DngStart lastDngReq = DataMng.Instance().GetResultUtilData().GetLastDngReq(); string ticketID = string.Empty; if (null != CMD_QuestTOP.instance) { QuestData.WorldStageData worldStageData = CMD_QuestTOP.instance.GetWorldStageData(); QuestData.WorldDungeonData stageDataBk = CMD_QuestTOP.instance.StageDataBk; if ("8" == worldStageData.worldStageM.worldAreaId) { flag = true; num = stageDataBk.dungeon.dungeonTicketNum.ToInt32(); arg = worldStageData.worldStageM.name; ticketID = stageDataBk.dungeon.userDungeonTicketId; } } else if (lastDngReq != null) { GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons ticketQuestDungeonByTicketID = ClassSingleton <QuestData> .Instance.GetTicketQuestDungeonByTicketID(lastDngReq.userDungeonTicketId); if (ticketQuestDungeonByTicketID != null) { flag = true; num = int.Parse(ticketQuestDungeonByTicketID.dungeonTicketNum); GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM worldDungeonMaster = ClassSingleton <QuestData> .Instance.GetWorldDungeonMaster(ticketQuestDungeonByTicketID.worldDungeonId.ToString()); arg = worldDungeonMaster.name; ticketID = lastDngReq.userDungeonTicketId; } } if (flag) { CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(delegate(int idx) { if (idx == 0) { PlayerPrefs.SetString("userDungeonTicketId", ticketID); this.OnClickedSaveOperation(); } }, "CMD_Confirm", null) as CMD_Confirm; cmd_Confirm.Title = StringMaster.GetString("TicketQuestTitle"); cmd_Confirm.Info = string.Format(StringMaster.GetString("TicketQuestConfirmInfo"), arg, num, num - 1); cmd_Confirm.BtnTextYes = StringMaster.GetString("SystemButtonYes"); cmd_Confirm.BtnTextNo = StringMaster.GetString("SystemButtonClose"); } else { this.OnClickedSaveOperation(); } } }
private IEnumerator DownloadBannerTexture(QuestData.WorldStageData wsd, Action <Texture2D> callback) { if (wsd.worldStageM.worldAreaId == ConstValue.QUEST_AREA_ID_DEFAULT || wsd.worldStageM.worldAreaId == "4" || wsd.worldStageM.worldAreaId == "5" || "null" == wsd.worldStageM.stageImage || string.IsNullOrEmpty(wsd.worldStageM.stageImage)) { callback(null); yield break; } string path = AssetDataMng.GetWebAssetImagePath() + "/events/" + wsd.worldStageM.stageImage; yield return(TextureManager.instance.Load(path, callback, 30f, true)); yield break; }
private void InitS_DungeonRist() { if (this.worldStageData.Count > this.currentSelected && this.currentSelected >= 0) { bool flag = ClassSingleton <QuestTOPAccessor> .Instance != null && ClassSingleton <QuestTOPAccessor> .Instance.nextAreaFlg; if (!flag) { this.worldDungeonData = this.worldStageData[this.currentSelected].wddL; } else if (flag) { string worldStageId = ClassSingleton <QuestTOPAccessor> .Instance.nextStage.worldStageId; for (int i = 0; i < this.worldStageData.Count; i++) { if (this.worldStageData[i].worldStageM.worldStageId == worldStageId) { this.worldDungeonData = this.worldStageData[i].wddL; } } ClassSingleton <QuestTOPAccessor> .Instance.nextAreaFlg = false; } } else { this.worldDungeonData = new List <QuestData.WorldDungeonData>(); } if (this.currentSelected >= 0) { QuestData.WorldStageData worldStageData = this.worldStageData[this.currentSelected]; if (worldStageData != null && worldStageData.wdi.isOpen == 1) { this.goLP_DNG.SetActive(true); this.csSelectPanelS_DungeonR.initLocation = true; List <QuestData.WorldDungeonData> list = new List <QuestData.WorldDungeonData>(); for (int j = 0; j < this.worldDungeonData.Count; j++) { list.Add(this.worldDungeonData[j]); } this.csSelectPanelS_DungeonR.AllBuild(list); } } this.goLP_DNG.SetActive(false); }
public override void ShowGUI() { base.ShowGUI(); switch (this.WorldDungeonData.status) { case 1: this.ngSPR_NEW.gameObject.SetActive(false); break; case 2: this.ngSPR_NEW.MakePixelPerfect(); break; case 3: this.ngSPR_NEW.gameObject.SetActive(false); break; case 4: this.SetClearIcon(); break; } if (this.ngTXT_STAGE != null) { if (ClassSingleton <QuestData> .Instance.ExistSortieLimit(this.WorldDungeonData.dungeon.worldDungeonId)) { this.ngTXT_STAGE.text = StringMaster.GetString("QuestLimited"); } else if (CMD_QuestTOP.instance.IsSpecialDungeon()) { this.ngTXT_STAGE.text = StringMaster.GetString("QuestSpecial"); } else { this.ngTXT_STAGE.text = string.Format(StringMaster.GetString("QuestStage"), this.StageNum.ToInt32()); } } if (this.ngTXT_STAGE_NAME != null) { this.ngTXT_STAGE_NAME.text = this.WorldDungeonData.worldDungeonM.name; } if (!this.IsEventStage) { string worldStageId = this.WorldDungeonData.worldDungeonM.worldStageId; GameWebAPI.RespDataCP_Campaign respDataCP_Campaign = DataMng.Instance().RespDataCP_Campaign; this.campaignInfo = respDataCP_Campaign.GetCampaign(GameWebAPI.RespDataCP_Campaign.CampaignType.QuestStmDown, worldStageId); if (this.ngTXT_STAMINA != null) { int num = int.Parse(this.WorldDungeonData.worldDungeonM.needStamina); if (this.campaignInfo != null) { float num2 = (float)num; num = Mathf.CeilToInt(num2 * float.Parse(this.campaignInfo.rate)); } this.ngTXT_STAMINA.text = string.Format(StringMaster.GetString("QuestStaminaCost"), num); } if (null != this.backgroundBord && null != this.backgroundLine) { if (this.WorldDungeonData.worldDungeonM.IsMultiOnly()) { this.colorMultiStage.a = this.backgroundBord.color.a; this.backgroundBord.color = this.colorMultiStage; this.colorMultiStage.a = this.backgroundLine.color.a; this.backgroundLine.color = this.colorMultiStage; this.colorMultiStageNameOutline.a = this.ngTXT_STAGE_NAME.effectColor.a; this.ngTXT_STAGE_NAME.effectColor = this.colorMultiStageNameOutline; this.ngTXT_STAMINA.effectColor = this.colorMultiStageNameOutline; } else if (this.WorldDungeonData.worldDungeonM.IsSoloOnly()) { this.colorSoloStage.a = this.backgroundBord.color.a; this.backgroundBord.color = this.colorSoloStage; this.colorSoloStage.a = this.backgroundLine.color.a; this.backgroundLine.color = this.colorSoloStage; this.colorSoloStageNameOutline.a = this.ngTXT_STAGE_NAME.effectColor.a; this.ngTXT_STAGE_NAME.effectColor = this.colorSoloStageNameOutline; this.ngTXT_STAMINA.effectColor = this.colorSoloStageNameOutline; } else { this.colorNormalStage.a = this.backgroundBord.color.a; this.backgroundBord.color = this.colorNormalStage; this.colorNormalStage.a = this.backgroundLine.color.a; this.backgroundLine.color = this.colorNormalStage; this.colorSoloMultiStageNameOutline.a = this.ngTXT_STAGE_NAME.effectColor.a; this.ngTXT_STAGE_NAME.effectColor = this.colorSoloMultiStageNameOutline; this.ngTXT_STAMINA.effectColor = this.colorSoloMultiStageNameOutline; } } this.campagin.AreaId = worldStageId; string text = this.campagin.GetText(DataMng.Instance().RespDataCP_Campaign, DataMng.Instance().CampaignForceHide); this.SetExtraEffectDescription(worldStageId, text); } else { this.SetEventStageParts(); } if (null != CMD_QuestTOP.instance) { QuestData.WorldStageData worldStageData = CMD_QuestTOP.instance.GetWorldStageData(); if ("8" == worldStageData.worldStageM.worldAreaId) { this.ngTXT_TICKET_LEFT.gameObject.SetActive(true); if (!string.IsNullOrEmpty(this.WorldDungeonData.dungeon.dungeonTicketNum)) { this.ngTXT_TICKET_LEFT.text = string.Format(StringMaster.GetString("TicketQuestLeftNum"), int.Parse(this.WorldDungeonData.dungeon.dungeonTicketNum)); } else { this.ngTXT_TICKET_LEFT.text = string.Format(StringMaster.GetString("TicketQuestLeftNum"), 0); } } else { this.RefreshShowPlayLimit(); } } this.ShowNoContinue(); this.ShowLockStatus(); }
public void SetData(QuestData.WorldStageData worldStageData, bool animationMoving) { this.worldStageData = worldStageData; this.animationMoving = animationMoving; }