public void AddReviveCount(long nSolID) { this.nReviveCount++; BATTLE_CONSTANT_Manager instance = BATTLE_CONSTANT_Manager.GetInstance(); if (instance == null) { return; } int num = (int)instance.GetValue(eBATTLE_CONSTANT.eBATTLE_CONSTANT_RESURRECTION_COUNT); if (this.nReviveCount >= num) { if (this.m_nlDeadSolList.Count > 0) { this.m_nlDeadSolList.Clear(); } return; } for (int i = 0; i < this.m_nlDeadSolList.Count; i++) { IUIObject item = this.m_nlDeadSolList.GetItem(i); NkSoldierInfo nkSoldierInfo = item.Data as NkSoldierInfo; if (nkSoldierInfo != null) { if (nkSoldierInfo.GetSolID() == nSolID) { this.m_nlDeadSolList.RemoveItem(i, true); return; } } } }
private bool CheckMythRaidUIOff() { if (Battle.BATTLE.BattleRoomtype != eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID) { return(false); } int num = (int)BATTLE_CONSTANT_Manager.GetInstance().GetValue(eBATTLE_CONSTANT.eBATTLE_CONSTANT_MYTHRAID_EMERGENCY_COUNT); return(num <= Battle.BATTLE.ChangeSolCount || Battle.BATTLE.DieSolCount <= Battle.BATTLE.ChangeSolCount || !NrTSingleton <NkBattleCharManager> .Instance.MyCharExist() || Battle.BATTLE.UseEmergencyHelpByThisTurn); }
public override void SetComponent() { this.m_lbBuffText = (base.GetControl("Label_buff_desc") as Label); this.m_dwBuffIcon = (base.GetControl("ItemTexture_buffIcon") as ItemTexture); this.m_nlDeadSolList = (base.GetControl("NLB_Resurrection") as NewListBox); this.m_nlDeadSolList.Reserve = false; this.m_nlDeadSolList.Clear(); base.AllHideLayer(); this.m_nCheckBattleSkillUnique = new int[this.MAX_BATTLE_SKILL_SHOWUP]; BATTLE_CONSTANT_Manager instance = BATTLE_CONSTANT_Manager.GetInstance(); this.BATTLE_BUFFICON_SHOWTIME = (int)instance.GetValue(eBATTLE_CONSTANT.eBATTLE_CONSTANT_SKILL_DESC_TIME); if (this.BATTLE_BUFFICON_SHOWTIME == 0) { this.BATTLE_BUFFICON_SHOWTIME = 3; } this._SetDialogPos(); }
public override bool ParseDataFromNDT(TsDataReader dr) { foreach (TsDataReader.Row data in dr) { BATTLE_CONSTANT bATTLE_CONSTANT = new BATTLE_CONSTANT(); bATTLE_CONSTANT.SetData(data); bATTLE_CONSTANT.m_eConstant = BATTLE_CONSTANT_Manager.GetInstance().GetConstantCode(bATTLE_CONSTANT.strConstant); this.SetData(bATTLE_CONSTANT.m_eConstant, bATTLE_CONSTANT.m_nConstant); } dr.BeginSection("[DEFENSE]"); foreach (TsDataReader.Row data2 in dr) { DEFENSE_DATA dEFENSE_DATA = new DEFENSE_DATA(); dEFENSE_DATA.SetData(data2); this.SetData(dEFENSE_DATA); } return(true); }
public void ChangeTurn(eBATTLE_ALLY eCurrentTurnAlly) { for (int i = 0; i < 4; i++) { if (eCurrentTurnAlly == eBATTLE_ALLY.eBATTLE_ALLY_0) { float num = BATTLE_CONSTANT_Manager.GetInstance().GetValue(eBATTLE_CONSTANT.eBATTLE_CONSTANT_BATTLE_TURN_CONTROL_DELAY); this.m_fTime[i] = Time.realtimeSinceStartup + (float)i * num; this.m_nRemainTime[i] = -1; NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (this.m_stCharinfo[i].nCharUnique == nrCharUser.GetCharUnique()) { Battle.BATTLE.EnableOrderTime = this.m_fTime[i]; Battle.BATTLE.BabelAdvantageCharUnique = 0; this.m_nAdvantageIndex = -1; this.m_nMyIndex = i; base.SetShowLayer(1, true); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("924"), "charname", TKString.NEWString(this.m_stCharinfo[0].szCharName) }); this.m_lbTurnInfo.SetText(empty); } } else { this.m_lbTurnTime.SetText("-"); Battle.BATTLE.BabelAdvantageCharUnique = 0; base.SetShowLayer(1, false); } } }
public void SetDeadSol(long nSolID) { if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_COLOSSEUM) { return; } if ((Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BABELTOWER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BOUNTYHUNT) && Battle.BabelPartyCount != 1) { return; } if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_NEWEXPLORATION) { return; } BATTLE_CONSTANT_Manager instance = BATTLE_CONSTANT_Manager.GetInstance(); if (instance == null) { return; } int num = (int)instance.GetValue(eBATTLE_CONSTANT.eBATTLE_CONSTANT_RESURRECTION_COUNT); if (this.nReviveCount >= num) { if (this.m_nlDeadSolList.Count > 0) { this.m_nlDeadSolList.Clear(); } return; } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(nSolID); if (soldierInfoFromSolID == null || !soldierInfoFromSolID.IsValid()) { return; } if (this.m_nlDeadSolList.Count >= 3) { this.m_nlDeadSolList.RemoveItem(0, true); } NewListItem newListItem = new NewListItem(this.m_nlDeadSolList.ColumnNum, true, string.Empty); newListItem.Data = soldierInfoFromSolID.GetSolID(); NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = soldierInfoFromSolID.GetCharKind(); nkListSolInfo.SolGrade = (int)soldierInfoFromSolID.GetGrade(); nkListSolInfo.SolLevel = soldierInfoFromSolID.GetLevel(); nkListSolInfo.FightPower = soldierInfoFromSolID.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER); nkListSolInfo.ShowLevel = false; nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(soldierInfoFromSolID); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(soldierInfoFromSolID.GetCharKind()); if (charKindInfo != null) { short gradeMaxLevel = charKindInfo.GetGradeMaxLevel((short)soldierInfoFromSolID.GetGrade()); if (soldierInfoFromSolID.GetLevel() >= gradeMaxLevel) { nkListSolInfo.ShowCombat = true; nkListSolInfo.ShowLevel = false; } else { nkListSolInfo.ShowCombat = false; nkListSolInfo.ShowLevel = true; } } newListItem.SetListItemData(1, nkListSolInfo, soldierInfoFromSolID, new EZValueChangedDelegate(this.BtClickUpListBox), null); this.m_nlDeadSolList.Add(newListItem); this.m_nlDeadSolList.RepositionItems(); base.AllHideLayer(); base.ShowLayer(this.DEAD_SOLLIST_LAYER_2); }