public void SetItemList() { if (this.m_SolID == 0L) { return; } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(this.m_SolID); if (soldierInfoFromSolID == null) { return; } this.m_ItemList.Clear(); SelectItemDlg selectItemDlg = (SelectItemDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SELECTITEM_DLG); for (int i = 0; i < 6; i++) { ITEM item = soldierInfoFromSolID.GetEquipItemInfo().m_kItem[i].GetItem(); if (item != null) { if (item.m_nItemUnique > 0) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique); if (itemInfo != null) { if (selectItemDlg.DlgType == SelectItemDlg.eType.Enhance && item.m_nRank >= 10) { if (itemInfo == null) { goto IL_12F; } if ((int)soldierInfoFromSolID.GetLevel() < itemInfo.GetUseMinLevel(item)) { goto IL_12F; } } if (selectItemDlg.DlgType != SelectItemDlg.eType.Repair || item.m_nDurability < 100) { if (selectItemDlg.DlgType == SelectItemDlg.eType.Dissemblie) { } this.m_ItemList.Add(soldierInfoFromSolID.GetEquipItemInfo().m_kItem[i].GetItem()); } } } } IL_12F :; } this.m_TotalPage = Math.Abs(this.m_ItemList.Count - 1) / ItemListDlg.NUM_ITEMLIST + 1; this.m_CurrentPage = 1; this.m_UpdateCount = soldierInfoFromSolID.GetItemUpdateCount(); this.ShowItemList(); }
public NkSoldierInfo AddSolInfo(SOLDIER_INFO solInfo, SOLDIER_BATTLESKILL_INFO pkBattleSkill, bool bReadyEquipItem) { NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.Set(solInfo); if (pkBattleSkill != null) { nkSoldierInfo.SetBattleSkillInfo(pkBattleSkill); } if (this.ReadySolList.ContainsKey(solInfo.SolID)) { NkSoldierInfo nkSoldierInfo2; if (this.ReadySolList.TryGetValue(solInfo.SolID, out nkSoldierInfo2)) { NrEquipItemInfo equipItemInfo = nkSoldierInfo.GetEquipItemInfo(); if (equipItemInfo != null) { equipItemInfo.Set(nkSoldierInfo2.GetEquipItemInfo()); } } this.ReadySolList.Remove(nkSoldierInfo.GetSolID()); bReadyEquipItem = true; } nkSoldierInfo.SetReceivedEquipItem(bReadyEquipItem); nkSoldierInfo.UpdateSoldierStatInfo(); this.ReadySolList.Add(nkSoldierInfo.GetSolID(), nkSoldierInfo); return(nkSoldierInfo); }
public NkSoldierInfo AddSolInfo(SOLDIER_INFO solInfo, SOLDIER_BATTLESKILL_INFO pkBattleSkill, bool bReadyEquipItem) { NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.Set(solInfo); if (pkBattleSkill != null) { nkSoldierInfo.SetBattleSkillInfo(pkBattleSkill); } if (this.IsSameSolExist(solInfo.SolID)) { NkSoldierInfo soldierInfo = this.GetSoldierInfo(solInfo.SolID); if (soldierInfo != null) { NrEquipItemInfo equipItemInfo = nkSoldierInfo.GetEquipItemInfo(); if (equipItemInfo != null) { equipItemInfo.Set(soldierInfo.GetEquipItemInfo()); } } this.RemoveSol(nkSoldierInfo.GetSolID()); bReadyEquipItem = true; } nkSoldierInfo.SetReceivedEquipItem(bReadyEquipItem); nkSoldierInfo.UpdateSoldierStatInfo(); this.m_SolWarehouseList.Add(nkSoldierInfo); return(nkSoldierInfo); }
public void ReFreshItem() { if (this.m_SetItem == null) { return; } ITEM iTEM = new ITEM(); if (this.m_SetItem.m_nPosType == 10) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(this.m_SolID); if (soldierInfoFromSolID != null) { iTEM = soldierInfoFromSolID.GetEquipItemInfo().GetItem(this.m_SetItem.m_nItemPos); } } else { iTEM = NkUserInventory.GetInstance().GetItem(this.m_SetItem.m_nPosType, this.m_SetItem.m_nItemPos); this.m_SolID = 0L; } this.m_SetItem = iTEM; this.SetSolID(this.m_SolID); this.Set_Value(iTEM); }
private bool SetButtonLegendReincarnate() { bool result = true; for (int i = 0; i < 5; i++) { if (this.m_eElement_Msg[i] >= eElement_MsgType.eElement_NOTSOL && this.m_eElement_Msg[i] <= eElement_MsgType.eElement_NEEDGRADE) { result = false; } } for (int j = 0; j < 5; j++) { NkSoldierInfo legendSolInfo = this.m_Element_SolID.GetLegendSolInfo(j); if (legendSolInfo == null) { result = false; break; } if (legendSolInfo.GetFriendPersonID() != 0L) { result = false; break; } for (int k = 0; k < 6; k++) { if (legendSolInfo.GetEquipItemInfo() != null) { ITEM item = legendSolInfo.GetEquipItemInfo().m_kItem[k].GetItem(); if (item != null) { if (item.m_nItemUnique != 0) { result = false; break; } } } } } return(result); }
public override string GetConditionText(long i64ParamVal) { string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique((int)base.GetParam()); string textFromQuest_Code = NrTSingleton <NrTextMgr> .Instance.GetTextFromQuest_Code(this.m_szTextKey); string empty = string.Empty; int num = 0; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return("No User"); } for (int i = 0; i < 6; i++) { NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i); if (soldierInfo.GetSolPosType() == 1) { bool flag = false; for (int j = 0; j < 6; j++) { if (soldierInfo.GetEquipItemInfo() != null && (long)soldierInfo.GetEquipItem(j).m_nItemUnique == base.GetParam()) { num = soldierInfo.GetEquipItem(j).m_nRank; flag = true; break; } } if (flag) { break; } } } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromQuest_Code, "targetname", itemNameByItemUnique, "count1", base.GetParamVal(), "count2", num }); return(empty); }
public override bool CheckCondition(long i64Param, ref long i64ParamVal) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return(false); } int num = 0; for (int i = 0; i < 6; i++) { NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i); if (soldierInfo.GetSolPosType() == 1) { for (int j = 0; j < 6; j++) { if (soldierInfo.GetEquipItemInfo() != null && (long)soldierInfo.GetEquipItem(j).m_nItemUnique == base.GetParam()) { int num2 = Protocol_Item.Get_Defense(soldierInfo.GetEquipItem(j)); if (num > num2) { num = num2; } } } } } NkUserInventory instance = NkUserInventory.GetInstance(); if (instance == null) { return(false); } for (short num3 = 0; num3 < 30; num3 += 1) { ITEM item = instance.GetItem(1, (int)num3); if (item != null) { int num4 = Protocol_Item.Get_Defense(item); if (num > num4) { num = num4; } } } return((long)num >= base.GetParamVal()); }
public void SetData(long SolID) { int num = 0; this.m_lbSolname.Text = string.Empty; this.m_ListBox.Clear(); this.m_SolID = SolID; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(this.m_SolID); if (soldierInfoFromSolID != null) { this.m_lbSolname.Text = soldierInfoFromSolID.GetName(); for (int i = 0; i < 6; i++) { ITEM item = soldierInfoFromSolID.GetEquipItemInfo().m_kItem[i].GetItem(); if (item != null) { if (item.m_nItemUnique > 0) { if (NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique) != null) { ListItem item2 = new ListItem(); this.SetItemColum(item, num++, ref item2); this.m_ListBox.Add(item2); } } } } this.m_ListBox.RepositionItems(); } if (num == 0) { this.m_lbText.Visible = true; } else { this.m_lbText.Visible = false; } }
public void SetSoldierEquipItem(long SolID, NrEquipItemInfo kEquipInfo) { if (this.m_SolList != null) { NkSoldierInfo soldierInfoBySolID = this.m_SolList.GetSoldierInfoBySolID(SolID); if (soldierInfoBySolID != null) { NrEquipItemInfo equipItemInfo = soldierInfoBySolID.GetEquipItemInfo(); equipItemInfo.Set(kEquipInfo); soldierInfoBySolID.UpdateSoldierStatInfo(); this.UpdateSoldieInfo(this.m_SelectIndex); } } else { Debug.LogError("m_SolList null "); } }
public bool IsExecutEnhance() { bool result = true; if (this.m_Packet.nSrcPosType == 10) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return(false); } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(this.m_Packet.SolID); if (soldierInfoFromSolID != null) { ITEM item = soldierInfoFromSolID.GetEquipItemInfo().GetItem(this.m_Packet.nSrcItemPos); if (item == null) { result = false; } else if (item.m_nItemID == this.m_SetItem.m_nItemID && item.m_nItemUnique == this.m_SetItem.m_nItemUnique && item.m_nRank == this.m_SetItem.m_nRank) { result = true; } } } else { ITEM item = NkUserInventory.GetInstance().GetItem((int)((byte)this.m_Packet.nSrcPosType), this.m_Packet.nSrcItemPos); if (item == null) { result = false; } else if (item.m_nItemID == this.m_SetItem.m_nItemID && item.m_nItemUnique == this.m_SetItem.m_nItemUnique && item.m_nRank == this.m_SetItem.m_nRank) { result = true; } } return(result); }
public override bool CheckGameGuideOnce() { if (10000L <= NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null) { for (int i = 0; i < 6; i++) { NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i); if (soldierInfo != null) { if (soldierInfo.GetSolID() != 0L) { NrEquipItemInfo equipItemInfo = soldierInfo.GetEquipItemInfo(); if (equipItemInfo != null) { for (int j = 0; j < 6; j++) { if (0 < equipItemInfo.GetItemUnique(j)) { int num = equipItemInfo.m_kItem[j].GetItem().m_nOption[2]; if (num >= 3) { return(false); } } } } } } } return(true); } } return(false); }
public virtual void OnReincarnateOK(object a_oObject) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } long[] array = new long[5]; for (int i = 0; i < 5; i++) { this.m_eElement_Msg[i] = eElement_MsgType.eElement_NOTSOL; if (this.m_CharKind_Legendinfo.i32Base_CharKind[i] == 0) { this.m_eElement_Msg[i] = eElement_MsgType.eElement_OK; array[i] = 0L; } else { NkSoldierInfo legendSolInfo = this.m_Element_SolID.GetLegendSolInfo(i); if (legendSolInfo == null) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1649"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } if (legendSolInfo.GetSolPosType() != 0) { if (legendSolInfo.GetSolPosType() == 2 || legendSolInfo.GetSolPosType() == 6) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("384"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : SOL Pos{1} == Char Sol Pos Type", new object[] { this.m_CharKind_Legendinfo.i32Base_CharKind[i], legendSolInfo.GetSolPosType() }); return; } else { for (int j = 0; j < 6; j++) { ITEM item = legendSolInfo.GetEquipItemInfo().m_kItem[j].GetItem(); if (item == null) { TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Item pos{1} == ITEM NULL ", new object[] { this.m_CharKind_Legendinfo.i32Base_CharKind[i], j }); return; } if (item.m_nItemUnique != 0) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("383"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } } if (legendSolInfo.GetFriendPersonID() != 0L) { TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Set FriendSOLHELP ", new object[] { legendSolInfo.GetName() }); return; } array[i] = legendSolInfo.GetSolID(); } } } long i64NeedMoney = this.m_CharKind_Legendinfo.i64NeedMoney; int itemCnt = NkUserInventory.GetInstance().GetItemCnt(this.m_CharKind_Legendinfo.i32EssenceUnique); if (i64NeedMoney > kMyCharInfo.m_Money) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } if (itemCnt < this.m_CharKind_Legendinfo.i32NeedEssence) { string empty = string.Empty; string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_CharKind_Legendinfo.i32EssenceUnique); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("780"), "target", itemNameByItemUnique }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } GS_ELEMENT_LEGENDSOL_GET_REQ gS_ELEMENT_LEGENDSOL_GET_REQ = new GS_ELEMENT_LEGENDSOL_GET_REQ(); gS_ELEMENT_LEGENDSOL_GET_REQ.i64PersonID = kMyCharInfo.m_PersonID; gS_ELEMENT_LEGENDSOL_GET_REQ.i32CharKind = this.m_CharKind_Legendinfo.i32Element_LegendCharkind; gS_ELEMENT_LEGENDSOL_GET_REQ.i64SolID = array; SendPacket.GetInstance().SendObject(1840, gS_ELEMENT_LEGENDSOL_GET_REQ); }
private void SetReincarnateListBox(ref NewListItem item, int i, int i32CharKind, byte bCharRank, bool bElement) { string text = string.Empty; NkSoldierInfo battleSolDataCheck = this.GetBattleSolDataCheck(ref this.m_eElement_Msg[i], i32CharKind, bCharRank); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32CharKind); if (charKindInfo == null) { TsLog.LogOnlyEditor("!!!!!!!!!! SolGuild - Element CharKind " + i32CharKind + " Error"); return; } item.SetListItemData(8, false); item.SetListItemData(9, false); item.SetListItemData(10, false); item.SetListItemData(11, false); NkListSolInfo nkListSolInfo = new NkListSolInfo(); nkListSolInfo.SolCharKind = i32CharKind; nkListSolInfo.SolGrade = (int)(bCharRank - 1); item.SetListItemData(3, nkListSolInfo, null, null, null); item.SetListItemData(4, charKindInfo.GetName(), null, null, null); text = this.GetElementSolMsg(this.m_eElement_Msg[i]); item.SetListItemData(5, text, null, null, null); if (this.m_eElement_Msg[i] == eElement_MsgType.eElement_OK || this.m_eElement_Msg[i] == eElement_MsgType.eElement_SOLHEIGHT) { item.SetListItemData(0, true); item.SetListItemData(1, false); item.SetListItemData(7, battleSolDataCheck.GetListSolInfo(false), null, null, null); } else { item.SetListItemData(0, false); item.SetListItemData(1, true); if (battleSolDataCheck == null) { item.SetListItemData(7, false); return; } item.SetListItemData(7, battleSolDataCheck.GetListSolInfo(false), null, null, null); } if (bElement) { bool flag = false; for (int j = 0; j < 6; j++) { if (battleSolDataCheck.GetEquipItemInfo() != null) { ITEM item2 = battleSolDataCheck.GetEquipItemInfo().m_kItem[j].GetItem(); if (item2 == null) { TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Item pos{1} == ITEM NULL ", new object[] { i32CharKind, j }); } else if (item2.m_nItemUnique != 0) { flag = true; } } } if (flag) { item.SetListItemData(5, false); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("627"); item.SetListItemData(8, true); item.SetListItemData(9, true); item.SetListItemData(9, text, battleSolDataCheck, new EZValueChangedDelegate(this.OnClickReleaseEquip), null); } else if (battleSolDataCheck.GetFriendPersonID() != 0L) { item.SetListItemData(5, false); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("74"); item.SetListItemData(8, true); item.SetListItemData(9, true); item.SetListItemData(9, text, battleSolDataCheck, new EZValueChangedDelegate(this.OnClickUnsetSolHelp), null); } } item.Data = battleSolDataCheck.GetSolID(); }
public void SetEvolutionResultData(GS_ITEMEVOLUTION_ACK pPacket) { this.m_SelectItem = NkUserInventory.GetInstance().GetItemFromItemID(pPacket.i64BaseItemID); if (this.m_SelectItem == null) { ItemEvolution_Dlg itemEvolution_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMEVOLUTION_DLG) as ItemEvolution_Dlg; if (itemEvolution_Dlg == null) { this.CloseForm(null); return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(itemEvolution_Dlg.GetItemSelectSolID()); if (soldierInfoFromSolID != null) { this.m_SelectItem = soldierInfoFromSolID.GetEquipItemInfo().GetItemFromItemID(pPacket.i64BaseItemID); } } if (this.m_SelectItem == null) { return; } this.m_IT_ItemIcon.SetItemTexture(this.m_SelectItem); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2931"), "grade", NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_SelectItem.m_nItemUnique).m_nStarGrade, "target", NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_SelectItem.m_nItemUnique) }); this.m_LB_ItemRank.SetText(empty); empty = string.Empty; int num = this.m_SelectItem.m_nOption[5]; int skillUnique = this.m_SelectItem.m_nOption[4]; BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique); if (battleSkillBase == null) { return; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1292"), "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); this.m_LB_ItemSkillLv.SetText(empty); this.LoadSolComposeSuccessBundle(); this.m_Btn_Ok.SetEnabled(true); }
public void OnReincarnateOK(object a_oObject) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } int num = 0; byte bCharGrade = 0; long[] array = new long[5]; for (int i = 0; i < 5; i++) { if (this.m_MaterialSol.i32BaseCharKind == this.m_SelectSlotData.i32KindInfo) { this.m_MaterialSol.GetCharData((byte)i, ref num, ref bCharGrade); } this.m_eElement_Msg[i] = eElement_MsgType.eElement_NOTSOL; if (num == 0) { this.m_eElement_Msg[i] = eElement_MsgType.eElement_OK; array[i] = 0L; } else { NkSoldierInfo battleSolDataCheck = this.GetBattleSolDataCheck(ref this.m_eElement_Msg[i], num, bCharGrade); if (battleSolDataCheck == null) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1649"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } if (battleSolDataCheck.GetSolPosType() != 0) { if (battleSolDataCheck.GetSolPosType() == 2 || battleSolDataCheck.GetSolPosType() == 6) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("384"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : SOL Pos{1} == Char Sol Pos Type", new object[] { num, battleSolDataCheck.GetSolPosType() }); return; } else { for (int j = 0; j < 6; j++) { ITEM item = battleSolDataCheck.GetEquipItemInfo().m_kItem[j].GetItem(); if (item == null) { TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Item pos{1} == ITEM NULL ", new object[] { num, j }); return; } if (item.m_nItemUnique != 0) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("383"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } } if (battleSolDataCheck.GetFriendPersonID() != 0L) { TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Set FriendSOLHELP ", new object[] { battleSolDataCheck.GetName() }); return; } array[i] = battleSolDataCheck.GetSolID(); } } } long num2 = 0L; if (this.m_MaterialSol.i32BaseCharKind == this.m_SelectSlotData.i32KindInfo) { num2 = this.m_MaterialSol.i64Money; } if (num2 > kMyCharInfo.m_Money) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE); return; } GS_ELEMENT_SOL_GET_REQ gS_ELEMENT_SOL_GET_REQ = new GS_ELEMENT_SOL_GET_REQ(); gS_ELEMENT_SOL_GET_REQ.i64PersonID = kMyCharInfo.m_PersonID; gS_ELEMENT_SOL_GET_REQ.i32CharKind = this.m_SelectSlotData.i32KindInfo; gS_ELEMENT_SOL_GET_REQ.i64SolID = array; SendPacket.GetInstance().SendObject(1838, gS_ELEMENT_SOL_GET_REQ); }
private bool CheckGuide() { this.srcItem = null; this.destItem = null; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null) { for (int i = 0; i < 6; i++) { NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i); if (soldierInfo != null) { if (soldierInfo.GetSolID() != 0L) { ITEM iTEM = null; int num = soldierInfo.GetEquipItemInfo().HaveEquipItem(ref iTEM, soldierInfo); if (-1 < num && iTEM != null) { NkSoldierInfo soldierInfo2 = charPersonInfo.GetSoldierInfo(0); if (soldierInfo2 != null) { this.srcSolID = soldierInfo2.GetSolID(); } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(iTEM.m_nItemUnique); if (itemInfo != null && itemInfo.m_nItemType == 19 && !soldierInfo.IsAtbCommonFlag(2L)) { return(false); } this.srcItem = iTEM; this.destSolID = soldierInfo.GetSolID(); return(true); } else { NrEquipItemInfo equipItemInfo = soldierInfo.GetEquipItemInfo(); if (equipItemInfo != null) { for (int j = 0; j < 6; j++) { if (j != 5 || soldierInfo.IsAtbCommonFlag(2L)) { if (0 < equipItemInfo.GetItemUnique(j)) { if (equipItemInfo.GetItem(j).m_nOption[4] == 0) { ITEM batterItemByUnique = NkUserInventory.instance.GetBatterItemByUnique(equipItemInfo.GetItem(j), soldierInfo.GetLevel()); if (batterItemByUnique != null) { this.destItem = equipItemInfo.GetItem(j); this.srcItem = batterItemByUnique; NkSoldierInfo soldierInfo3 = charPersonInfo.GetSoldierInfo(0); if (soldierInfo3 != null) { this.srcSolID = soldierInfo3.GetSolID(); } this.destSolID = soldierInfo.GetSolID(); return(true); } } } } } } } } } } NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList(); if (readySolList == null) { return(false); } foreach (NkSoldierInfo current in readySolList.GetList().Values) { if (current != null) { if (0L < current.GetExp()) { if (current.GetSolID() != 0L) { if (current.GetSolPosType() != 2 && current.GetSolPosType() != 6) { ITEM iTEM2 = null; int num2 = current.GetEquipItemInfo().HaveEquipItem(ref iTEM2, current); if (-1 < num2 && iTEM2 != null) { NkSoldierInfo soldierInfo4 = charPersonInfo.GetSoldierInfo(0); if (soldierInfo4 != null) { this.srcSolID = soldierInfo4.GetSolID(); } ITEMINFO itemInfo2 = NrTSingleton <ItemManager> .Instance.GetItemInfo(iTEM2.m_nItemUnique); bool result; if (itemInfo2 != null && itemInfo2.m_nItemType == 19 && !current.IsAtbCommonFlag(2L)) { result = false; return(result); } this.srcItem = iTEM2; this.destSolID = current.GetSolID(); result = true; return(result); } else { NrEquipItemInfo equipItemInfo2 = current.GetEquipItemInfo(); if (equipItemInfo2 != null) { for (int k = 0; k < 6; k++) { if (k != 5 || current.IsAtbCommonFlag(2L)) { if (0 < equipItemInfo2.GetItemUnique(k)) { ITEM batterItemByUnique2 = NkUserInventory.instance.GetBatterItemByUnique(equipItemInfo2.GetItem(k), current.GetLevel()); if (batterItemByUnique2 != null) { this.destItem = equipItemInfo2.GetItem(k); this.srcItem = batterItemByUnique2; NkSoldierInfo soldierInfo5 = charPersonInfo.GetSoldierInfo(0); if (soldierInfo5 != null) { this.srcSolID = soldierInfo5.GetSolID(); } this.destSolID = current.GetSolID(); bool result = true; return(result); } } } } } } } } } } } return(false); } return(false); }
public void SetResult(GS_ENHANCEITEM_ACK ACK) { ITEM itemFromItemID = NkUserInventory.GetInstance().GetItemFromItemID(ACK.i64ItemID); if (itemFromItemID == null) { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(ACK.i64SolID); if (soldierInfoFromSolID != null) { itemFromItemID = soldierInfoFromSolID.GetEquipItemInfo().GetItemFromItemID(ACK.i64ItemID); } } if (itemFromItemID != null) { this.m_Item = itemFromItemID; this.m_itItem.SetItemTexture(this.m_Item); string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_Item); this.m_lbItem.Text = ItemManager.RankTextColor(ACK.nCurRank) + name; this.m_dtItemBG.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString(ACK.nCurRank)); } byte i8ReduceSuccess = ACK.i8ReduceSuccess; if (i8ReduceSuccess != 1 && i8ReduceSuccess != 2) { this.m_bSuccess = false; this.m_lbInfo.Hide(true); } else { if (ACK.nItemType != 10) { ReduceMainDlg reduceMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REDUCEMAIN_DLG) as ReduceMainDlg; if (reduceMainDlg != null) { reduceMainDlg.UpdateData(ACK.nItemPos, ACK.nItemType, ACK.i64ItemID); } } int num = ACK.i32ITEMUPGRADE[8] - ACK.i32ITEMOPTION[8]; if (0 > num) { num = 0; } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strMessage, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("982"), "Count", num }); this.m_lbInfo.SetText(this.m_strMessage); this.m_bSuccess = true; } this.LoadSolComposeSuccessBundle(); }
private bool CheckGuide() { this.destItem = null; this.srcItem = null; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null) { for (int i = 0; i < 6; i++) { NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i); if (soldierInfo != null) { if (soldierInfo.GetSolID() != 0L) { NrEquipItemInfo equipItemInfo = soldierInfo.GetEquipItemInfo(); if (equipItemInfo != null) { for (int j = 0; j < 6; j++) { if (0 < equipItemInfo.GetItemUnique(j)) { ITEM batterItemByUnique = NkUserInventory.instance.GetBatterItemByUnique(equipItemInfo.GetItem(j), soldierInfo.GetLevel()); if (batterItemByUnique != null) { this.destItem = equipItemInfo.GetItem(j); this.srcItem = batterItemByUnique; NkSoldierInfo soldierInfo2 = charPersonInfo.GetSoldierInfo(0); if (soldierInfo2 != null) { this.srcSolID = soldierInfo2.GetSolID(); } this.destSolID = soldierInfo.GetSolID(); return(true); } } } } } } } } NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList(); if (readySolList == null) { return(false); } foreach (NkSoldierInfo current in readySolList.GetList().Values) { if (current != null) { if (0L < current.GetExp()) { if (current.GetSolID() != 0L) { NrEquipItemInfo equipItemInfo2 = current.GetEquipItemInfo(); if (equipItemInfo2 != null) { for (int k = 0; k < 6; k++) { if (0 < equipItemInfo2.GetItemUnique(k)) { ITEM batterItemByUnique2 = NkUserInventory.instance.GetBatterItemByUnique(equipItemInfo2.GetItem(k), current.GetLevel()); if (batterItemByUnique2 != null) { this.destItem = equipItemInfo2.GetItem(k); this.srcItem = batterItemByUnique2; NkSoldierInfo soldierInfo3 = charPersonInfo.GetSoldierInfo(0); if (soldierInfo3 != null) { this.srcSolID = soldierInfo3.GetSolID(); } this.destSolID = current.GetSolID(); return(true); } } } } } } } } return(false); }
public void SetData(GS_ENHANCEITEM_ACK pPacket) { NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money = pPacket.LeftMoney; ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg; ITEM item = NkUserInventory.GetInstance().GetItem(pPacket.nItemType, pPacket.nItemPos); if (item == null) { if (reforgeMainDlg == null) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(reforgeMainDlg.GetSolID()); if (soldierInfoFromSolID != null) { item = soldierInfoFromSolID.GetEquipItemInfo().GetItem(pPacket.nItemPos); } } this.m_Item = item; this.m_txItemAfter.SetItemTexture(item); string name = NrTSingleton <ItemManager> .Instance.GetName(item); this.m_lbItemAfterName.Text = ItemManager.RankTextColor(pPacket.nCurRank) + name; this.m_lbItemGrade.Text = ItemManager.RankTextColor(pPacket.nCurRank) + ItemManager.RankText(pPacket.nCurRank); this.m_txItemBG.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString(pPacket.nCurRank)); this.GetStatString(item.m_nItemUnique, pPacket); this.LoadSolComposeSuccessBundle(); if (pPacket.i8ItemEnchantSuccess == 1 && pPacket.nLastRank < pPacket.nCurRank) { TsAudioManager.Container.RequestAudioClip("UI_SFX", "EQUIPMENT-UP", "SUCCESS", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); this.m_bItemUpgradeSuccess = true; this.FacebookButtonSet(false); if (pPacket.nItemType != 10) { ReforgeSelectDlg reforgeSelectDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGESELECT_DLG) as ReforgeSelectDlg; if (reforgeSelectDlg != null) { reforgeSelectDlg.UpdateData(pPacket.nItemPos, pPacket.nItemType, pPacket.i64ItemID); } } } else { TsAudioManager.Container.RequestAudioClip("UI_SFX", "EQUIPMENT-UP", "FAIL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); this.m_bItemUpgradeSuccess = false; this.FacebookButtonSet(false); } TsLog.Log("Packet SolID ={0}", new object[] { pPacket.i64SolID }); if (reforgeMainDlg != null) { reforgeMainDlg.bSendRequest = false; } }
public void SetItemSkillReinforceData(GS_ITEMSKILL_REINFORCE_ACK pPacket) { base.SetShowLayer(1, false); this.m_lbBefore.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2960")); this.m_lbAfter.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2961")); this.m_SelectItem = NkUserInventory.GetInstance().GetItemFromItemID(pPacket.i64BaseItemID); if (this.m_SelectItem == null) { ItemSkill_Dlg itemSkill_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg == null) { this.CloseForm(null); return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(itemSkill_Dlg.GetItemSelectSolID()); if (soldierInfoFromSolID != null) { this.m_SelectItemSolID = itemSkill_Dlg.GetItemSelectSolID(); this.m_SelectItem = soldierInfoFromSolID.GetEquipItemInfo().GetItemFromItemID(pPacket.i64BaseItemID); } } if (this.m_SelectItem == null) { return; } string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_SelectItem); this.m_itxItem.SetItemTexture(this.m_SelectItem); this.m_lbItemName.SetText(name); ItemSkill_Dlg itemSkill_Dlg2 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg2 != null) { itemSkill_Dlg2.UpdateData(this.m_SelectItem.m_nItemPos, this.m_SelectItem.m_nPosType, 0L); itemSkill_Dlg2.CheckSelectItem(); } ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_SelectItem.m_nItemUnique); bool flag = false; if (itemInfo.IsItemATB(131072L) || itemInfo.IsItemATB(524288L)) { flag = true; } int skillUnique = this.m_SelectItem.m_nOption[6]; int num = this.m_SelectItem.m_nOption[9]; if (!flag) { skillUnique = this.m_SelectItem.m_nOption[4]; num = this.m_SelectItem.m_nOption[5]; } int num2 = 0; this.m_bItemSkillSuccess = false; string empty = string.Empty; BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique); if (battleSkillBase != null) { if (pPacket.RessultType == 0) { num2 = num - 1; this.m_bItemSkillSuccess = true; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2963"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -1) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2964"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -2) { num2 = num + 1; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2965"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -3) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2966"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } else if (pPacket.RessultType == -4) { num2 = num; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2986"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); } this.m_lbAfter2.SetText(empty); empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2670"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num2 }); this.m_lbBefore2.SetText(empty); } base.SetShowLayer(2, true); this.LoadSolComposeSuccessBundle(); }
public void SetData(GS_ENHANCEITEM_ACK pPacket) { base.SetShowLayer(2, false); int skillUnique = pPacket.i32ITEMUPGRADE[4]; int num = pPacket.i32ITEMUPGRADE[5]; int num2 = pPacket.i32ITEMUPGRADE[2]; int num3 = pPacket.i32ITEMUPGRADE[2]; int skillUnique2 = pPacket.i32ITEMOPTION[4]; int num4 = pPacket.i32ITEMOPTION[5]; this.m_SelectItem = NkUserInventory.GetInstance().GetItem(pPacket.nItemType, pPacket.nItemPos); if (this.m_SelectItem == null) { ItemSkill_Dlg itemSkill_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg == null) { this.CloseForm(null); return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(itemSkill_Dlg.GetItemSelectSolID()); if (soldierInfoFromSolID != null) { this.m_SelectItemSolID = itemSkill_Dlg.GetItemSelectSolID(); this.m_SelectItem = soldierInfoFromSolID.GetEquipItemInfo().GetItem(pPacket.nItemPos); } } this.m_txItemSlotBG.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString((int)this.m_SelectItem.GetRank())); string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_SelectItem); this.m_itxItem.SetItemTexture(this.m_SelectItem); this.m_lbItemName.SetText(name); this.m_lbItemStat.SetText(string.Empty); this.m_lbItemStat_before.SetText(string.Empty); this.m_bItemSkillSuccess = (pPacket.nAddSkillSuccess == 1); string empty = string.Empty; BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique); BATTLESKILL_BASE battleSkillBase2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique2); if (battleSkillBase != null && this.m_bItemSkillSuccess) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1218"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "skilllevel", num }); this.m_lbItemStat.SetText(empty); if (pPacket.nItemType != 10) { ItemSkill_Dlg itemSkill_Dlg2 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMSKILL_DLG) as ItemSkill_Dlg; if (itemSkill_Dlg2 != null) { itemSkill_Dlg2.UpdateData(pPacket.nItemPos, pPacket.nItemType, pPacket.i64ItemID); } } if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"), "count", pPacket.i32ITEMUPGRADE[7] }); this.m_lbTradeCount.SetText(empty); } else { this.m_lbTradeCount.SetText(string.Empty); } if (battleSkillBase2 != null) { this.m_btnUndo.Visible = true; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1218"), "targetname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase2.m_strTextKey), "skilllevel", num4 }); this.m_lbItemStat_before.SetText(empty); if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"), "count", pPacket.i32ITEMOPTION[7] }); this.m_lbTradeCount_before.SetText(empty); } else { this.m_lbTradeCount_before.SetText(string.Empty); } } else { this.m_lbTradeCount_before.SetText(string.Empty); this.m_lbItemStat_before.SetText(string.Empty); this.m_btnUndo.Visible = false; } } else { this.m_lbTradeCount.SetText(string.Empty); this.m_btnUndo.Visible = false; } if (num2 != num3) { this.m_lbItemStat.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1219")); Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("269")); } this.LoadSolComposeSuccessBundle(); }
public override string GetConditionText(long i64ParamVal) { string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique((int)base.GetParam()); string textFromQuest_Code = NrTSingleton <NrTextMgr> .Instance.GetTextFromQuest_Code(this.m_szTextKey); string empty = string.Empty; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return("No User"); } int num = 0; for (int i = 0; i < 6; i++) { NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i); if (soldierInfo.GetSolPosType() == 1) { for (int j = 0; j < 6; j++) { if (soldierInfo.GetEquipItemInfo() != null && (long)soldierInfo.GetEquipItem(j).m_nItemUnique == base.GetParam()) { int num2 = Protocol_Item.Get_Defense(soldierInfo.GetEquipItem(j)); if (num > num2) { num = num2; } } } } } NkUserInventory instance = NkUserInventory.GetInstance(); if (instance == null) { return(string.Empty); } for (short num3 = 0; num3 < 30; num3 += 1) { ITEM item = instance.GetItem(1, (int)num3); if (item != null) { int num4 = Protocol_Item.Get_Defense(item); if (num > num4) { num = num4; } } } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromQuest_Code, "targetname", itemNameByItemUnique, "count1", num, "count2", base.GetParamVal() }); return(empty); }
public void AddLegendElement(NkSoldierInfo kSoldierInfo, int iCount) { byte b = this.m_CharKind_Legendinfo.ui8Base_LegendGrade[iCount] - 1; NkSoldierInfo nkSoldierInfo = null; eElement_MsgType eElement_MsgType = eElement_MsgType.eElement_NONE; this.GetLegendSolGradeCheck(ref nkSoldierInfo, ref eElement_MsgType, kSoldierInfo, b); if (nkSoldierInfo == null) { return; } NewListItem newListItem = new NewListItem(this.m_NewListBox_Reincarnate.ColumnNum, true, string.Empty); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nkSoldierInfo.GetCharKind()); if (charKindInfo == null) { TsLog.LogOnlyEditor("!!!!!!!!!! SolGuild - Element CharKind " + nkSoldierInfo.GetCharKind() + " Error"); return; } int num = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_LEGEND_ADVENT_HERO); if (num < 0) { num = 0; } this.m_eElement_Msg[iCount] = eElement_MsgType; if (kSoldierInfo.GetCharKind() == num) { this.m_eElement_Msg[iCount] = eElement_MsgType.eElement_OK; } newListItem.SetListItemData(8, false); newListItem.SetListItemData(9, false); newListItem.SetListItemData(3, new NkListSolInfo { SolCharKind = this.m_CharKind_Legendinfo.i32Base_CharKind[iCount], SolGrade = (int)b }, null, null, null); newListItem.SetListItemData(4, charKindInfo.GetName(), null, null, null); string text = this.GetElementSolMsg(this.m_eElement_Msg[iCount]); newListItem.SetListItemData(5, text, null, null, null); if (nkSoldierInfo == null) { UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_B_Addlist"); if (uIBaseInfoLoader != null) { newListItem.SetListItemData(10, uIBaseInfoLoader, iCount, new EZValueChangedDelegate(this.OnClickUseSol), null); } else { newListItem.SetListItemData(10, string.Empty, iCount, new EZValueChangedDelegate(this.OnClickUseSol), null); } } else { UIBaseInfoLoader uIBaseInfoLoader2 = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_B_Addlist"); if (uIBaseInfoLoader2 != null) { newListItem.SetListItemData(10, uIBaseInfoLoader2, iCount, new EZValueChangedDelegate(this.OnClickUseSol), null); } } if (this.m_eElement_Msg[iCount] == eElement_MsgType.eElement_OK || this.m_eElement_Msg[iCount] == eElement_MsgType.eElement_SOLHEIGHT) { newListItem.SetListItemData(0, true); newListItem.SetListItemData(1, false); newListItem.SetListItemData(11, false); if (nkSoldierInfo == null) { newListItem.SetListItemData(6, false); newListItem.SetListItemData(7, false); return; } newListItem.SetListItemData(6, true); newListItem.SetListItemData(7, nkSoldierInfo.GetListSolInfo(false), null, null, null); this.m_Element_SolID.SetLegendSol(nkSoldierInfo, iCount); } else { newListItem.SetListItemData(0, false); newListItem.SetListItemData(1, true); if (nkSoldierInfo == null) { newListItem.SetListItemData(6, false); newListItem.SetListItemData(7, false); newListItem.SetListItemData(11, false); return; } newListItem.SetListItemData(6, true); newListItem.SetListItemData(7, nkSoldierInfo.GetListSolInfo(false), null, null, null); newListItem.SetListItemData(11, true); this.m_Element_SolID.SetLegendSol(nkSoldierInfo, iCount); } bool flag = false; for (int i = 0; i < 6; i++) { if (nkSoldierInfo.GetEquipItemInfo() != null) { ITEM item = nkSoldierInfo.GetEquipItemInfo().m_kItem[i].GetItem(); if (item == null) { TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Item pos{1} == ITEM NULL ", new object[] { nkSoldierInfo.GetCharKind(), i }); } else if (item.m_nItemUnique != 0) { flag = true; } } } if (flag) { newListItem.SetListItemData(5, false); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("627"); newListItem.SetListItemData(8, true); newListItem.SetListItemData(9, true); newListItem.SetListItemData(9, text, nkSoldierInfo, new EZValueChangedDelegate(this.OnClickReleaseEquip), null); } else if (nkSoldierInfo.GetFriendPersonID() != 0L) { newListItem.SetListItemData(5, false); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("74"); newListItem.SetListItemData(8, true); newListItem.SetListItemData(9, true); newListItem.SetListItemData(9, text, nkSoldierInfo, new EZValueChangedDelegate(this.OnClickUnsetSolHelp), null); } newListItem.Data = nkSoldierInfo.GetSolID(); this.m_NewListBox_Reincarnate.RemoveAdd(iCount, newListItem); this.m_NewListBox_Reincarnate.RepositionItems(); this.SetButtonLegendReincarnate(); bool flag2 = this.SetButtonLegendTime(); if (!flag2) { this.m_btn_Legend.SetEnabled(flag2); } this.GetTimeToString(); }