public void SetLegend()
    {
        this.e_MythType = MYTH_TYPE.MYTHTYPE_LEGEND;
        base.SetShowLayer(0, true);
        base.SetShowLayer(1, true);
        base.SetShowLayer(2, false);
        base.SetShowLayer(3, false);
        this.m_ToolBar.SetSelectTabIndex(0);
        this.m_Label_Gold.SetText(ANNUALIZED.Convert(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money));
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            int  value = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_ESSENCE_ITEMUNIQUE);
            ITEM item  = NkUserInventory.GetInstance().GetItem(value);
            if (item != null)
            {
                this.m_Label_Essence.SetText(ANNUALIZED.Convert(item.m_nItemNum));
            }
            else
            {
                this.m_Label_Essence.SetText("0");
            }
        }
        this.InitMythDataSet();
        this.SetDropDownList_Season();
        this.SetLegendDataSort(0);
        this.SetLegendSolShow(0);
    }
예제 #2
0
    public void SetItemrepairResult(GS_ITEMSKILL_REINFORCE_ACK pAck)
    {
        ITEM itemFromItemID = NkUserInventory.GetInstance().GetItemFromItemID(pAck.i64BaseItemID);

        if (itemFromItemID == null)
        {
            return;
        }
        this.m_lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2969"));
        string empty = string.Empty;

        this.m_itItem.SetItemTexture(itemFromItemID.m_nItemUnique);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1803"),
            "itemname",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(itemFromItemID.m_nItemUnique)
        });

        this.m_lbItem.SetText(empty);
        int num = itemFromItemID.m_nOption[7];

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2968"),
            "count",
            num
        });

        this.m_lbInfo.SetText(empty);
        this.m_bSuccess = true;
        this.LoadSolComposeSuccessBundle();
    }
예제 #3
0
    private void SetItemBattleSpeed()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo != null)
        {
            long     charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_BATTLESPEED_COUNT);
            int      value       = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_FASTBATTLE_MAXNUM);
            int      num         = NkUserInventory.GetInstance().Get_First_ItemCnt(this.m_MainBoxItem.m_nItemUnique);
            ITEMINFO itemInfo    = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_MainBoxItem.m_nItemUnique);

            if (itemInfo == null)
            {
                return;
            }
            long num2 = (long)value - charSubData;
            this.m_MaxCount = (float)(num2 / (long)itemInfo.m_nParam[0]);
            if (this.m_MaxCount > (float)num)
            {
                this.m_MaxCount = (float)num;
            }
            this.m_nItemOpenCount = (int)this.m_MaxCount;
            this.SetOpenItemNum(this.m_nItemOpenCount);
        }
    }
예제 #4
0
    public void OnAgree2(IUIObject obj)
    {
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        if (msgBoxUI == null)
        {
            return;
        }
        string empty = string.Empty;
        int    num   = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PROTECT_TIME_BUY2) / 60;
        int    value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PROTECT_TIME_PRICE2);

        if (value > NkUserInventory.GetInstance().Get_First_ItemCnt(70000))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("273"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        byte b = 1;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("151"),
            "timestring",
            num.ToString(),
            "num",
            value.ToString()
        });

        string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("150");

        msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKAgree), b, textFromMessageBox, empty, eMsgType.MB_OK_CANCEL, 2);
    }
예제 #5
0
    public void ShowItemList()
    {
        this.m_nlbItemList.Clear();
        int num = 5;

        for (int i = 1; i < num; i++)
        {
            for (int j = 0; j < ItemDefine.INVENTORY_ITEMSLOT_MAX; j++)
            {
                ITEM item = NkUserInventory.GetInstance().GetItem(i, j);
                if (item != null)
                {
                    if (0 < item.m_nOption[7])
                    {
                        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique);

                        if (itemInfo != null)
                        {
                            if (!itemInfo.IsItemATB(131072L) && !itemInfo.IsItemATB(524288L) && !itemInfo.IsItemATB(2097152L))
                            {
                                this.SetAddItemInfo(item, itemInfo);
                            }
                        }
                    }
                }
            }
        }
        this.m_nlbItemList.RepositionItems();
    }
예제 #6
0
 public void Update_List()
 {
     this.m_nTicketNum = NkUserInventory.GetInstance().Get_First_ItemCnt(PointManager.NECTAR_TICKET);
     this.Set_UserItemNum();
     this.InitSelectItem();
     this.Show_ExchangeList();
 }
예제 #7
0
    public override string GetConditionText(long i64ParamVal)
    {
        if (NrTSingleton <NkQuestManager> .Instance == null)
        {
            return(string.Empty);
        }
        NkUserInventory instance = NkUserInventory.GetInstance();

        if (instance == null)
        {
            return(string.Empty);
        }
        long   num = (long)instance.GetItemCnt((int)base.GetParam());
        string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique((int)base.GetParam());

        string textFromQuest_Code = NrTSingleton <NrTextMgr> .Instance.GetTextFromQuest_Code(this.m_szTextKey);

        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromQuest_Code,
            "targetname",
            itemNameByItemUnique,
            "count1",
            num.ToString(),
            "count2",
            base.GetParamVal().ToString()
        });

        return(empty);
    }
예제 #8
0
    public bool IsAwakeningReset()
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            Debug.LogError("m_SelectSol is null");
            return(false);
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION.n16SubData_0;
        AWAKENING_TRY_INFO awakeningTryInfo = this.GetAwakeningTryInfo((int)n16SubData_, soldierInfo.GetSeason());

        if (awakeningTryInfo == null)
        {
            return(false);
        }
        int num = NkUserInventory.GetInstance().Get_First_ItemCnt(awakeningTryInfo.i32ResetItemUnique);

        if (awakeningTryInfo.i32ResetItemNum > num)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("273"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        return(true);
    }
예제 #9
0
    public void UpdateData(int nItemPos, int nItemType, long nItemID)
    {
        bool flag = false;

        for (int i = 0; i < this.m_NewListBox.Count; i++)
        {
            if (this.m_NewListBox.GetItem(i) != null)
            {
                ITEM iTEM = this.m_NewListBox.GetItem(i).Data as ITEM;
                if (iTEM.m_nItemPos == nItemPos && iTEM.m_nPosType == nItemType)
                {
                    ITEM        item  = NkUserInventory.GetInstance().GetItem(nItemType, nItemPos);
                    NewListItem item2 = new NewListItem(this.m_NewListBox.ColumnNum, true, string.Empty);
                    this.SetItemColum(item, i, ref item2);
                    this.m_NewListBox.UpdateAdd(i, item2);
                    flag = true;
                }
            }
        }
        this.m_NewListBox.RepositionItems();
        if (!flag)
        {
            this.SetInvItemData();
        }
    }
예제 #10
0
    public bool isMaterialCheck()
    {
        bool result = true;

        if (this.m_eReforgeType == ReforgeMainDlg.eREFOGE_TYPE.MONEY)
        {
            if ((long)this.m_Packet.nReforgeGold > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
            {
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("550");

                Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                LackGold_dlg lackGold_dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.GOLDLACK_DLG) as LackGold_dlg;

                if (lackGold_dlg != null)
                {
                    lackGold_dlg.SetData((long)this.m_Packet.nReforgeGold - NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money);
                }
                return(false);
            }
        }
        else if (NkUserInventory.GetInstance().GetItemCnt(this.m_ReforgeInfo.nReforgeItemUnique) < this.m_ReforgeInfo.nReforgeItemNum)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("213"),
                "targetname",
                NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_ReforgeInfo.nReforgeItemUnique)
            });

            Main_UI_SystemMessage.ADDMessage(empty);
            return(false);
        }
        return(result);
    }
예제 #11
0
 public override void SetComponent()
 {
     this.m_nlbList = (base.GetControl("newlistbox_exchangeevolution") as NewListBox);
     this.m_nlbList.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickList));
     this.m_itSelectItem = (base.GetControl("ImageView_equip") as ItemTexture);
     this.m_itSelectItem.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSelectItem));
     this.m_tItem   = (base.GetControl("CheckBox_Item") as Toggle);
     this.m_btnSell = (base.GetControl("Button_confirm") as Button);
     this.m_btnSell.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSell));
     this.m_btnMinus = (base.GetControl("Button_CountDown") as Button);
     this.m_btnMinus.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickMinus));
     this.m_btnPlus = (base.GetControl("Button_CountUp") as Button);
     this.m_btnPlus.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickPlus));
     this.m_btnAll = (base.GetControl("Button_MaxCountUp") as Button);
     this.m_btnAll.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickAll));
     this.m_lbName               = (base.GetControl("Label_text1") as Label);
     this.m_lbLimitTicketNum     = (base.GetControl("Label_text2") as Label);
     this.m_lbName2              = (base.GetControl("Label_text03") as Label);
     this.m_lbLimitTicketNum2    = (base.GetControl("Label_text04") as Label);
     this.m_lbSelectItemName     = (base.GetControl("Label_text") as Label);
     this.m_tfSellNum            = (base.GetControl("TextField_Count") as TextField);
     this.m_tfSellNum.NumberMode = true;
     this.m_btnInputBox          = (base.GetControl("Button_NumPad") as Button);
     this.m_btnInputBox.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickInputBox));
     this.m_btnHelp = (base.GetControl("Help_Button") as Button);
     this.m_btnHelp.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickHelp));
     this.InitSelectItem();
     this.Show_ExchangeList();
     base.SetShowLayer(2, false);
     base.SetScreenCenter();
     this.m_nTicketNum = NkUserInventory.GetInstance().Get_First_ItemCnt(this.FIRST_ELEMENT);
     this.Set_UserItemNum();
 }
예제 #12
0
    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);
    }
예제 #13
0
    public void ExcuteTicket(int itemunique, int recruittype, int season, bool bForceRecruit)
    {
        int solCount = SolRecruitDlg.GetSolCount(recruittype);

        if (!bForceRecruit)
        {
            NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

            if (readySolList == null || readySolList.GetCount() + solCount - 1 >= 100)
            {
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("507");

                Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
                return;
            }
        }
        if (NkUserInventory.GetInstance().GetFirstItemByUnique(itemunique) == null)
        {
            string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("506");

            Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
            return;
        }
        NrTSingleton <NkClientLogic> .Instance.SetCanOpenTicket(false);

        this.SetRecruitButtonEnable(false);
        GS_SOLDIER_RECRUIT_REQ gS_SOLDIER_RECRUIT_REQ = default(GS_SOLDIER_RECRUIT_REQ);

        gS_SOLDIER_RECRUIT_REQ.ItemUnique  = itemunique;
        gS_SOLDIER_RECRUIT_REQ.RecruitType = recruittype;
        gS_SOLDIER_RECRUIT_REQ.SubData     = 0;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLDIER_RECRUIT_REQ, gS_SOLDIER_RECRUIT_REQ);
    }
 public void SetEvolution()
 {
     this.e_MythType = MYTH_TYPE.MYTHTYPE_EVOLUTION;
     base.SetShowLayer(0, true);
     base.SetShowLayer(1, false);
     base.SetShowLayer(2, true);
     base.SetShowLayer(3, false);
     this.m_ToolBar.SetSelectTabIndex(1);
     this.m_DropDownList_Season.SetVisible(false);
     this.m_DT_BaseSolimg.SetTexture(string.Empty);
     this.m_DT_ResultSolimg.SetTexture(string.Empty);
     this.m_DT_BaseSolRank.Visible   = false;
     this.m_DT_ResultSolRank.Visible = false;
     this.m_DT_MythSkillIcon1_2.SetTexture(string.Empty);
     this.m_DT_MythSkillIcon2_2.SetTexture(string.Empty);
     this.m_Label_MythEvolution_DragonHeart_Num2.SetText(string.Empty);
     this.m_Label_MythEvolution_Essence_Num2.SetText(string.Empty);
     this.m_Label_MythEvolution_Essence_Num.SetText(ANNUALIZED.Convert(NkUserInventory.GetInstance().Get_First_ItemCnt(50313)));
     this.m_Label_MythEvolution_DragonHeart_Num.SetText(ANNUALIZED.Convert(NkUserInventory.GetInstance().Get_First_ItemCnt(50316)));
     this.m_Label_MythEvolution_Descent_Num.SetText(ANNUALIZED.Convert(NkUserInventory.GetInstance().Get_First_ItemCnt(50317)));
     this.m_Label_BaseSeason.SetText(string.Empty);
     this.m_Label_ResultSeason.SetText(string.Empty);
     this.m_LB_BaseSolName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2031"));
     this.m_LB_MythSkillname1.SetText(string.Empty);
     this.m_LB_MythSkillLevel1.SetText(string.Empty);
     this.m_LB_MythSkillname2.SetText(string.Empty);
     this.m_LB_MythSkillLevel2.SetText(string.Empty);
     this.m_i64BaseSolID = 0L;
     this.SetEvolutionSkillImage(false);
 }
예제 #15
0
 public void ReloadMaterialList()
 {
     if (this.m_NeedItemList == null)
     {
         this.m_NeedItemList = NrTSingleton <ITEM_COMPOSE_Manager> .Instance.ComposeItem_MaterialList(this.m_BaseComposeData);
     }
     if (this.m_NeedItemList != null)
     {
         this.m_nlbNeedItem.Clear();
         this.bSendServerOK = true;
         for (int i = 0; i < this.m_NeedItemList.Length; i++)
         {
             int nItemUnique = this.m_NeedItemList[i].m_nItemUnique;
             int itemCnt     = NkUserInventory.GetInstance().GetItemCnt(nItemUnique);
             if (nItemUnique > 0)
             {
                 NewListItem newListItem = new NewListItem(this.m_nlbNeedItem.ColumnNum, true, string.Empty);
                 newListItem.SetListItemData(0, true);
                 newListItem.SetListItemData(1, this.m_NeedItemList[i].m_t2ItemIcon, null, null, null);
                 newListItem.SetListItemData(2, this.m_NeedItemList[i].m_strItemName, null, null, null);
                 string text = this.ReCountMaterialItem(this.m_NeedItemList[i].m_shItemNumber, itemCnt);
                 newListItem.SetListItemData(3, text, null, null, null);
                 this.m_nlbNeedItem.Add(newListItem);
             }
         }
         this.m_nlbNeedItem.RepositionItems();
     }
 }
    public void ClickOK(IUIObject obj)
    {
        if (NrTSingleton <NkCharManager> .Instance.GetChar(1).GetPersonID() == this.m_lPersonID)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("300"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (0L < this.m_lCostMoney)
        {
            if (this.m_lTenderCost < this.m_lCostMoney)
            {
                return;
            }
            if (this.m_lTenderCost > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
        }
        if (0 < this.m_iCostHearts)
        {
            if (this.m_lTenderCost < (long)this.m_iCostHearts)
            {
                return;
            }
            if (this.m_lTenderCost > (long)NkUserInventory.GetInstance().Get_First_ItemCnt(70000))
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("273"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
        }
        if (0L >= this.m_lAuctionID)
        {
            return;
        }
        GS_AUCTION_TENDER_REQ gS_AUCTION_TENDER_REQ = new GS_AUCTION_TENDER_REQ();

        gS_AUCTION_TENDER_REQ.i64AuctionID = this.m_lAuctionID;
        if (this.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD)
        {
            gS_AUCTION_TENDER_REQ.i64CostMoney = this.m_lTenderCost;
        }
        else if (this.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS)
        {
            gS_AUCTION_TENDER_REQ.i32CostHearts = (int)this.m_lTenderCost;
        }
        gS_AUCTION_TENDER_REQ.i64CurCostMoney        = this.m_lCurCostMoney;
        gS_AUCTION_TENDER_REQ.i64CurDirectCostMoney  = this.m_lCurDirectCostMoney;
        gS_AUCTION_TENDER_REQ.i32CurCostHearts       = this.m_iCurCostHearts;
        gS_AUCTION_TENDER_REQ.i32CurDirectCostHearts = this.m_iCurDirectCostHearts;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_AUCTION_TENDER_REQ, gS_AUCTION_TENDER_REQ);
        AuctionMainDlg auctionMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.AUCTION_MAIN_DLG) as AuctionMainDlg;

        if (auctionMainDlg != null)
        {
            auctionMainDlg.SetEnableControl(false);
        }
        NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.AUCTION_TENDERCHECK_DLG);
    }
예제 #17
0
    public bool CanBuyItemByMoneyType(eTIMESHOP_MONEYTYPE _eMoneyType, long _i64Price)
    {
        string text  = string.Empty;
        string text2 = string.Empty;
        bool   flag  = true;

        if (_eMoneyType == eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_HEARTS)
        {
            if ((long)NkUserInventory.GetInstance().Get_First_ItemCnt(70000) < _i64Price)
            {
                text2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70000);

                flag = false;
            }
        }
        else if (_eMoneyType == eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_GOLD)
        {
            if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money < _i64Price)
            {
                text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("676");

                flag = false;
            }
        }
        else if (_eMoneyType == eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_SOULJAM)
        {
            if ((long)NkUserInventory.GetInstance().Get_First_ItemCnt(70002) < _i64Price)
            {
                text2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70002);

                flag = false;
            }
        }
        else if (_eMoneyType == eTIMESHOP_MONEYTYPE.eTIMESHOP_MONEYTYPE_MYTHELXIR && (long)NkUserInventory.GetInstance().Get_First_ItemCnt(50311) < _i64Price)
        {
            text2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(50311);

            flag = false;
        }
        if (!flag)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("443");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                text,
                "targetitem4",
                text2
            });

            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI != null)
            {
                msgBoxUI.SetMsg(new YesDelegate(this.Open_ItemMall), _eMoneyType, string.Empty, text, eMsgType.MB_OK_CANCEL, 2);
            }
        }
        return(flag);
    }
예제 #18
0
 public void Update_List()
 {
     this.m_nTicketNum = NkUserInventory.GetInstance().Get_First_ItemCnt(this.FIRST_ELEMENT);
     this.InitSelectItem();
     this.Set_UserItemNum();
     this.Show_ExchangeList();
     this.ClickList(null);
 }
예제 #19
0
    public void ClickUseFullElixir(IUIObject obj)
    {
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsWillSpend())
        {
            return;
        }
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo != null)
        {
            long num = kMyCharInfo.m_nMaxActivityPoint - kMyCharInfo.m_nActivityPoint;
            if (num <= 0L)
            {
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("784");

                Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            if (0 >= NkUserInventory.GetInstance().Get_First_ItemCnt(70005))
            {
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("168"),
                    "targetname",
                    NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70005)
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            ITEM item = NkUserInventory.GetInstance().GetItem(70005);
            if (item != null)
            {
                NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

                NkSoldierInfo          userSoldierInfo        = nrCharUser.GetUserSoldierInfo();
                long                   solID                  = userSoldierInfo.GetSolID();
                GS_ITEM_SUPPLY_USE_REQ gS_ITEM_SUPPLY_USE_REQ = new GS_ITEM_SUPPLY_USE_REQ();
                gS_ITEM_SUPPLY_USE_REQ.m_nItemUnique = item.m_nItemUnique;
                gS_ITEM_SUPPLY_USE_REQ.m_nDestSolID  = solID;
                if ((long)item.m_nItemNum < num)
                {
                    gS_ITEM_SUPPLY_USE_REQ.m_shItemNum = item.m_nItemNum;
                }
                else
                {
                    gS_ITEM_SUPPLY_USE_REQ.m_shItemNum = (int)num;
                }
                gS_ITEM_SUPPLY_USE_REQ.m_byPosType = item.m_nPosType;
                gS_ITEM_SUPPLY_USE_REQ.m_shPosItem = item.m_nItemPos;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEM_SUPPLY_USE_REQ, gS_ITEM_SUPPLY_USE_REQ);
            }
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WILLCHARGE_DLG);
        }
    }
예제 #20
0
    public void ClickStatCalc(IUIObject obj)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null || this.m_SolID == 0L)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("698"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int           num           = NkUserInventory.GetInstance().Get_First_ItemCnt(this.m_iAwakeningItemUnique);
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION.n16SubData_0;

        if (!this.IsAwakeningStat((int)(n16SubData_ + 1)))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("662"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int needAwakeningItemNum = this.GetNeedAwakeningItemNum((int)(n16SubData_ + 1), soldierInfo.GetSeason());

        if (num < needAwakeningItemNum)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("683"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        GS_SOLAWAKENING_STAT_REQ gS_SOLAWAKENING_STAT_REQ = new GS_SOLAWAKENING_STAT_REQ();

        gS_SOLAWAKENING_STAT_REQ.i64SolID = soldierInfo.GetSolID();
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLAWAKENING_STAT_REQ, gS_SOLAWAKENING_STAT_REQ);
        this.SetCoolTime();
        if (null != this.m_gbWakeup_Start)
        {
            this.m_gbWakeup_Start.SetActive(true);
        }
        if (null != this.m_gbWakeup_Apply)
        {
            this.m_gbWakeup_Apply.SetActive(false);
        }
        if (null != this.m_gbWakeup_Change_1)
        {
            this.m_gbWakeup_Change_1.SetActive(false);
        }
        if (null != this.m_gbWakeup_Change_2)
        {
            this.m_gbWakeup_Change_2.SetActive(false);
        }
        if (null != this.m_gbWakeup_Change_3)
        {
            this.m_gbWakeup_Change_3.SetActive(false);
        }
        this.m_bEffectShow            = true;
        this.m_lbStatRingSlot.Visible = false;
    }
예제 #21
0
 public int HaveEquipItem(ref ITEM srcItem, NkSoldierInfo solInfo)
 {
     for (int i = 0; i < 6; i++)
     {
         if (this.m_kItem[i].GetItemUnique() == 0 && NkUserInventory.GetInstance().IsHaveEquipItem((eEQUIP_ITEM)i, ref srcItem, solInfo))
         {
             return(i);
         }
     }
     return(-1);
 }
예제 #22
0
    public override bool CheckCondition(long i64Param, ref long i64ParamVal)
    {
        NkUserInventory instance = NkUserInventory.GetInstance();

        if (instance == null)
        {
            return(false);
        }
        int itemCnt = instance.GetItemCnt((int)base.GetParam());

        i64ParamVal = (long)itemCnt;
        return((long)itemCnt >= base.GetParamVal());
    }
예제 #23
0
 public override bool CheckGameGuide()
 {
     if (Time.realtimeSinceStartup - this.m_nCheckTime > this.m_nDelayTime)
     {
         this.m_nCheckTime = Time.realtimeSinceStartup;
         for (int i = 1; i <= 4; i++)
         {
             if (25 <= NkUserInventory.GetInstance().Get_Tab_List_Count(i))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
예제 #24
0
 public override void Update()
 {
     this.ShowTextAni();
     if (0f < this.m_fCoolTime && this.m_fCoolTime <= Time.time)
     {
         this.m_fCoolTime = 0f;
         this.SetControlEnable(true);
         this.ShowTextChangeEffect();
     }
     if (this.m_iAwakeningItemNum != NkUserInventory.GetInstance().Get_First_ItemCnt(this.m_iAwakeningItemUnique))
     {
         this.m_iAwakeningItemNum = NkUserInventory.GetInstance().Get_First_ItemCnt(this.m_iAwakeningItemUnique);
         this.m_lbMyAwakeningItemNum.SetText(ANNUALIZED.Convert(this.m_iAwakeningItemNum));
     }
 }
    public bool IsDirectPurchase()
    {
        short auctionUseLevel = NrTSingleton <ContentsLimitManager> .Instance.GetAuctionUseLevel();

        if (0 >= auctionUseLevel)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("270"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        if (auctionUseLevel > (short)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel())
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("628"),
                "count",
                auctionUseLevel
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        if (0L >= this.m_lAuctionID)
        {
            return(false);
        }
        if (this.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD)
        {
            if (this.m_lDirectCostMoney > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
        }
        else
        {
            if (this.m_ePayType != AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS)
            {
                return(false);
            }
            if (this.m_iDirectCostHearts > NkUserInventory.GetInstance().Get_First_ItemCnt(70000))
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("273"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return(false);
            }
        }
        return(true);
    }
예제 #26
0
    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());
    }
예제 #27
0
    public override string GetConditionText(long i64ParamVal)
    {
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_i32ResultNpcID);

        string empty = string.Empty;

        if (base.GetParam() > 0L)
        {
            NkUserInventory instance = NkUserInventory.GetInstance();
            if (instance == null)
            {
                return(string.Empty);
            }
            long   num = (long)instance.GetItemCnt((int)base.GetParam());
            string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique((int)base.GetParam());

            string textFromQuest_Code = NrTSingleton <NrTextMgr> .Instance.GetTextFromQuest_Code(this.m_szTextKey);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromQuest_Code,
                "targetname1",
                itemNameByItemUnique,
                "targetname2",
                charKindInfo.GetName(),
                "count1",
                num,
                "count2",
                base.GetParamVal()
            });
        }
        else if (base.GetParam() == 0L)
        {
            string textFromQuest_Code2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromQuest_Code(this.m_szTextKey);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromQuest_Code2,
                "targetname",
                charKindInfo.GetName(),
                "count1",
                i64ParamVal,
                "count2",
                base.GetParamVal()
            });
        }
        return(empty);
    }
예제 #28
0
    private void OnClickShowTicket(IUIObject a_oObject)
    {
        if (this.m_eReforgeType == ReforgeMainDlg.eREFOGE_TYPE.MONEY)
        {
            this.m_eReforgeType = ReforgeMainDlg.eREFOGE_TYPE.ITEM;
            base.SetShowLayer(3, this.m_eReforgeType == ReforgeMainDlg.eREFOGE_TYPE.ITEM);
            base.SetShowLayer(2, this.m_eReforgeType == ReforgeMainDlg.eREFOGE_TYPE.MONEY);
            this.m_ivReforgeItemTiket.Clear();
            ImageSlot imageSlot = new ImageSlot();
            imageSlot.c_bEnable             = true;
            imageSlot.Index                 = 0;
            imageSlot.itemunique            = this.m_ReforgeInfo.nReforgeItemUnique;
            imageSlot._solID                = 0L;
            imageSlot.WindowID              = base.WindowID;
            imageSlot.SlotInfo._visibleRank = true;
            this.m_ivReforgeItemTiket.SetImageSlot(0, imageSlot, null, null, null, null);
            this.m_ivReforgeItemTiket.RepositionItems();
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("571"),
                "Count",
                ANNUALIZED.Convert(this.m_ReforgeInfo.nReforgeItemNum)
            });

            this.m_lbRequestTicketCount.SetText(empty);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("571"),
                "Count",
                ANNUALIZED.Convert(NkUserInventory.GetInstance().GetItemCnt(this.m_ReforgeInfo.nReforgeItemUnique))
            });

            this.m_lbHaveTicketCount.SetText(empty);
            this.m_lbTicketName.Text = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_ReforgeInfo.nReforgeItemUnique);

            this.m_btnReforgeTicket.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1975");
        }
        else
        {
            this.m_eReforgeType = ReforgeMainDlg.eREFOGE_TYPE.MONEY;
            this.TicketSlotClear();
            base.SetShowLayer(3, this.m_eReforgeType == ReforgeMainDlg.eREFOGE_TYPE.ITEM);
            base.SetShowLayer(2, this.m_eReforgeType == ReforgeMainDlg.eREFOGE_TYPE.MONEY);
            this.m_btnReforgeTicket.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1946");
        }
    }
예제 #29
0
    private void SetInvItemData()
    {
        bool flag = true;

        this.m_SolID = 0L;
        this.m_NewListBox.Clear();
        this.m_InvenItemList.Clear();
        for (int i = 1; i <= 4; i++)
        {
            for (int j = 0; j < ItemDefine.INVENTORY_ITEMSLOT_MAX; j++)
            {
                ITEM item = NkUserInventory.GetInstance().GetItem(i, j);
                if (item != null)
                {
                    if (item.GetRank() != eITEM_RANK_TYPE.ITEM_RANK_SS)
                    {
                        if (NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique) != null)
                        {
                            item = NkUserInventory.GetInstance().GetItem(i, j);
                            this.m_InvenItemList.Add(item);
                            flag = false;
                        }
                    }
                }
            }
        }
        if (this.m_InvenItemList.Count > 0)
        {
            this.m_InvenItemList.Sort(new Comparison <ITEM>(this.CompareItemLevel));
            for (int k = 0; k < this.m_InvenItemList.Count; k++)
            {
                NewListItem item2 = new NewListItem(this.m_NewListBox.ColumnNum, true, string.Empty);
                this.SetItemColum(this.m_InvenItemList[k], k, ref item2);
                this.m_NewListBox.Add(item2);
            }
        }
        this.m_NewListBox.RepositionItems();
        if (flag)
        {
            this.m_lbText.Visible = true;
        }
        else
        {
            this.m_lbText.Visible = false;
        }
    }
예제 #30
0
    public void SetTalkState(NPC_TALK_QUEST_STATE State)
    {
        this.m_State = State;
        this.listBox.Clear();
        for (int i = 0; i < 3; i++)
        {
            if (this.m_State.kQuest.GetQuestCommon().cQuestCondition[i].i32QuestCode == 7 || this.m_State.kQuest.GetQuestCommon().cQuestCondition[i].i32QuestCode == 8 || this.m_State.kQuest.GetQuestCommon().cQuestCondition[i].i32QuestCode == 48 || this.m_State.kQuest.GetQuestCommon().cQuestCondition[i].i32QuestCode == 107)
            {
                int num;
                if (this.m_State.kQuest.GetQuestCommon().cQuestCondition[i].i32QuestCode == 8)
                {
                    num = (int)this.m_State.kQuest.GetQuestCommon().cQuestCondition[1].i64Param;
                }
                else
                {
                    num = (int)this.m_State.kQuest.GetQuestCommon().cQuestCondition[i].i64Param;
                }
                if (0 < num)
                {
                    this.m_ItemUISet[i].m_Item = NkUserInventory.GetInstance().GetFirstItemByUniqueLowRank(num);
                    if (this.m_ItemUISet[i].m_Item != null)
                    {
                        ListItem listItem = new ListItem();
                        string   name     = NrTSingleton <ItemManager> .Instance.GetName(this.m_ItemUISet[i].m_Item);

                        listItem.SetColumnGUIContent(0, string.Empty, "Win_T_ItemEmpty");
                        listItem.SetColumnGUIContent(1, string.Empty, NrTSingleton <ItemManager> .Instance.GetItemTexture(num));
                        listItem.SetColumnGUIContent(2, name);
                        listItem.SetColumnGUIContent(3, this.m_State.kQuest.GetQuestCommon().cQuestCondition[i].i64ParamVal.ToString() + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442"));
                        if (Protocol_Item.Is_EquipItem(this.m_ItemUISet[i].m_Item.m_nItemUnique))
                        {
                            listItem.SetColumnGUIContent(4, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1522"), "Win_B_NewTileBtnOrange", i, new EZValueChangedDelegate(this.OnChange));
                        }
                        else
                        {
                            listItem.SetColumnGUIContent(4, string.Empty, "Com_I_Transparent");
                        }
                        listItem.Key = this.m_ItemUISet[i].m_Item;
                        this.listBox.Add(listItem);
                    }
                }
            }
        }
        this.listBox.RepositionItems();
    }