private void SetSkillExplain(int skillUnique, ref NkSoldierInfo selectedSolInfo, int selectedCostumeUnique) { int num = 1; if (selectedSolInfo != null) { num = selectedSolInfo.GetMaxBattleSkillLevel(); } if (num <= 0) { num = 1; } BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(skillUnique, num); if (battleSkillDetail == null) { return; } string empty = string.Empty; if (num == 1) { NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, null, selectedCostumeUnique); } else { NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, selectedSolInfo, selectedCostumeUnique); } this._skillInfoSkillText.Text = empty; }
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 SetDataForBattle(NkSoldierInfo pkSolinfo, int skillunique, int skillLevel) { if (pkSolinfo == null) { return; } if (skillunique <= 0 || skillLevel <= 0) { return; } BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillunique); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(skillunique, skillLevel); if (battleSkillBase == null || battleSkillDetail == null) { return; } string empty = string.Empty; UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase.m_nSkillUnique); this.SkillTargetIcon.SetTexture(battleSkillIconTexture); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1293"), "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey) }); this.SkillTargetName.Text = empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1885"), "skilllevel", skillLevel.ToString() }); this.SkillTargetLevel.Text = empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1868"), "skilllevel", skillLevel.ToString() }); this.SkillCurrentLevel.Text = empty; NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, pkSolinfo, -1); this.SkillCurrentExplain.SetScrollLabel(empty); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2153"), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint.ToString() }); this.SkillAngerlyPoint.Text = empty; }
private void SetSkillAngryPoint(int skillUnique) { BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(skillUnique, 1); if (battleSkillDetail == null) { return; } this._skillInfoSkillAnger.Text = this._skillInfoSkillAnger.Text.Replace("@count@", battleSkillDetail.m_nSkillNeedAngerlyPoint.ToString()); }
public void SetBattleSkillDetail(BATTLESKILL_DETAIL DetailData) { if (!this.mHash_BattleSkillDetail.ContainsKey(DetailData.m_nSkillUnique)) { this.mHash_BattleSkillDetail.Add(DetailData.m_nSkillUnique, new Dictionary <int, BATTLESKILL_DETAIL>()); } if (!this.mHash_BattleSkillDetail[DetailData.m_nSkillUnique].ContainsKey(DetailData.m_nSkillLevel)) { this.mHash_BattleSkillDetail[DetailData.m_nSkillUnique].Add(DetailData.m_nSkillLevel, DetailData); } }
public void SetSkillData(int i32SkillUnique, int i32SkillText, bool bMyth = false) { BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(i32SkillUnique); int num; if (bMyth) { BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(i32SkillUnique, 1); if (battleSkillDetail != null) { num = int.Parse(battleSkillDetail.m_nSkillTooltip) + 10000; } else { num = i32SkillText; } } else { num = i32SkillText + 30000; } if (battleSkillBase != null) { BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillBase.m_nSkillUnique, battleSkillBase.m_nSkillMaxLevel); if (battleSkillDetail2 != null) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2153"), "count", battleSkillDetail2.m_nSkillNeedAngerlyPoint.ToString() }); this.m_Label_SkillAnger.SetText(empty); } UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase.m_nSkillUnique); this.m_DrawTexture_SkillIcon.SetTexture(battleSkillIconTexture); this.m_Label_SkillName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey)); string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(num.ToString()); this.m_Label_SkillText.SetText(textFromInterface); } if (bMyth) { this.m_Label_SkillAnger.Visible = false; } }
public override bool ParseDataFromNDT(TsDataReader dr) { foreach (TsDataReader.Row data in dr) { BATTLESKILL_DETAIL bATTLESKILL_DETAIL = new BATTLESKILL_DETAIL(); bATTLESKILL_DETAIL.SetData(data); bATTLESKILL_DETAIL.m_nSkillBuffTarget = (int)NrTSingleton <BattleSkill_Manager> .Instance.GetBuffType(bATTLESKILL_DETAIL.m_strParserBuffType); BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(bATTLESKILL_DETAIL.m_nSkillUnique); if (battleSkillBase != null) { if (battleSkillBase.m_nSkillUseDetailInclude == 1) { if (bATTLESKILL_DETAIL.m_nSkillLevel == 1) { bATTLESKILL_DETAIL.SetSkillDetailATB(); NrTSingleton <BattleSkill_Manager> .Instance.SetBattleSkillDetail(bATTLESKILL_DETAIL); BATTLESKILL_DETAILINCLUDE bATTLESKILL_DETAILINCLUDE = null; for (int i = 1; i < 101; i++) { BATTLESKILL_DETAILINCLUDE battleSkillDetailIncludeData = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetailIncludeData(bATTLESKILL_DETAIL.m_nSkillUnique, i); if (battleSkillDetailIncludeData != null) { bATTLESKILL_DETAILINCLUDE = battleSkillDetailIncludeData; } if (bATTLESKILL_DETAILINCLUDE != null) { if (i != 1) { BATTLESKILL_DETAIL detailDataNext = new BATTLESKILL_DETAIL(); if (!NrTSingleton <BattleSkill_Manager> .Instance.AddMakeBattleSkillDetail(i, bATTLESKILL_DETAILINCLUDE, detailDataNext)) { } } } } } } else { bATTLESKILL_DETAIL.SetSkillDetailATB(); NrTSingleton <BattleSkill_Manager> .Instance.SetBattleSkillDetail(bATTLESKILL_DETAIL); } } } return(true); }
public BATTLESKILL_DETAIL GetBattleSkillDetail(int skillUnique, int skillLevel) { if (this.mHash_BattleSkillDetail.ContainsKey(skillUnique)) { foreach (KeyValuePair <int, BATTLESKILL_DETAIL> current in this.mHash_BattleSkillDetail[skillUnique]) { int key = current.Key; BATTLESKILL_DETAIL value = current.Value; if (key == skillLevel) { return(value); } } } return(null); }
public NkBattleChar SelectBattleSkillChar_GRID_ALL(NkBattleChar pkSendChar, int BattleSkillUnique, eBATTLE_ALLY eAlly) { BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(BattleSkillUnique); int battleSkillLevelByUnique = pkSendChar.GetBattleSkillLevelByUnique(BattleSkillUnique); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(BattleSkillUnique, battleSkillLevelByUnique); if (battleSkillBase == null || battleSkillDetail == null) { return(null); } NkBattleChar[] arChar = this.m_arChar; for (int i = 0; i < arChar.Length; i++) { NkBattleChar nkBattleChar = arChar[i]; if (nkBattleChar != null) { int iD = nkBattleChar.GetID(); if (iD >= 0 && this.m_arChar[iD] != null && this.m_arChar[iD].Ally == eAlly) { int num = pkSendChar.CanBattleSkill(this.m_arChar[iD], this.m_arChar[iD].GetCharPos(), battleSkillBase, battleSkillDetail); if (num == 1 || num == -2) { if (this.CheckBuffSkillToType(nkBattleChar, 98)) { if (battleSkillDetail.GetSkillDetalParamValue(75) > 0 || battleSkillDetail.GetSkillDetalParamValue(76) > 0) { return(this.m_arChar[iD]); } } else { if (!this.CheckBuffSkillToType(nkBattleChar, 99)) { return(this.m_arChar[iD]); } if (nkBattleChar.Ally != pkSendChar.Ally && (battleSkillDetail.GetSkillDetalParamValue(75) > 0 || battleSkillDetail.GetSkillDetalParamValue(76) > 0)) { return(this.m_arChar[iD]); } } } } } } return(null); }
public bool CheckBattleSkillDetailParamType(BATTLESKILL_DETAIL BSkillDetail) { if (BSkillDetail == null) { return(false); } for (int i = 0; i < 10; i++) { switch (BSkillDetail.m_nSkillDetalParamType[i]) { case 39: case 43: case 44: return(true); } } return(false); }
public bool CheckBuffSkillToType(NkBattleChar TargetChar, int SkillDetailType) { for (int i = 0; i < 12; i++) { if (TargetChar.m_BattleSkillBufData[i].BSkillBufSkillUnique > 0 && TargetChar.m_BattleSkillBufData[i].BSkillBufLevel > 0) { BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(TargetChar.m_BattleSkillBufData[i].BSkillBufSkillUnique, TargetChar.m_BattleSkillBufData[i].BSkillBufLevel); if (battleSkillDetail != null) { if (battleSkillDetail.GetSkillDetalParamValue(SkillDetailType) != 0) { return(true); } } } } return(false); }
public void Set(int SkillLevelIndex, BATTLESKILL_DETAIL LastdetailData, BATTLESKILL_DETAILINCLUDE detailData_I) { this.m_nSkillUnique = LastdetailData.m_nSkillUnique; this.m_nSkillLevel = SkillLevelIndex; this.m_nSkillNeedAngerlyPoint = LastdetailData.m_nSkillNeedAngerlyPoint + detailData_I.m_nSkillNeedAngerlyPoint_I; this.m_nSkillSuccessRate = LastdetailData.m_nSkillSuccessRate + detailData_I.m_nSkillSuccessRate_I; this.m_nSkillDurationTurn = LastdetailData.m_nSkillDurationTurn + detailData_I.m_nSkillDurationTurn_I; this.m_nSkillDurationRate = LastdetailData.m_nSkillDurationRate + detailData_I.m_nSkillDurationRate_I; this.m_nSkillAggroAdd = LastdetailData.m_nSkillAggroAdd + detailData_I.m_nSkillAggroAdd_I; this.m_nSkillAggroDamagePer = LastdetailData.m_nSkillAggroDamagePer + detailData_I.m_nSkillAggroDamagePer_I; this.m_nSkillTooltip = LastdetailData.m_nSkillTooltip; for (int i = 0; i < 10; i++) { int num = LastdetailData.m_nSkillDetalParamValue[i]; if (num > 0) { this.m_nSkillDetalParamType[i] = LastdetailData.m_nSkillDetalParamType[i]; this.m_nSkillDetalParamValue[i] = num + detailData_I.GetSkillDetalIncludeParamValue(this.m_nSkillDetalParamType[i]); } } }
public bool AddMakeBattleSkillDetail(int SkillLevelIndex, BATTLESKILL_DETAILINCLUDE detailData_I, BATTLESKILL_DETAIL detailDataNext) { if (SkillLevelIndex <= 1 || detailData_I == null || detailDataNext == null) { return(false); } if (SkillLevelIndex >= 101) { return(false); } BATTLESKILL_DETAIL battleSkillDetail = this.GetBattleSkillDetail(detailData_I.m_nSkillUnique, SkillLevelIndex - 1); if (battleSkillDetail != null) { detailDataNext.Set(SkillLevelIndex, battleSkillDetail, detailData_I); detailDataNext.SetSkillDetailATB(); this.SetBattleSkillDetail(detailDataNext); return(true); } return(false); }
public void SetSkillUnique(int i32MythSkillUnique) { BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(i32MythSkillUnique); if (battleSkillBase != null) { string text = string.Empty; text = battleSkillBase.m_waSkillName; this.m_Label_SkillName.SetText(text); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillBase.m_nSkillUnique, battleSkillBase.m_nSkillMaxLevel); if (battleSkillDetail != null) { this.m_Label_SkillText.SetText(battleSkillDetail.m_nSkillTooltip); } UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(i32MythSkillUnique); if (battleSkillIconTexture != null) { this.m_DT_SkillIcon.SetTexture(battleSkillIconTexture); } } }
public void SetSkillInfo_MaxLevel() { BATTLESKILL_BASE bATTLESKILL_BASE = this.SetSkillIcon(); if (bATTLESKILL_BASE == null) { return; } if (this.m_Label_SkillName != null) { this.m_Label_SkillName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(bATTLESKILL_BASE.m_strTextKey)); } if (this.m_Label_SkillAnger != null) { BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(bATTLESKILL_BASE.m_nSkillUnique, bATTLESKILL_BASE.m_nSkillMaxLevel); if (battleSkillDetail != null) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2153"), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint.ToString() }); this.m_Label_SkillAnger.SetText(empty); } } if (this.m_ScrollLabel_SkillInfo != null) { SOL_GUIDE solGuild = NrTSingleton <NrTableSolGuideManager> .Instance.GetSolGuild(this.m_kSelectCharKindInfo.GetCharKind()); this.m_ScrollLabel_SkillInfo.SetScrollLabel(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface((solGuild.m_i32SkillText + 30000).ToString())); } }
private void SetSkillAndMoneyInfo() { if (this.pkSolinfo == null) { return; } if (this.m_i32SkillUnique <= 0) { return; } BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(this.m_i32SkillUnique); if (battleSkillBase == null) { return; } int battleSkillLevel = this.pkSolinfo.GetBattleSkillLevel(this.m_i32SkillUnique); if (battleSkillBase.m_nMythSkillType == 0) { BATTLESKILL_TRAINING battleSkillTraining = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillTraining(this.m_i32SkillUnique, battleSkillLevel + 1); this.m_i64NeedItem = (long)battleSkillTraining.m_nSkillNeedGold; } else { MYTHSKILL_TRAINING mythSkillTraining = NrTSingleton <BattleSkill_Manager> .Instance.GetMythSkillTraining(this.m_i32SkillUnique, battleSkillLevel + 1); this.m_i64NeedItem = (long)mythSkillTraining.m_i32SkillNeedItem; } bool flag = battleSkillLevel < (int)this.pkSolinfo.GetLevel() && battleSkillLevel < battleSkillBase.m_nSkillMaxLevel; bool flag2 = false; int num = battleSkillLevel + 1; int solMaxLevel = (int)this.pkSolinfo.GetSolMaxLevel(); int skillLevel = Math.Min(num, solMaxLevel); if (num > solMaxLevel) { flag2 = true; } string text = string.Empty; int num2 = battleSkillLevel; UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase.m_nSkillUnique); this.SkillTargetIcon.SetTexture(battleSkillIconTexture); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1293"), "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey) }); this.SkillTargetName.Text = text; if (num2 == 0) { num2 = 1; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1885"), "skilllevel", num2.ToString() }); this.SkillTargetLevel.Text = text; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1868"), "skilllevel", battleSkillLevel.ToString() }); this.SkillCurrentLevel.Text = text; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1869"), "nextskilllevel", skillLevel.ToString() }); this.SkillNextLevel.Text = text; if (battleSkillLevel == 0) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1893"); } else { BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillBase.m_nSkillUnique, battleSkillLevel); if (battleSkillDetail != null) { NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref text, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, this.pkSolinfo, -1); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2153"), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint.ToString() }); this.SkillAngerlypoint.Text = empty; } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1868"), "skilllevel", battleSkillLevel.ToString() }); } } this.SkillCurrentExplain.SetScrollLabel(text); if (flag2) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1299"); } else { BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillBase.m_nSkillUnique, skillLevel); if (battleSkillDetail2 != null) { NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref text, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail2.m_nSkillTooltip), battleSkillDetail2, this.pkSolinfo, -1); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1869"), "nextskilllevel", skillLevel.ToString() }); } } this.SkillNextExplain.SetScrollLabel(text); NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo != null) { text = ANNUALIZED.Convert(kMyCharInfo.m_Money); } else { text = "0"; } this.MyMoney.Text = text; if (!flag) { if (flag2) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("691") }); this.SkillUpdateButton.SetText(text); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2895") }); this.SkillMaxUpdateButton.SetText(text); this.SkillUpdateButton.SetEnabled(false); this.SkillMaxUpdateButton.SetEnabled(false); this.dtSkillMoneyIcon.Visible = false; this.dtMaxSkillMoneyIcon.Visible = false; this.SkillNeedMoney.Visible = false; this.SkillMaxNeedMoney.Visible = false; } else { text = ANNUALIZED.Convert(this.m_i64NeedItem); this.SkillNeedMoney.Text = text; text = ANNUALIZED.Convert(this.m_i64NeedItem); this.SkillMaxNeedMoney.SetText(text); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2886"), "Level", "1" }); this.SkillMaxUpdateButton.SetText(text); this.SkillUpdateButton.SetEnabled(false); this.SkillMaxUpdateButton.SetEnabled(false); } } else { text = ANNUALIZED.Convert(this.m_i64NeedItem); this.SkillNeedMoney.Text = text; this.CountMaxNeedMoneyAndSkillLevel(); } if (this.pkSolinfo != null && this.pkSolinfo.IsSolWarehouse()) { this.SkillMaxUpdateButton.SetEnabled(false); this.SkillUpdateButton.SetEnabled(false); } }
private void SetSkillInfo() { if (this.pkSolinfo == null) { return; } if (this.m_i32SkillUnique <= 0) { return; } BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(this.m_i32SkillUnique); if (battleSkillBase == null) { return; } int battleSkillLevel = this.pkSolinfo.GetBattleSkillLevel(this.m_i32SkillUnique); bool flag = false; int skillLevel; if (battleSkillBase.m_nMythSkillType == 0) { int num = battleSkillLevel + 1; int solMaxLevel = (int)this.pkSolinfo.GetSolMaxLevel(); skillLevel = Math.Min(num, solMaxLevel); if (num > solMaxLevel) { flag = true; } } else { int num2 = battleSkillLevel + 1; int num3 = 4; skillLevel = Math.Min(num2, num3); if (num2 > num3) { flag = true; } } string text = string.Empty; int num4 = battleSkillLevel; UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase.m_nSkillUnique); this.SkillTargetIcon.SetTexture(battleSkillIconTexture); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1293"), "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey) }); this.SkillTargetName.Text = text; if (num4 == 0) { num4 = 1; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1885"), "skilllevel", num4.ToString() }); this.SkillTargetLevel.Text = text; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1868"), "skilllevel", battleSkillLevel.ToString() }); this.SkillCurrentLevel.Text = text; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1869"), "nextskilllevel", skillLevel.ToString() }); this.SkillNextLevel.Text = text; if (battleSkillLevel == 0) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1893"); } else { BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillBase.m_nSkillUnique, battleSkillLevel); if (battleSkillDetail != null) { NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref text, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, this.pkSolinfo, -1); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2153"), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint.ToString() }); this.SkillAngerlypoint.Text = empty; } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1868"), "skilllevel", battleSkillLevel.ToString() }); } } this.SkillCurrentExplain.SetScrollLabel(text); if (flag) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1299"); } else { BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillBase.m_nSkillUnique, skillLevel); if (battleSkillDetail2 != null) { NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref text, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail2.m_nSkillTooltip), battleSkillDetail2, this.pkSolinfo, -1); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1869"), "nextskilllevel", skillLevel.ToString() }); } } this.SkillNextExplain.SetScrollLabel(text); }
public static Tooltip_Dlg.Tooltip_Text_Info[] GetBattleControlSkillTextInfo(int battleSkillUnique, int battleSkillLevel, G_ID eWidowID, int KeepTurn, NkSoldierInfo solInfo) { BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(battleSkillUnique); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillUnique, battleSkillLevel); if (battleSkillDetail == null || battleSkillBase == null) { return(null); } List <Tooltip_Dlg.Tooltip_Text_Info> list = new List <Tooltip_Dlg.Tooltip_Text_Info>(); Tooltip_Dlg.Tooltip_Text_Info item = default(Tooltip_Dlg.Tooltip_Text_Info); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1292"), "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", battleSkillLevel }); item.m_strText = empty; item.m_eAnchor = SpriteText.Anchor_Pos.Middle_Center; item.m_fFontSize = 22f; item.m_strTextColorCode = "1101"; list.Add(item); item.m_fFontSize = 22f; item.m_eAnchor = SpriteText.Anchor_Pos.Middle_Left; item.m_nTextureType = 1; list.Add(item); item.m_nTextureType = 0; empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, solInfo, -1); item.m_strText = empty; list.Add(item); empty = string.Empty; if (battleSkillBase.m_nSkillType == 2) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1506") }); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1297"), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint }); } item.m_strText = empty; list.Add(item); if (!battleSkillBase.ChecJobTypeMagicDamage()) { item.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1352"); } else { item.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1353"); } list.Add(item); return(list.ToArray()); }
public void ActiveBattleSkillGridCanTarget(NkBattleChar pkSendChar, BATTLESKILL_BASE BSkillBase, BATTLESKILL_DETAIL BSkillDetail) { if (pkSendChar == null || BSkillBase == null || BSkillDetail == null) { return; } eBATTLE_ALLY eBATTLE_ALLY = eBATTLE_ALLY.eBATTLE_ALLY_1; bool flag = false; switch (BSkillBase.m_nSkillTargetType) { case 1: case 2: eBATTLE_ALLY = ((pkSendChar.Ally != eBATTLE_ALLY.eBATTLE_ALLY_0) ? eBATTLE_ALLY.eBATTLE_ALLY_1 : eBATTLE_ALLY.eBATTLE_ALLY_0); break; case 3: eBATTLE_ALLY = ((pkSendChar.Ally != eBATTLE_ALLY.eBATTLE_ALLY_0) ? eBATTLE_ALLY.eBATTLE_ALLY_0 : eBATTLE_ALLY.eBATTLE_ALLY_1); break; case 4: flag = true; break; } NkBattleChar[] charArray = NrTSingleton <NkBattleCharManager> .Instance.GetCharArray(); NkBattleChar[] array = charArray; for (int i = 0; i < array.Length; i++) { NkBattleChar nkBattleChar = array[i]; if (nkBattleChar != null) { int iD = nkBattleChar.GetID(); if (iD >= 0 && charArray[iD] != null) { bool flag2 = flag || charArray[iD].Ally == eBATTLE_ALLY; if (flag2) { List <NmBattleGrid> battleGridList = this.GetBattleGridList(charArray[iD].Ally, nkBattleChar.GetStartPosIndex()); int gridPos = (int)nkBattleChar.GetGridPos(); Vector2 size = this.GetSize(charArray[iD].Ally, nkBattleChar.GetStartPosIndex()); int xMax = (int)size.x; int yMax = (int)size.y; int[] gridIndexFromCharSize = nkBattleChar.GetGridIndexFromCharSize((short)gridPos); int[] array2 = gridIndexFromCharSize; for (int j = 0; j < array2.Length; j++) { int num = array2[j]; if (pkSendChar.CanBattleSkillForTargetGrid(charArray[iD], (short)num, BSkillBase, BSkillDetail)) { if (NrTSingleton <BattleSkill_Manager> .Instance.IsTargetWeaponTypeCheck(BSkillBase, charArray[iD]) && NrGridData.IndexAccessAble(num, xMax, yMax)) { battleGridList[num].SetMode(E_RENDER_MODE.ATTACK); } } else if (battleGridList[num].GRID_MODE != E_RENDER_MODE.ACTIVE_SELECT) { battleGridList[num].SetMode(E_RENDER_MODE.DISABLE); } } } else { List <NmBattleGrid> battleGridList2 = this.GetBattleGridList(charArray[iD].Ally, nkBattleChar.GetStartPosIndex()); if (battleGridList2 != null) { int gridPos2 = (int)nkBattleChar.GetGridPos(); if (battleGridList2[gridPos2].GRID_MODE != E_RENDER_MODE.ACTIVE_SELECT) { int[] gridIndexFromCharSize2 = nkBattleChar.GetGridIndexFromCharSize((short)gridPos2); List <NmBattleGrid> battleGridList = this.GetBattleGridList(charArray[iD].Ally, nkBattleChar.GetStartPosIndex()); int[] array3 = gridIndexFromCharSize2; for (int k = 0; k < array3.Length; k++) { int index = array3[k]; battleGridList[index].SetMode(E_RENDER_MODE.DISABLE); } } } } } } } }
public void Item_Tooltip(Form cThis, ITEM pkItem, ITEM pkEquipItem, G_ID eWidowID, bool bEquiped = false) { if (pkItem == null || !pkItem.IsValid()) { return; } if (pkItem != null) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(pkItem.m_nItemUnique); if (itemInfo != null) { if (itemInfo.m_nSetUnique != 0) { this.SetItemView(true); } else { this.SetItemView(false); } } } ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(pkItem, pkEquipItem, bEquiped, true, G_ID.NONE); ITEMINFO itemInfo2 = NrTSingleton <ItemManager> .Instance.GetItemInfo(pkItem.m_nItemUnique); if (itemInfo2 == null) { return; } int rank = pkItem.m_nOption[2]; int num = 0; string name = NrTSingleton <ItemManager> .Instance.GetName(pkItem); this.m_txClass.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString(rank)); this.m_lbTitle.Text = string.Format("{0} {1}", name, (!bEquiped) ? string.Empty : string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("2002"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1479"))); this.m_itItemTex.SetItemTexture(pkItem); if (pkItem.m_nPosType == 10 || Protocol_Item.Is_EquipItem(pkItem.m_nItemUnique)) { this.m_lbClass.Text = string.Format("{0}{1} {2}", ItemManager.RankTextColor(rank), ItemManager.RankText(rank), NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo2.m_nItemType)); } else { this.m_lbClass.Text = string.Format("{0}", NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo2.m_nItemType)); } this.m_lbType.Text = Protocol_Item.GetItemPartText(NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(pkItem.m_nItemUnique)); if (array.Length > 0) { if (array[0].m_MainOption) { this.m_lbMainOption.Text = array[0].m_OptionName; this.m_flMainValue.SetFlashLabel(array[0].m_OptionValue); num++; } else { this.m_lbMainOption.Text = string.Empty; this.m_flMainValue.SetFlashLabel(string.Empty); } StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = new StringBuilder(); if (array.Length > num) { for (int i = num; i < array.Length; i++) { stringBuilder.Append(array[i].m_OptionName); stringBuilder2.Append(array[i].m_OptionValue); } } this.m_lbSubOption.SetFlashLabel(stringBuilder.ToString()); this.m_flSubValue.SetFlashLabel(stringBuilder2.ToString()); } else { this.m_lbMainOption.Text = string.Empty; this.m_flMainValue.SetFlashLabel(string.Empty); this.m_lbSubOption.SetFlashLabel(string.Empty); this.m_flSubValue.SetFlashLabel(string.Empty); } this.m_lbText.SetLocation(this.m_lbText.GetLocation().x, this.m_lbSubOption.GetLocationY() + this.m_lbSubOption.Height + 10f); if (itemInfo2.m_strToolTipTextKey != "0") { string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo2.m_strToolTipTextKey); this.m_lbText.SetFlashLabel(textFromItemHelper); this.bText = true; } else { this.m_lbText.SetFlashLabel(string.Empty); this.bText = false; } int num2 = pkItem.m_nOption[4]; int num3 = pkItem.m_nOption[5]; int num4 = pkItem.m_nOption[6]; int num5 = pkItem.m_nOption[9]; this.bItemSkillText = false; this.bItemSkillText2 = false; if (num2 > 0 && num3 > 0) { BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num2, num3); if (battleSkillDetail != null) { string flashLabel = string.Empty; if (itemInfo2.IsItemATB(131072L) || itemInfo2.IsItemATB(524288L)) { flashLabel = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2381")); } else { flashLabel = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2183")); } string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, null, -1); if (this.bText) { this.m_lbItemSkillName.SetLocation(this.m_lbItemSkillName.GetLocation().x, this.m_lbText.GetLocationY() + this.m_lbText.Height + 20f); } else { this.m_lbItemSkillName.SetLocation(this.m_lbItemSkillName.GetLocation().x, this.m_lbSubOption.GetLocationY() + this.m_lbSubOption.Height + 20f); } this.m_lbItemSkillName.SetFlashLabel(flashLabel); this.m_lbItemSkillText.SetLocation(this.m_lbItemSkillText.GetLocation().x, this.m_lbItemSkillName.GetLocationY() + this.m_lbItemSkillName.Height + 10f); this.m_lbItemSkillText.SetFlashLabel(empty); this.bItemSkillText = true; } } else { this.m_lbItemSkillName.SetFlashLabel(string.Empty); this.m_lbItemSkillText.SetFlashLabel(string.Empty); } if (num4 > 0 && num5 > 0 && this.bItemSkillText) { BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num4, num5); if (battleSkillDetail2 != null) { string empty2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail2.m_nSkillTooltip), battleSkillDetail2, null, -1); this.m_lbItemSkillText2.SetLocation(this.m_lbItemSkillText.GetLocation().x, this.m_lbItemSkillText.GetLocationY() + this.m_lbItemSkillText.Height); this.m_lbItemSkillText2.SetFlashLabel(empty2); this.bItemSkillText2 = true; } } else { this.m_lbItemSkillText2.SetFlashLabel(string.Empty); } float height; if (this.bItemSkillText) { if (this.bItemSkillText2) { height = this.m_lbItemSkillText2.GetLocationY() + this.m_lbItemSkillText.Height + 10f; } else { height = this.m_lbItemSkillText.GetLocationY() + this.m_lbItemSkillText.Height + 10f; } } else { height = this.m_lbText.GetLocationY() + this.m_lbText.Height + 14f; } if (this.bItemSkillText2) { this.m_txLine.Visible = true; } else { this.m_txLine.Visible = false; } base.SetSize(base.GetSizeX(), height); this.m_txBG.SetSize(base.GetSize().x, height); }
private void ReplaceParamValBattleSkill(ref int m_iTextCount, ref StringBuilder refReplaceText, string szContent, BATTLESKILL_DETAIL BSkillDetail, NkSoldierInfo solInfo, int costumeUnique = -1) { int length = szContent.Length; int i = m_iTextCount + 1; this.willReplaceParamBuilder.Length = 0; while (i < length) { if (szContent[i] == this.m_szTag[13]) { break; } this.willReplaceParamBuilder.Append(szContent[i]); i++; } string text = this.willReplaceParamBuilder.ToString(); int paramType = NrTSingleton <BATTLE_SKILL_PARSER> .Instance.GetParamType(text); int skillDetalParamValue = BSkillDetail.GetSkillDetalParamValue(paramType); float num = 0f; long num2 = 0L; if (skillDetalParamValue != 0) { eBATTLESKILL_DETAIL_CODE eBATTLESKILL_DETAIL_CODE = (eBATTLESKILL_DETAIL_CODE)paramType; switch (eBATTLESKILL_DETAIL_CODE) { case eBATTLESKILL_DETAIL_CODE.ADD_CRITICAL: case eBATTLESKILL_DETAIL_CODE.ADD_PHY_DEFENSE_P: case eBATTLESKILL_DETAIL_CODE.ADD_MAG_DEFENSE_P: case eBATTLESKILL_DETAIL_CODE.ADD_HIT_RATE_P: case eBATTLESKILL_DETAIL_CODE.ADD_EVASION_P: case eBATTLESKILL_DETAIL_CODE.ADD_CRITICAL_P: case eBATTLESKILL_DETAIL_CODE.ADD_MIN_DAMAGE_P: case eBATTLESKILL_DETAIL_CODE.ADD_MAX_DAMAGE_P: case eBATTLESKILL_DETAIL_CODE.ADD_MAX_HP_P: case eBATTLESKILL_DETAIL_CODE.MINUS_MIN_DAMAGE_P: case eBATTLESKILL_DETAIL_CODE.MINUS_MAX_DAMAGE_P: case eBATTLESKILL_DETAIL_CODE.MINUS_PHY_DEFENSE_P: case eBATTLESKILL_DETAIL_CODE.MINUS_MAG_DEFENSE_P: case eBATTLESKILL_DETAIL_CODE.MINUS_MAX_HP_P: case eBATTLESKILL_DETAIL_CODE.MINUS_CRITICAL: case eBATTLESKILL_DETAIL_CODE.MINUS_HEAL_P: case eBATTLESKILL_DETAIL_CODE.PLUS_HEAL_P: case eBATTLESKILL_DETAIL_CODE.MINUS_DAMAGE_P: case eBATTLESKILL_DETAIL_CODE.PLUS_DAMAGE_P: goto IL_2C3; case eBATTLESKILL_DETAIL_CODE.ADD_MIN_DAMAGE: case eBATTLESKILL_DETAIL_CODE.ADD_MAX_DAMAGE: case eBATTLESKILL_DETAIL_CODE.ADD_MAX_HP: case eBATTLESKILL_DETAIL_CODE.MINUS_MIN_DAMAGE: case eBATTLESKILL_DETAIL_CODE.MINUS_MAX_DAMAGE: case eBATTLESKILL_DETAIL_CODE.MINUS_PHY_DEFENSE: case eBATTLESKILL_DETAIL_CODE.MINUS_MAG_DEFENSE: case eBATTLESKILL_DETAIL_CODE.MINUS_MAX_HP: case eBATTLESKILL_DETAIL_CODE.NOMOVE_ON: case eBATTLESKILL_DETAIL_CODE.NOTURN_ON: case eBATTLESKILL_DETAIL_CODE.NOSKILL_ON: case eBATTLESKILL_DETAIL_CODE.NOATTACK_ON: case eBATTLESKILL_DETAIL_CODE.IMMORTAL_ON: case eBATTLESKILL_DETAIL_CODE.NOCONTROL_ON: case eBATTLESKILL_DETAIL_CODE.NOCONTROL_AND_NOTARGETING: case eBATTLESKILL_DETAIL_CODE.NONORMAL_ATTACK_ON: case eBATTLESKILL_DETAIL_CODE.MINUS_HEAL: case eBATTLESKILL_DETAIL_CODE.PLUS_HEAL: case eBATTLESKILL_DETAIL_CODE.MINUS_DAMAGE: case eBATTLESKILL_DETAIL_CODE.PLUS_DAMAGE: IL_13A: switch (eBATTLESKILL_DETAIL_CODE) { case eBATTLESKILL_DETAIL_CODE.EMPTY_P: case eBATTLESKILL_DETAIL_CODE.INCREASE_WEPON_ACTIVE: case eBATTLESKILL_DETAIL_CODE.DECREASE_PVP_DAMAGE: case eBATTLESKILL_DETAIL_CODE.INCREASE_PVP_DAMAGE: case eBATTLESKILL_DETAIL_CODE.INCREASE_BOSS_DAMAGE: case eBATTLESKILL_DETAIL_CODE.DECREASE_MONSTER_DAMAGE: case eBATTLESKILL_DETAIL_CODE.INCREASE_EXP_P: case eBATTLESKILL_DETAIL_CODE.INCREASE_GOLD_P: case eBATTLESKILL_DETAIL_CODE.INCREASE_ITEM_P: case eBATTLESKILL_DETAIL_CODE.PHOENIX: case eBATTLESKILL_DETAIL_CODE.EMPTY_P2: goto IL_2C3; case eBATTLESKILL_DETAIL_CODE.EMPTY_DAMAGE_P: case eBATTLESKILL_DETAIL_CODE.EMPTY_DAMAGE_P2: goto IL_230; case eBATTLESKILL_DETAIL_CODE.IMMUNE_EQUAL_BOSS: case eBATTLESKILL_DETAIL_CODE.INCREASE_DEFENCE_ACTIVE: case eBATTLESKILL_DETAIL_CODE.DECREASE_CRITICAL_HIT: case eBATTLESKILL_DETAIL_CODE.MAGIC_RESIST: case eBATTLESKILL_DETAIL_CODE.PHYSICAL_RESIST: case eBATTLESKILL_DETAIL_CODE.EMPTY_VALUE2: IL_190: switch (eBATTLESKILL_DETAIL_CODE) { case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_POISON_P: case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_FIRE_P: case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_ICE_P: case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_LIGHTNING_P: case eBATTLESKILL_DETAIL_CODE.ENDURE_DAMAGE_BLEEDING_P: case eBATTLESKILL_DETAIL_CODE.ENDURE_HEAL_P: case eBATTLESKILL_DETAIL_CODE.AFTER_USED_DAMAGE_P: goto IL_230; case eBATTLESKILL_DETAIL_CODE.ENDURE_HEAL: case eBATTLESKILL_DETAIL_CODE.ENDURE_ANGERLYPOINT: case eBATTLESKILL_DETAIL_CODE.AFTER_USED_DAMAGE: case eBATTLESKILL_DETAIL_CODE.AFTER_USED_DAMAGE_TYPE: case eBATTLESKILL_DETAIL_CODE.AFTER_USED_DAMAGE_TARGET: case eBATTLESKILL_DETAIL_CODE.AFTER_USED_HEAL: case eBATTLESKILL_DETAIL_CODE.AFTER_USED_SKILL_LEVEL: case eBATTLESKILL_DETAIL_CODE.DEL_BUFF_ALL: case eBATTLESKILL_DETAIL_CODE.DEL_BUFF_TYPE: IL_1E2: switch (eBATTLESKILL_DETAIL_CODE) { case eBATTLESKILL_DETAIL_CODE.BLOOD_SUCKING_PER: case eBATTLESKILL_DETAIL_CODE.ADD_BLOOD_SUCKING_PER: case eBATTLESKILL_DETAIL_CODE.BLOOD_SUCKING_ALL_PER: goto IL_2C3; case eBATTLESKILL_DETAIL_CODE.BLOOD_SUCKING_VALUE: case eBATTLESKILL_DETAIL_CODE.ADD_BLOOD_SUCKING_VALUE: IL_200: if (eBATTLESKILL_DETAIL_CODE == eBATTLESKILL_DETAIL_CODE.DAMAGE_P || eBATTLESKILL_DETAIL_CODE == eBATTLESKILL_DETAIL_CODE.HEAL_P) { goto IL_230; } if (eBATTLESKILL_DETAIL_CODE == eBATTLESKILL_DETAIL_CODE.SUMMON_LEVEL_P) { goto IL_2C3; } if (eBATTLESKILL_DETAIL_CODE == eBATTLESKILL_DETAIL_CODE.PROTECT_SHIELD_VALUE_P) { goto IL_230; } if (eBATTLESKILL_DETAIL_CODE != eBATTLESKILL_DETAIL_CODE.PLUNDER_ANGERLYPOINT_P) { goto IL_385; } goto IL_2C3; } goto IL_200; case eBATTLESKILL_DETAIL_CODE.AFTER_USED_SKILL: { int skillDetalParamValue2 = BSkillDetail.GetSkillDetalParamValue(74); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(skillDetalParamValue, skillDetalParamValue2); if (battleSkillDetail != null) { skillDetalParamValue = BSkillDetail.GetSkillDetalParamValue(3); if (skillDetalParamValue > 0) { if (solInfo != null) { int num3 = (solInfo.GetMaxDamage() + solInfo.GetMinDamage()) / 2; EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(solInfo.GetCharKind(), solInfo.GetGrade()); if (eventHeroCharCode != null) { int num4 = (int)((float)num3 * ((float)eventHeroCharCode.i32Attack * 0.01f)); num3 = num4; } num2 = (long)((int)((float)num3 * ((float)skillDetalParamValue / 10000f))); } else { num = (float)skillDetalParamValue / 100f; } } } goto IL_385; } case eBATTLESKILL_DETAIL_CODE.ACTION_HP_P: goto IL_2C3; } goto IL_1E2; } goto IL_190; case eBATTLESKILL_DETAIL_CODE.PLUS_MIN_DAMAGE_P: case eBATTLESKILL_DETAIL_CODE.PLUS_MAX_DAMAGE_P: goto IL_230; } goto IL_13A; IL_230: if (solInfo != null) { int num5 = (solInfo.GetMaxDamage() + solInfo.GetMinDamage()) / 2; if (0 <= costumeUnique) { num5 = this.GetCostumeDamage(solInfo, costumeUnique); } EVENT_HERODATA eventHeroCharCode2 = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(solInfo.GetCharKind(), solInfo.GetGrade()); if (eventHeroCharCode2 != null) { int num6 = (int)((float)num5 * ((float)eventHeroCharCode2.i32Attack * 0.01f)); num5 = num6; } num2 = (long)num5 * (long)skillDetalParamValue; num2 /= 10000L; } else { num = (float)skillDetalParamValue / 100f; } goto IL_385; IL_2C3: num = (float)skillDetalParamValue / 100f; IL_385: string value; if (num2 > 0L) { value = num2.ToString(); } else if (num > 0f) { value = num.ToString(); } else { value = skillDetalParamValue.ToString(); } refReplaceText.Append(value); } m_iTextCount += text.Length + 1; }
public void ReplaceBattleSkillParam(ref string refReplaceText, string BaseString, BATTLESKILL_DETAIL BSkillDetail, NkSoldierInfo solInfo, int costumeUnique = -1) { if (BSkillDetail == null) { return; } refReplaceText = string.Empty; int i = 0; this.replacedContent.Length = 0; while (i < BaseString.Length) { if (BaseString[i] == this.m_szTag[2]) { if (BaseString[i + 1] == this.m_szTag[7]) { this.replacedContent.Append(BaseString[i]); this.replacedContent.Append(BaseString[i + 1]); i++; } else { this.replacedContent.Append(BaseString[i]); } } else if (BaseString[i] == this.m_szTag[13]) { this.ReplaceParamValBattleSkill(ref i, ref this.replacedContent, BaseString, BSkillDetail, solInfo, costumeUnique); } else if (BaseString[i] == this.m_szTag[14]) { this.ReplaceName(ref i, ref this.replacedContent, BaseString); } else if (BaseString[i] == this.m_szTag[0]) { if (BaseString[i + 1] == this.m_szTag[4]) { this.CheckAuxiliaryWord(ref i, ref this.replacedContent, BaseString); } else if (BaseString[i + 1] == this.m_szTag[5]) { this.CheckAuxiliaryWord2(ref i, ref this.replacedContent, BaseString); } else if (BaseString[i + 1] == this.m_szTag[17]) { this.ReplaceGender(ref i, ref this.replacedContent, BaseString); } else if (BaseString[i + 1] == this.m_szTag[13]) { this.replacedContent.Append(BaseString[i]); this.replacedContent.Append(BaseString[i + 1]); this.replacedContent.Append(BaseString[i + 2]); i++; i++; i++; this.ReplaceParamValBattleSkill(ref i, ref this.replacedContent, BaseString, BSkillDetail, solInfo, costumeUnique); } else { this.replacedContent.Append(BaseString[i]); } } else if (BaseString[i] == this.m_szTag[8]) { if (BaseString[i + 1] == this.m_szTag[8]) { this.replacedContent.Append(BaseString[i + 1]); i++; } else { this.replacedContent.Append(BaseString[i + 1]); i++; } } else { this.replacedContent.Append(BaseString[i]); } i++; } refReplaceText = this.replacedContent.ToString(); }
public void Set_ItemInfo(ITEM _cItem) { if (_cItem == null || !_cItem.IsValid()) { return; } this.m_nlbEquipInfo.Clear(); ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(_cItem, null, false, true, G_ID.NONE); ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(_cItem.m_nItemUnique); if (itemInfo == null) { return; } NewListItem newListItem = new NewListItem(this.m_nlbEquipInfo.ColumnNum, true, string.Empty); int rank = _cItem.m_nOption[2]; int num = 0; bool flag = false; string text = string.Empty; if (_cItem.m_nPosType == 10 || _cItem.m_nPosType == 1 || _cItem.m_nPosType == 2 || _cItem.m_nPosType == 3 || _cItem.m_nPosType == 4) { text = string.Format("{0}{1} {2}", ItemManager.RankTextColor(rank), ItemManager.RankText(rank), NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo.m_nItemType)); } else { text = string.Format("{0}", NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo.m_nItemType)); } newListItem.SetListItemData(2, text, null, null, null); if (array.Length > 0) { if (array[0].m_MainOption) { newListItem.SetListItemData(4, array[0].m_OptionName, null, null, null); newListItem.SetListItemData(6, array[0].m_OptionValue, null, null, null); num++; } else { newListItem.SetListItemData(4, string.Empty, null, null, null); newListItem.SetListItemData(6, string.Empty, null, null, null); } StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = new StringBuilder(); if (array.Length > num) { for (int i = num; i < array.Length; i++) { stringBuilder.Append(array[i].m_OptionName); stringBuilder2.Append(array[i].m_OptionValue); } } newListItem.SetListItemData(5, stringBuilder.ToString(), null, null, null); newListItem.SetListItemData(7, stringBuilder2.ToString(), null, null, null); } else { newListItem.SetListItemData(4, string.Empty, null, null, null); newListItem.SetListItemData(5, string.Empty, null, null, null); newListItem.SetListItemData(6, string.Empty, null, null, null); newListItem.SetListItemData(7, string.Empty, null, null, null); } string text2 = NrTSingleton <ItemManager> .Instance.GetName(_cItem); if (_cItem.m_nDurability == 0 && (_cItem.m_nPosType == 1 || _cItem.m_nPosType == 2 || _cItem.m_nPosType == 3 || _cItem.m_nPosType == 4)) { text2 = string.Format("{0} {1}", text2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2984")); } newListItem.SetListItemData(11, text2, null, null, null); StringBuilder stringBuilder3 = new StringBuilder(); string value = "\r\n"; if (itemInfo.m_strToolTipTextKey != "0") { stringBuilder3.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey)); stringBuilder3.Append(value); } int num2 = _cItem.m_nOption[4]; int num3 = _cItem.m_nOption[5]; int num4 = _cItem.m_nOption[6]; int num5 = _cItem.m_nOption[9]; if (num2 > 0 && num3 > 0) { string value2 = string.Empty; string empty = string.Empty; BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num2, num3); if (battleSkillDetail != null) { if (itemInfo.IsItemATB(131072L) || itemInfo.IsItemATB(524288L)) { value2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2381")); } else { value2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2183")); } stringBuilder3.Append(value2); stringBuilder3.Append(value); NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, null, -1); stringBuilder3.Append(empty); stringBuilder3.Append(value); flag = true; } string empty2 = string.Empty; if (num4 > 0 && num5 > 0 && flag) { BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num4, num5); if (battleSkillDetail2 != null) { NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail2.m_nSkillTooltip), battleSkillDetail2, null, -1); } stringBuilder3.Append(empty2); stringBuilder3.Append(value); } } newListItem.SetListItemData(14, stringBuilder3.ToString(), null, null, null); newListItem.SetListItemData(8, NrTSingleton <ItemManager> .Instance.GetItemTexture(_cItem.m_nItemUnique), null, null, null); if (itemInfo.m_nSetUnique != 0) { newListItem.SetListItemData(12, string.Empty, _cItem, new EZValueChangedDelegate(this.Click_SetItem), null); } else { newListItem.SetListItemData(12, false); } newListItem.Data = _cItem; this.m_nlbEquipInfo.Add(newListItem); this.m_nlbEquipInfo.RepositionItems(); if (itemInfo.m_nSetUnique != 0) { this.Load_SetEffect(); } this.m_lbNotice.Visible = false; }
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; } } } }