public void SetSolInfo(int nCharKind) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nCharKind); if (charKindInfo == null) { return; } NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.SetCharKind(nCharKind); nkSoldierInfo.SetLevel(1); this.m_lbName.SetText(nkSoldierInfo.GetName()); string textureFromBundle = string.Empty; if (UIDataManager.IsUse256Texture()) { textureFromBundle = "UI/Soldier/256/" + charKindInfo.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_256"; } else { textureFromBundle = "UI/Soldier/512/" + charKindInfo.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_512"; } this.m_dwSolFace.SetTextureFromBundle(textureFromBundle); if (charKindInfo.GetWeaponType() > 0) { this.m_dwWeaphonIcon.SetTexture(string.Format("Win_I_Weapon{0}", charKindInfo.GetWeaponType().ToString())); } int battleSkillUnique = charKindInfo.GetBattleSkillUnique(0); BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(battleSkillUnique); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillUnique, 1); if (battleSkillBase == null || battleSkillDetail == null) { return; } if (battleSkillBase.m_nColosseumSkillDesc > 0) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_nColosseumSkillDesc.ToString()); if (textFromInterface != string.Empty) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint }); this.m_lbSkillDesc.SetText(empty); } } this.Show(); }
public void SetSolList() { this.m_kSolList.Clear(); for (int i = 0; i < 4; i++) { COLOSSEUM_SUPPORTSOLDIER colosseumSupportSoldierdata = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetColosseumSupportSoldierdata(i); if (colosseumSupportSoldierdata != null) { int i32CharKind = colosseumSupportSoldierdata.i32CharKind; NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32CharKind); if (charKindInfo != null) { NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.SetCharKind(i32CharKind); nkSoldierInfo.SetLevel(1); this.m_kSolList.Add(nkSoldierInfo); this.m_SoldierContoller[i].m_btSelect.data = nkSoldierInfo; this.m_SoldierContoller[i].m_lbName.SetText(nkSoldierInfo.GetName()); string textureFromBundle = string.Empty; if (UIDataManager.IsUse256Texture()) { textureFromBundle = "UI/Soldier/256/" + charKindInfo.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_256"; } else { textureFromBundle = "UI/Soldier/512/" + charKindInfo.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_512"; } this.m_SoldierContoller[i].m_dwSolFace.SetTextureFromBundle(textureFromBundle); if (charKindInfo.GetWeaponType() > 0) { this.m_SoldierContoller[i].m_dwWeaphonIcon.SetTexture(string.Format("Win_I_Weapon{0}", charKindInfo.GetWeaponType().ToString())); } int battleSkillUnique = charKindInfo.GetBattleSkillUnique(0); BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(battleSkillUnique); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillUnique, 1); if (battleSkillBase == null || battleSkillDetail == null) { return; } if (battleSkillBase.m_nColosseumSkillDesc > 0) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_nColosseumSkillDesc.ToString()); if (textFromInterface != string.Empty) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint }); this.m_SoldierContoller[i].m_lbSkillDesc.SetText(empty); } } bool bShowLabel = true; int num = 0; for (int j = 0; j < 6; j++) { if (colosseumSupportSoldierdata.i32RivalCharKind[j] > 0) { NrCharKindInfo charKindInfo2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(colosseumSupportSoldierdata.i32RivalCharKind[j]); if (charKindInfo2 != null) { string textureFromBundle2 = "UI/Soldier/64/" + charKindInfo2.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_64"; this.m_SoldierContoller[i].m_dtRelationFace[num].SetTextureFromBundle(textureFromBundle2); num++; bShowLabel = false; } } } this.m_SoldierContoller[i].m_bShowLabel = bShowLabel; } } } }