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; } } } }
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 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); }