public bool IsClear(sbyte bFloor, sbyte bSubFloor) { if ((int)this.GetFloor() < (int)bFloor) { return(false); } if ((int)this.GetFloor() == (int)bFloor && (int)this.GetSubFloor() < (int)bSubFloor) { return(false); } if ((int)this.GetFloor() == (int)bFloor && (int)this.GetSubFloor() == (int)bSubFloor) { if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null) { return(false); } NEWEXPLORATION_DATA data = this.GetData(bFloor, bSubFloor); if (data == null) { return(false); } if (this.GetBossDamage() < data.i32BossHp) { return(false); } } return(true); }
public override bool ParseDataFromNDT(TsDataReader dr) { foreach (TsDataReader.Row data in dr) { NEWEXPLORATION_DATA nEWEXPLORATION_DATA = new NEWEXPLORATION_DATA(); string charcode = nEWEXPLORATION_DATA.SetData(data); nEWEXPLORATION_DATA.i32BossCharKind = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(charcode); NrTSingleton <NewExplorationManager> .Instance.AddData(nEWEXPLORATION_DATA); } return(true); }
public void SetFloorList() { Dictionary <short, NEWEXPLORATION_DATA> dataList = NrTSingleton <NewExplorationManager> .Instance.GetDataList(); sbyte b = -1; string empty = string.Empty; this.m_nlbFloor.Clear(); sbyte floor = NrTSingleton <NewExplorationManager> .Instance.GetFloor(); sbyte b2 = -1; NEWEXPLORATION_DATA nEWEXPLORATION_DATA = NrTSingleton <NewExplorationManager> .Instance.CanGetTreasureData(); if (nEWEXPLORATION_DATA != null) { b2 = nEWEXPLORATION_DATA.bFloor; } foreach (KeyValuePair <short, NEWEXPLORATION_DATA> current in dataList) { if ((int)b != (int)current.Value.bFloor) { b = current.Value.bFloor; NewListItem newListItem = new NewListItem(this.m_nlbFloor.ColumnNum, true, string.Empty); newListItem.SetListItemData(1, string.Empty, b, new EZValueChangedDelegate(this.OnClickFloorList), null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3424"), "count", (int)b }); newListItem.SetListItemData(2, empty, null, null, null); newListItem.SetListItemData(3, (int)b < (int)floor); for (int i = 0; i < 3; i++) { newListItem.SetListItemData(i + 4, false); newListItem.SetListItemData(i + 7, false); } newListItem.SetListItemData(10, (int)b == (int)this.m_bSelectedFloor); newListItem.SetListItemData(11, (int)b == (int)b2); this.m_nlbFloor.Add(newListItem); } } this.m_nlbFloor.RepositionItems(); this.SetStageList(); }
public override void SetComponent() { this.m_lbDragonHeart = (base.GetControl("LB_DragonHeart") as Label); this.m_btEnd = (base.GetControl("Button_End") as Button); Button expr_32 = this.m_btEnd; expr_32.Click = (EZValueChangedDelegate)Delegate.Combine(expr_32.Click, new EZValueChangedDelegate(this.OnClickEnd)); this.m_btCancel = (base.GetControl("Button_Cancel") as Button); Button expr_6F = this.m_btCancel; expr_6F.Click = (EZValueChangedDelegate)Delegate.Combine(expr_6F.Click, new EZValueChangedDelegate(this.OnClickCancel)); int num = 0; NEWEXPLORATION_DATA endRewardData = NrTSingleton <NewExplorationManager> .Instance.GetEndRewardData(); if (endRewardData != null) { num = endRewardData.i32RewardCount; } this.m_lbDragonHeart.SetText(ANNUALIZED.Convert(num)); }
public void SetInfo() { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (NrTSingleton <NewExplorationManager> .Instance.GetPlayState() != eNEWEXPLORATION_PLAYSTATE.eNEWEXPLORATION_PLAYSTATE_START) { this.m_btEnd.SetEnabled(false); } else { this.m_btEnd.SetEnabled(true); } int num = NkUserInventory.GetInstance().Get_First_ItemCnt(70002); this.m_lbSoulGem.SetText(ANNUALIZED.Convert(num)); int num2 = 0; NEWEXPLORATION_DATA endRewardData = NrTSingleton <NewExplorationManager> .Instance.GetEndRewardData(); if (endRewardData != null) { num2 = endRewardData.i32RewardCount; } this.m_lbDragonHeart.SetText(ANNUALIZED.Convert(num2)); }
public bool CanGetTreasure(sbyte bFloor, sbyte bSubFloor) { NEWEXPLORATION_DATA nEWEXPLORATION_DATA = this.CanGetTreasureData(); return(nEWEXPLORATION_DATA != null && (int)nEWEXPLORATION_DATA.bFloor == (int)bFloor && (int)nEWEXPLORATION_DATA.bSubFloor == (int)bSubFloor); }
public void AddData(NEWEXPLORATION_DATA data) { this.m_listData[data.i16Index] = data; }
private void SetStageList() { this.m_fScrollPos = this.m_nlbStage.scrollPos; this.m_fScrollPos = ((this.m_fScrollPos < 0f) ? 0f : this.m_fScrollPos); this.m_nlbStage.Clear(); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3424"), "count", (int)this.m_bSelectedFloor }); this.m_lbTitle.SetText(empty); for (int i = 0; i < 2; i++) { string text = string.Empty; if (i == 0) { text = string.Format("Mobile/DLG/NewExploration/NLB_NewExploration_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } else { text = string.Format("Mobile/DLG/NewExploration/NLB_NewExploration2_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath); } this.m_nlbStage.SetColumnData(text); NewListItem newListItem = new NewListItem(this.m_nlbStage.ColumnNum, true, string.Empty); newListItem.m_szColumnData = text; newListItem.SetListItemData(0, string.Format("ui/NewExploration/NewExploration_{0}_{1}", (int)this.m_bSelectedFloor, i + 1), true, null, null); int num = 0; for (int j = 0; j < 5; j++) { int num2 = j * 9 + 1; int num3 = j + i * 5 + 1; newListItem.SetListItemData(num2, string.Empty, (sbyte)num3, new EZValueChangedDelegate(this.OnClickStageList), null); newListItem.SetListItemData(num2 + 3, string.Format("{0}-{1}", this.m_bSelectedFloor, num3), null, null, null); if (num3 != 10) { NEWEXPLORATION_DATA data = NrTSingleton <NewExplorationManager> .Instance.GetData(this.m_bSelectedFloor, (sbyte)num3); if (data != null) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(data.i32BossCharKind); if (charKindInfo == null) { break; } CostumeDrawTextureInfo costumeDrawTextureInfo = new CostumeDrawTextureInfo(); costumeDrawTextureInfo.imageType = eCharImageType.SMALL; costumeDrawTextureInfo.charKind = charKindInfo.GetCharKind(); newListItem.SetListItemData(num2 + 4, costumeDrawTextureInfo, null, null, null); } } else { num2--; } bool visibe = NrTSingleton <NewExplorationManager> .Instance.IsClear(this.m_bSelectedFloor, (sbyte)num3); newListItem.SetListItemData(num2 + 5, visibe); newListItem.SetListItemData(num2 + 6, visibe); bool flag = (int)this.m_bSelectedFloor == (int)NrTSingleton <NewExplorationManager> .Instance.GetFloor() && (int)((sbyte)num3) == (int)NrTSingleton <NewExplorationManager> .Instance.GetSubFloor(); newListItem.SetListItemData(num2 + 7, flag); newListItem.SetListItemData(num2 + 8, flag); if (flag) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null && charPersonInfo.GetLeaderSoldierInfo().IsValid()) { NrCharKindInfo charKindInfo2 = charPersonInfo.GetLeaderSoldierInfo().GetCharKindInfo(); if (charKindInfo2 != null) { CostumeDrawTextureInfo costumeDrawTextureInfo2 = new CostumeDrawTextureInfo(); costumeDrawTextureInfo2.imageType = eCharImageType.SMALL; costumeDrawTextureInfo2.charKind = charKindInfo2.GetCharKind(); newListItem.SetListItemData(num2 + 8, costumeDrawTextureInfo2, null, null, null); } } } num = num2 + 8; } num++; int num4 = (i != 0) ? 3 : 2; for (int k = 0; k < num4; k++) { int num5 = (k + 1) * 2; if (i != 0) { num5 += 4; } bool flag2 = NrTSingleton <NewExplorationManager> .Instance.IsOpenTreasureBox(this.m_bSelectedFloor, (sbyte)num5); newListItem.SetListItemData(num, !flag2); newListItem.SetListItemData(num, string.Empty, (sbyte)num5, new EZValueChangedDelegate(this.OnClickTreasureList), null); newListItem.SetListItemData(num + 1, flag2); newListItem.SetListItemData(num + 1, string.Empty, (sbyte)num5, new EZValueChangedDelegate(this.OnClickTreasureList), null); newListItem.SetListItemData(num + 4, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3425"), null, null, null); newListItem.SetListItemData(num + 5, NrTSingleton <NewExplorationManager> .Instance.CanGetTreasure(this.m_bSelectedFloor, (sbyte)num5)); num += 6; } this.m_nlbStage.Add(newListItem); } this.m_nlbStage.RepositionItems(); this.m_nlbStage.ScrollPosition = this.m_fScrollPos; }
public void SetFloor(sbyte bFloor, sbyte bSubFloor) { this.m_bFloor = bFloor; this.m_bSubFloor = bSubFloor; string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3477"), "count1", bFloor, "count2", bSubFloor }); this.m_lbTitle.SetText(empty); bool flag = NrTSingleton <NewExplorationManager> .Instance.IsClear(bFloor, bSubFloor); base.SetShowLayer(2, flag); NEWEXPLORATION_DATA data = NrTSingleton <NewExplorationManager> .Instance.GetData(bFloor, bSubFloor); if (data == null) { return; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3470"), "count", ANNUALIZED.Convert(data.i32RewardExp) }); this.m_lbExpPoint.SetText(empty); this.m_lbDragonHeart.SetText(ANNUALIZED.Convert(data.i32RewardCount)); NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo != null) { int num = data.i32BossHp; if (NrTSingleton <NewExplorationManager> .Instance.CanPlay(bFloor, bSubFloor)) { num = data.i32BossHp - NrTSingleton <NewExplorationManager> .Instance.GetBossDamage(); if (num <= 0) { num = 0; } } else if (flag) { num = 0; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1808"), "count1", ANNUALIZED.Convert(num), "count2", ANNUALIZED.Convert(data.i32BossHp) }); this.m_lbBossHP.SetText(empty); float num2 = (float)num / (float)data.i32BossHp; this.m_dtBossHPBar.SetSize(this.m_fBossHPBarWidth * num2, this.m_dtBossHPBar.GetSize().y); } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(data.i32BossCharKind); this.m_dtBossFace.SetTexture(eCharImageType.LARGE, charKindInfo.GetCharKind(), -1, string.Empty); }