public override bool ParseDataFromNDT(TsDataReader dr) { foreach (TsDataReader.Row data in dr) { NEWEXPLORATION_TREASURE nEWEXPLORATION_TREASURE = new NEWEXPLORATION_TREASURE(); nEWEXPLORATION_TREASURE.SetData(data); NrTSingleton <NewExplorationManager> .Instance.AddTreasureData(nEWEXPLORATION_TREASURE); } return(true); }
public NEWEXPLORATION_DATA CanGetTreasureData() { short num = this.GetLastTreasureIndex(); num += 1; NEWEXPLORATION_TREASURE treasureData = this.GetTreasureData(num); if (treasureData == null) { return(null); } NewExplorationManager.CHAR_WEEK_DATA_NEWEXPLORATION charWeekData = this.GetCharWeekData(); if ((int)treasureData.bFloor > (int)charWeekData.bBestClearFloor) { return(null); } if ((int)treasureData.bFloor == (int)charWeekData.bBestClearFloor && (int)treasureData.bSubFloor > (int)charWeekData.bBestClearSubFloor) { return(null); } return(this.GetData(treasureData.bFloor, treasureData.bSubFloor)); }
public bool IsOpenTreasureBox(sbyte bFloor, sbyte bSubFloor) { NEWEXPLORATION_TREASURE lastTreasureData = this.GetLastTreasureData(); return(lastTreasureData != null && ((int)lastTreasureData.bFloor > (int)bFloor || ((int)lastTreasureData.bFloor == (int)bFloor && (int)lastTreasureData.bSubFloor >= (int)bSubFloor))); }
public NEWEXPLORATION_TREASURE GetPrevTreasureData(sbyte bFloor, sbyte bSubFloor) { NEWEXPLORATION_TREASURE treasureData = this.GetTreasureData(bFloor, bSubFloor); return(this.GetTreasureData(treasureData.i16Index - 1)); }
public void AddTreasureData(NEWEXPLORATION_TREASURE data) { this.m_listTreasureData[data.i16Index] = data; }
public void OnClickTreasureList(IUIObject obj) { if (NrTSingleton <ContentsLimitManager> .Instance.IsNewExplorationLimit()) { return; } sbyte b = (sbyte)obj.Data; NEWEXPLORATION_TREASURE treasureData = NrTSingleton <NewExplorationManager> .Instance.GetTreasureData(this.m_bSelectedFloor, b); if (treasureData == null) { return; } BonusItemInfoDlg bonusItemInfoDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BONUS_ITEM_INFO_DLG) as BonusItemInfoDlg; if (bonusItemInfoDlg == null) { return; } for (int i = 0; i < treasureData.i32ItemUnique.Length; i++) { if (treasureData.i32ItemUnique[i] > 0) { bonusItemInfoDlg.AddItem(new ITEM { m_nItemUnique = treasureData.i32ItemUnique[i], m_nItemNum = treasureData.i32ItemNum[i] }); } } bonusItemInfoDlg.ShowItem(); string strNotButtonNotify = string.Empty; bool flag = NrTSingleton <NewExplorationManager> .Instance.CanGetTreasure(this.m_bSelectedFloor, b); if (flag) { strNotButtonNotify = string.Empty; } else if (NrTSingleton <NewExplorationManager> .Instance.IsOpenTreasureBox(this.m_bSelectedFloor, b)) { strNotButtonNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3555"); } else { NEWEXPLORATION_TREASURE prevTreasureData = NrTSingleton <NewExplorationManager> .Instance.GetPrevTreasureData(this.m_bSelectedFloor, b); if (prevTreasureData == null) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref strNotButtonNotify, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3481"), "count1", this.m_bSelectedFloor, "count2", b }); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref strNotButtonNotify, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3556"), "count1", prevTreasureData.bFloor, "count2", prevTreasureData.bSubFloor }); } } bonusItemInfoDlg.SetMsg(new YesDelegate(this.OnClickTreasureGet), b, false, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3425"), strNotButtonNotify); if (flag) { bonusItemInfoDlg.OnClickOk(null); } }