private void SetWearButton(ref NewListItem item, CharCostumeInfo_Data costumeData) { item.SetListItemData(17, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3286"), costumeData, new EZValueChangedDelegate(this.OnCostumeWearBtn), null); bool visibe = NrTSingleton <NrCharCostumeTableManager> .Instance.IsBuyCostume(costumeData.m_costumeUnique); if (costumeData.IsNormalCostume()) { visibe = true; } if (this.IsWearedCostume(this._owner._myCharListSetter._SelectedSolInfo, costumeData)) { visibe = false; } COSTUME_INFO costumeInfo = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeInfo(costumeData.m_costumeUnique); if (!costumeData.IsNormalCostume() && (costumeInfo == null || costumeInfo.i32CostumePossibleToUse <= 0)) { visibe = false; } if (this._selectedCostumeData == null) { visibe = false; } if (this._selectedCostumeData != null && this._selectedCostumeData.m_costumeUnique != costumeData.m_costumeUnique) { visibe = false; } if (this._owner._myCharListSetter._SelectedSolInfo == null) { visibe = false; } item.SetListItemData(17, visibe); }
private void SetCostumeStatInfo(ref CharCostumeInfo_Data costumeData, ref NkSoldierInfo soldierInfo) { if (costumeData.IsNormalCostume()) { return; } this.SetCostumeStatListTitle(ref costumeData); int num = 0; if (costumeData.m_ATKBonusRate != 0) { this.SetCostumeSoldierStat(num, costumeData.m_ATKBonusRate, soldierInfo, CostumeStatSetter.COSTUME_STAT.ATTACK); num++; } if (costumeData.m_DefBonusRate != 0) { this.SetCostumeSoldierStat(num, costumeData.m_DefBonusRate, soldierInfo, CostumeStatSetter.COSTUME_STAT.DEFENSE); num++; } if (costumeData.m_HPBonusRate != 0) { this.SetCostumeSoldierStat(num, costumeData.m_HPBonusRate, soldierInfo, CostumeStatSetter.COSTUME_STAT.HP); num++; } }
private void ShowCostumeChangeMessage(ref NkSoldierInfo soldierInfo) { if (soldierInfo == null) { return; } if (!(NrTSingleton <FormsManager> .Instance.GetForm(G_ID.COSTUMEROOM_DLG) is CostumeRoom_Dlg)) { return; } int costumeUnique = (int)soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME); CharCostumeInfo_Data costumeData = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeData(costumeUnique); if (costumeData == null || costumeData.IsNormalCostume()) { return; } string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("863"), "itemname", NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeName(costumeUnique) }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); }
private void SetCostumeCount(ref NewListItem item, CharCostumeInfo_Data costumeData) { bool visibe = true; if (costumeData.IsNormalCostume()) { visibe = false; } item.SetListItemData(18, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3294"), null, null, null); item.SetListItemData(18, visibe); string text = string.Empty; COSTUME_INFO costumeInfo = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeInfo(costumeData.m_costumeUnique); if (costumeInfo == null) { text = "(0/0)"; } else { text = string.Concat(new object[] { "(", costumeInfo.i32CostumePossibleToUse, "/", costumeInfo.i32CostumeCount, ")" }); } item.SetListItemData(16, text, null, null, null); item.SetListItemData(16, visibe); }
private void SetMoneyType(ref NewListItem item, CharCostumeInfo_Data costumeData) { bool visibe = !costumeData.IsNormalCostume(); item.SetListItemData(14, visibe); item.SetListItemData(20, visibe); }
private void SetBuyButton(ref NewListItem item, CharCostumeInfo_Data costumeData) { item.SetListItemData(13, -1, costumeData, new EZValueChangedDelegate(this.OnCostumeBuyBtn), null); if (costumeData.IsNormalCostume()) { item.SetListItemData(13, false); } }
private void SetPrice(ref NewListItem item, CharCostumeInfo_Data costumeData) { bool visibe = !costumeData.IsNormalCostume(); item.SetListItemData(19, visibe); item.SetListItemData(19, costumeData.m_Price1Num.ToString(), null, null, null); item.SetListItemData(21, costumeData.m_Price2Num.ToString(), null, null, null); item.SetListItemData(21, visibe); }
private bool IsWearedCostume(NkSoldierInfo solInfo, CharCostumeInfo_Data costumeData) { if (solInfo == null) { return(false); } int num = (int)solInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME); return((num == 0 && costumeData.IsNormalCostume()) || num == costumeData.m_costumeUnique); }
private void SetNormalCostumeStatInfo(ref CharCostumeInfo_Data costumeData, ref NkSoldierInfo soldierInfo) { if (!costumeData.IsNormalCostume()) { return; } this.SetNormalCostumeStatTitle(ref costumeData); this.SetNormalCostumeStat(0, soldierInfo, CostumeStatSetter.COSTUME_STAT.ATTACK); this.SetNormalCostumeStat(1, soldierInfo, CostumeStatSetter.COSTUME_STAT.DEFENSE); this.SetNormalCostumeStat(2, soldierInfo, CostumeStatSetter.COSTUME_STAT.HP); }
public void RequestCostumeWear(NkSoldierInfo solInfo, int costumeUnique) { if (solInfo == null) { return; } if (solInfo.GetSolPosType() == 2) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("864"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } CharCostumeInfo_Data costumeData = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeData(costumeUnique); if (costumeData == null) { return; } if (solInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME) == (long)costumeUnique) { return; } COSTUME_INFO costumeInfo = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeInfo(costumeUnique); if (!costumeData.IsNormalCostume() && (costumeInfo == null || costumeInfo.i32CostumePossibleToUse <= 0)) { return; } int num = costumeUnique; if (costumeData.IsNormalCostume()) { num = 0; } GS_SOLDIER_SUBDATA_REQ gS_SOLDIER_SUBDATA_REQ = new GS_SOLDIER_SUBDATA_REQ(); gS_SOLDIER_SUBDATA_REQ.kSolSubData.nSolID = solInfo.GetSolID(); gS_SOLDIER_SUBDATA_REQ.kSolSubData.nSubDataType = 14; gS_SOLDIER_SUBDATA_REQ.kSolSubData.nSubDataValue = (long)num; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLDIER_SUBDATA_REQ, gS_SOLDIER_SUBDATA_REQ); }
private void SetCostumeTitle(ref NewListItem item, CharCostumeInfo_Data costumeData) { if (costumeData == null) { return; } if (costumeData.IsNormalCostume()) { item.SetListItemData(15, false); return; } item.SetListItemData(15, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(costumeData.m_CostumeTextKey), null, null, null); item.SetListItemData(15, true); }
private void InitCostummeImmediatelyBuyButton(CharCostumeInfo_Data costumeData) { if (costumeData.IsNormalCostume()) { if (this._owner._variables._lbImmediate != null) { this._owner._variables._lbImmediate.SetControlState(UIButton.CONTROL_STATE.DISABLED); } this._owner._variables._btnImmediatelyBuy.SetControlState(UIButton.CONTROL_STATE.DISABLED); } else { if (this._owner._variables._lbImmediate != null) { this._owner._variables._lbImmediate.SetControlState(UIButton.CONTROL_STATE.ACTIVE); } this._owner._variables._btnImmediatelyBuy.SetControlState(UIButton.CONTROL_STATE.ACTIVE); } }
private int GetCostumeDamage(NkSoldierInfo solInfo, int costumeUnique) { if (solInfo == null) { return(0); } int result = (solInfo.GetMinDamage_NotAdjustCostume() + solInfo.GetMaxDamage_NotAdjustCostume()) / 2; CharCostumeInfo_Data costumeData = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeData(costumeUnique); if (costumeData == null) { return(result); } if (costumeData.IsNormalCostume()) { return(result); } double num = (double)((float)solInfo.GetMinDamage_NotAdjustCostume() + (float)(solInfo.GetMinDamage_NotAdjustCostume() * costumeData.m_ATKBonusRate) / 100f); double num2 = (double)((float)solInfo.GetMaxDamage_NotAdjustCostume() + (float)(solInfo.GetMaxDamage_NotAdjustCostume() * costumeData.m_ATKBonusRate) / 100f); return((int)((num + num2) / 2.0)); }