private NkSoldierInfo CreateDummySoldier() { NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); if (base.ShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE) { nkSoldierInfo.SetCharKind(1053); nkSoldierInfo.SetGrade(6); } else if (base.ShowType == SOLCOMPOSE_TYPE.EXTRACT) { nkSoldierInfo.SetCharKind(1004); nkSoldierInfo.SetGrade(5); } else if (base.ShowType == SOLCOMPOSE_TYPE.COMPOSE) { nkSoldierInfo.SetCharKind(1004); nkSoldierInfo.SetGrade(4); } nkSoldierInfo.SetLevel(50); nkSoldierInfo.SetSolID(123456L); nkSoldierInfo.SetSolSubData(3, 0L); nkSoldierInfo.SetExp(nkSoldierInfo.GetCurBaseExp()); return(nkSoldierInfo); }
private NkSoldierInfo CreateDummySoldier(int charkind) { NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.SetCharKind(charkind); nkSoldierInfo.SetGrade(5); nkSoldierInfo.SetLevel(50); nkSoldierInfo.SetSolID(123456L); nkSoldierInfo.SetSolSubData(3, 0L); nkSoldierInfo.SetExp(nkSoldierInfo.GetCurBaseExp()); return(nkSoldierInfo); }
public void SetData(byte bPreGrade, int lPreLevel, long lExp, NkSoldierInfo kSolInfo, long nAddEvolutionExp, long nMaxLvEvolution) { this.m_TargetSolInfo = kSolInfo; if (kSolInfo != null) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[] { textFromInterface, "count", lExp }); this.lbExp.SetText(textFromInterface); this.lbName.SetText(kSolInfo.GetName()); if (!NrTSingleton <ContentsLimitManager> .Instance.IsReincarnation()) { if (kSolInfo.IsLeader()) { this.SolRank.Visible = false; } else { UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade()); if (solLargeGradeImg != null) { if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade())) { this.SolRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height); } this.SolRank.SetTexture(solLargeGradeImg); } } } else { UIBaseInfoLoader solLargeGradeImg2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade()); if (solLargeGradeImg2 != null) { if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade())) { this.SolRank.SetSize(solLargeGradeImg2.UVs.width, solLargeGradeImg2.UVs.height); } this.SolRank.SetTexture(solLargeGradeImg2); } } int costumeUnique = (int)kSolInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME); this.dtImg.SetTexture(eCharImageType.LARGE, kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade(), NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(costumeUnique)); long num = kSolInfo.GetNextExp() - kSolInfo.GetCurBaseExp(); float num2 = ((float)num - (float)kSolInfo.GetRemainExp()) / (float)num; if (num2 > 1f) { num2 = 1f; } if (kSolInfo.IsMaxLevel()) { string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286"); this.lbExpRate.SetText(textFromInterface2); num2 = 1f; } else { this.lbExpRate.SetText(string.Format("{0:F2}%", num2 * 100f)); } this.pbGage.Value = num2; BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)kSolInfo.GetGrade()); BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO2 = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)bPreGrade); if (cHARKIND_SOLGRADEINFO != null && cHARKIND_SOLGRADEINFO2 != null) { int level = (int)kSolInfo.GetLevel(); bool flag = lPreLevel != level; this.lbLevel[1].SetText(lPreLevel.ToString()); this.lbLevel[2].Visible = flag; this.lbLevel[3].Visible = flag; this.lbLevel[3].SetText(level.ToString()); this.m_bLevelUP = (lPreLevel != level); if (flag) { base.SetShowLayer(2, true); } else { base.SetShowLayer(2, false); } if (flag) { int[] levelChangeValue = this.GetLevelChangeValue(kSolInfo, (short)lPreLevel, (short)level, (int)bPreGrade); this.SetTextShowOrNot(ref this.m_lbLevelUpStat, levelChangeValue); } } if (nAddEvolutionExp > 0L) { textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731"); if (nMaxLvEvolution > 0L) { textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2593"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[] { textFromInterface, "count", nAddEvolutionExp, "count1", nAddEvolutionExp - nMaxLvEvolution, "count2", nMaxLvEvolution }); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[] { textFromInterface, "count", nAddEvolutionExp }); } if (!kSolInfo.IsMaxGrade()) { this.m_lbGetGradeExpText.SetText(textFromInterface); } else { this.m_lbGetGradeExpText.SetText(string.Empty); } base.SetShowLayer(3, true); bool flag2 = kSolInfo.GetGrade() != bPreGrade; this.dtGradeUpImg.Visible = flag2; bool flag3 = false; if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1 && flag2 && kSolInfo.IsMaxGrade()) { int num3 = (int)kSolInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_TRADE_COUNT); this.lbGradeUpText.Visible = true; string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"), "count", num3 }); this.lbGradeUpText.SetText(empty); flag3 = true; } if (!flag3) { this.lbGradeUpText.Visible = false; } if (flag2) { short legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)bPreGrade); UIBaseInfoLoader solLargeGradeImg3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)bPreGrade); if (0 < legendType) { this.m_txPreRank.SetSize(solLargeGradeImg3.UVs.width, solLargeGradeImg3.UVs.height); } this.m_txPreRank.SetTexture(solLargeGradeImg3); legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)(bPreGrade + 1)); solLargeGradeImg3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)(bPreGrade + 1)); if (0 < legendType) { this.m_txCurRank.SetSize(solLargeGradeImg3.UVs.width, solLargeGradeImg3.UVs.height); } this.m_txCurRank.SetTexture(solLargeGradeImg3); base.SetShowLayer(4, true); int[] gradeChangeValue = this.GetGradeChangeValue(kSolInfo, kSolInfo.GetLevel(), (int)bPreGrade, (int)kSolInfo.GetGrade()); this.SetTextShowOrNot(ref this.m_lbRankUpStat, gradeChangeValue); } else { base.SetShowLayer(4, false); } this.GradeExpBG.Visible = true; this.GradeExpGage.Visible = true; this.GradeExpText.Visible = true; long num4 = kSolInfo.GetEvolutionExp() - kSolInfo.GetCurBaseEvolutionExp(); long num5 = kSolInfo.GetNextEvolutionExp() - kSolInfo.GetCurBaseEvolutionExp(); float evolutionExpPercent = kSolInfo.GetEvolutionExpPercent(); string text = string.Empty; this.GradeExpGage.SetSize(228f * evolutionExpPercent, this.GradeExpGage.height); if (!kSolInfo.IsMaxGrade()) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"), "exp", num4.ToString(), "maxexp", num5.ToString() }); } else { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("484"); } this.GradeExpText.SetText(text); } else { base.SetShowLayer(3, false); base.SetShowLayer(4, false); } } }
public NewListItem UpdateSolList(NkSoldierInfo kSolInfo) { if (!kSolInfo.IsValid()) { return(null); } if (this.m_eShowType != SOLCOMPOSE_TYPE.MYTHEVOLUTION) { if (SolComposeMainDlg.Instance == null) { return(null); } if (SolComposeMainDlg.Instance.ContainBaseSoldier(kSolInfo.GetSolID())) { return(null); } } string text = string.Empty; NewListItem newListItem = new NewListItem(this.ComposeNewListBox.ColumnNum, true, string.Empty); if (newListItem == null) { return(null); } EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(kSolInfo.GetCharKind(), kSolInfo.GetGrade()); if (eventHeroCharCode != null) { newListItem.EventMark = true; newListItem.SetListItemData(3, "Win_I_EventSol", null, null, null); } else { UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade()); if (legendFrame != null) { newListItem.SetListItemData(3, legendFrame, null, null, null); } else { newListItem.SetListItemData(3, "Win_T_ItemEmpty", null, null, null); } } newListItem.SetListItemData(4, kSolInfo.GetListSolInfo(false), null, null, null); string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade(), kSolInfo.GetName()); newListItem.SetListItemData(5, legendName, null, null, null); long num = kSolInfo.GetExp() - kSolInfo.GetCurBaseExp(); long num2 = kSolInfo.GetNextExp() - kSolInfo.GetCurBaseExp(); float num3 = 1f; if (!kSolInfo.IsMaxLevel()) { num3 = ((float)num2 - (float)kSolInfo.GetRemainExp()) / (float)num2; if (num3 > 1f) { num3 = 1f; } if (0f > num3) { num3 = 0f; } } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"), "count1", kSolInfo.GetLevel().ToString(), "count2", kSolInfo.GetSolMaxLevel().ToString() }); newListItem.SetListItemData(6, text, null, null, null); newListItem.SetListItemData(0, "Win_T_ReputelPrgBG", null, null, null); newListItem.SetListItemData(1, "Com_T_GauWaPr4", 270f * num3, null, null); if (kSolInfo.IsMaxLevel()) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286"); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"), "exp", num.ToString(), "maxexp", num2.ToString() }); } newListItem.SetListItemData(2, text, null, null, null); newListItem.SetListItemData(7, false); if (!this.m_bMainSelect) { foreach (long current in this.mCheckList) { if (kSolInfo.GetSolID() == current) { newListItem.SetListItemData(7, true); newListItem.SetListItemData(7, "Com_I_Check", null, null, null); break; } } } if (!kSolInfo.IsAwakening()) { newListItem.SetListItemData(8, false); } if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_MAIN_CHALLENGEQUEST_DLG) == null) { newListItem.SetListItemData(9, string.Empty, null, new EZValueChangedDelegate(this.ClickSolDetailInfo), null); } else { newListItem.SetListItemData(9, false); } if (kSolInfo.IsAtbCommonFlag(1L)) { newListItem.SetListItemData(10, true); } else { newListItem.SetListItemData(10, false); } newListItem.Data = kSolInfo; return(newListItem); }
protected void SetSolListInfo(NkSoldierInfo pkSolinfo) { long num = pkSolinfo.GetExp() - pkSolinfo.GetCurBaseExp(); long num2 = pkSolinfo.GetNextExp() - pkSolinfo.GetCurBaseExp(); float num3 = ((float)num2 - (float)pkSolinfo.GetRemainExp()) / (float)num2; if (num3 > 1f) { num3 = 1f; } if (0f > num3) { num3 = 0f; } if (pkSolinfo.IsMaxLevel()) { num3 = 1f; } string text = string.Empty; NewListItem newListItem = new NewListItem(this.SoldierList.ColumnNum, true, string.Empty); EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(pkSolinfo.GetCharKind(), pkSolinfo.GetGrade()); newListItem.SetListItemData(9, false); if (eventHeroCharCode != null) { newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null); newListItem.SetListItemData(9, true); } else { UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(pkSolinfo.GetCharKind(), (int)pkSolinfo.GetGrade()); if (legendFrame != null) { newListItem.SetListItemData(0, legendFrame, null, null, null); } } newListItem.SetListItemData(1, pkSolinfo.GetListSolInfo(false), null, null, null); string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(pkSolinfo.GetCharKind(), (int)pkSolinfo.GetGrade(), pkSolinfo.GetName()); newListItem.SetListItemData(2, legendName, null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"), "count1", pkSolinfo.GetLevel().ToString(), "count2", pkSolinfo.GetSolMaxLevel().ToString() }); newListItem.SetListItemData(3, text, null, null, null); int num4 = pkSolinfo.GetEquipWeaponOrigin(); if (num4 > 0) { newListItem.SetListItemData(4, "Win_I_Weapon" + num4.ToString(), null, null, null); } num4 = pkSolinfo.GetEquipWeaponExtention(); if (num4 > 0) { newListItem.SetListItemData(4, "Win_I_Weapon" + num4.ToString(), null, null, null); } if (pkSolinfo.IsAwakening()) { newListItem.SetListItemData(5, "Win_I_DarkAlchemy", null, null, null); } else { newListItem.SetListItemData(5, false); } newListItem.SetListItemData(7, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Com_T_GauWaPr4"), 250f * num3, null, null); if (pkSolinfo.IsMaxLevel()) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286"); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"), "exp", num.ToString(), "maxexp", num2.ToString() }); } newListItem.SetListItemData(8, text, null, null, null); newListItem.Data = pkSolinfo; this.SoldierList.Add(newListItem); }
private void MakeSolListItem(ref NewListItem item, NkSoldierInfo pkSolinfo) { string text = string.Empty; if (pkSolinfo != null) { item.SetListItemData(1, pkSolinfo.GetListSolInfo(false), null, null, null); item.SetListItemData(2, pkSolinfo.GetName(), null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"), "count1", pkSolinfo.GetLevel().ToString(), "count2", pkSolinfo.GetSolMaxLevel().ToString() }); item.SetListItemData(3, text, null, null, null); int num = pkSolinfo.GetEquipWeaponOrigin(); if (num > 0) { item.SetListItemData(4, string.Format("Win_I_Weapon{0}", num.ToString()), null, null, null); } num = pkSolinfo.GetEquipWeaponExtention(); if (num > 0) { item.SetListItemData(5, string.Format("Win_I_Weapon{0}", num.ToString()), null, null, null); } else { item.SetListItemData(5, false); } long exp = pkSolinfo.GetExp(); long curBaseExp = pkSolinfo.GetCurBaseExp(); long nextExp = pkSolinfo.GetNextExp(); long num2 = exp - curBaseExp; long num3 = nextExp - curBaseExp; float num4 = pkSolinfo.GetExpPercent(); if (num4 < 0f) { num4 = 0f; } item.SetListItemData(6, "Win_T_ReputelPrgBG", null, null, null); item.SetListItemData(7, "Com_T_GauWaPr4", 250f * num4, null, null); item.SetListItemData(8, string.Empty, pkSolinfo.GetSolID(), new EZValueChangedDelegate(this.OnClickSoldierDelete), null); if (pkSolinfo.IsMaxLevel()) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286"); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"), "exp", num2.ToString(), "maxexp", num3.ToString() }); } item.SetListItemData(9, text, null, null, null); item.SetListItemData(10, false); item.Data = pkSolinfo.GetSolID(); } else { for (int i = 0; i < this.m_kSolList.ColumnNum; i++) { item.SetListItemData(i, false); } item.SetListItemData(10, true); item.SetListItemData(10, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("859"), null, null, null); item.Data = 0L; } }