示例#1
0
        public void InitViewCostumeGuide(CostumeGuide_Dlg owner, COSTUMEGUIDE_SLOT[] slotList, List <SolSlotData> seasonSlotDataList, byte page)
        {
            this.ClearCostumeSlots(ref slotList);
            if (seasonSlotDataList == null || slotList == null)
            {
                return;
            }
            int num   = (int)((page - 1) * 27);
            int count = seasonSlotDataList.Count;

            owner._maxPage = (byte)(count / 27);
            if (count % 27 > 0)
            {
                owner._maxPage += 1;
            }
            for (int i = 0; i < 27; i++)
            {
                if (seasonSlotDataList.Count <= num)
                {
                    break;
                }
                NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(seasonSlotDataList[num].i32KindInfo);

                if (charKindInfo != null)
                {
                    slotList[i].IT_Slot.SetSolImageTexure(eCharImageType.SMALL, charKindInfo.GetCharKind(), (int)(seasonSlotDataList[num].bSolGrade - 1));
                }
                else
                {
                    slotList[i].IT_Slot.SetTexture("Win_T_ItemEmpty");
                }
                slotList[i].DT_BlackSlot.Hide(true);
                bool flag = NrTSingleton <NrCharCostumeTableManager> .Instance.IsNewCostumeExistByCode(charKindInfo.GetCode());

                slotList[i].Box_New.Hide(!flag);
                slotList[i].DT_Event.Hide(true);
                UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(charKindInfo.GetCharKind(), (int)seasonSlotDataList[num].bSolGrade);

                if (legendFrame != null)
                {
                    slotList[i].DT_Slot.SetTexture(legendFrame);
                }
                else
                {
                    slotList[i].DT_Slot.SetTexture("Win_T_ItemEmpty");
                }
                if (charKindInfo != null)
                {
                    slotList[i].BT_Slot.Data = charKindInfo.GetCharKind();
                }
                num++;
            }
            owner.ChangePageText();
        }
示例#2
0
    public void SetTimeShopItem(TIMESHOP_DATA _pTimeShopItem, int _i32CharKind)
    {
        if (_pTimeShopItem == null)
        {
            return;
        }
        this.m_DrawTexture_Won.SetTexture(NrTSingleton <NrTableTimeShopManager> .Instance.Get_MoneyTypeTextureName((eTIMESHOP_MONEYTYPE)_pTimeShopItem.m_nMoneyType));
        this.m_Label_Price.Text        = _pTimeShopItem.m_lPrice.ToString();
        this.m_Button_Price.Data       = _pTimeShopItem;
        this.m_Label_Price.Visible     = true;
        this.m_Button_Price.Visible    = true;
        this.m_DrawTexture_Won.Visible = true;
        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IsBuy_TimeShopItemByIDX(_pTimeShopItem.m_lIdx))
        {
            this.m_Button_Price.SetEnabled(false);
            this.m_Label_Price.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3341");

            this.m_DrawTexture_Won.Visible = false;
        }
        byte           b            = 6;
        int            level        = 50;
        string         strSolKind   = string.Empty;
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(_i32CharKind);

        if (charKindInfo != null)
        {
            strSolKind = charKindInfo.GetCode();
        }
        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(_pTimeShopItem.m_nItemUnique);

        if (itemInfo != null)
        {
            b = (byte)(itemInfo.m_nParam[1] + 1);
            if (b <= 1)
            {
                b = NrTSingleton <ItemManager> .Instance.GetTopGrade_GroupSolTicket((long)_pTimeShopItem.m_nItemUnique, strSolKind);
            }
            if (b > 15)
            {
                b = 15;
            }
        }
        else
        {
            List <SOL_GUIDE> value = NrTSingleton <NrTableSolGuideManager> .Instance.GetValue();

            foreach (SOL_GUIDE current in value)
            {
                if (current.m_i32CharKind == _i32CharKind)
                {
                    b = (byte)current.m_iSolGrade;
                }
            }
        }
        if (charKindInfo != null)
        {
            level = (int)charKindInfo.GetGradeMaxLevel((short)(b - 1));
        }
        this.SetSolKind(_i32CharKind, b, level);
        this.m_eParentUI = G_ID.TIMESHOP_DLG;
    }
示例#3
0
    private CharCostumeInfo_Data GetBaseCostumeData(int costumeKind)
    {
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(costumeKind);

        if (charKindInfo == null)
        {
            return(null);
        }
        CharCostumeInfo_Data normalCostumeData = NrTSingleton <NrCharCostumeTableManager> .Instance.GetNormalCostumeData(charKindInfo.GetCode());

        if (this._costumeListSetter._SelectedCostumeData == null)
        {
            return(normalCostumeData);
        }
        return(this._costumeListSetter._SelectedCostumeData);
    }
        private void SetBaseSelectedCostume()
        {
            NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this._settedCostumeKind);

            if (charKindInfo == null)
            {
                return;
            }
            this._selectedCostumeData = NrTSingleton <NrCharCostumeTableManager> .Instance.GetNormalCostumeData(charKindInfo.GetCode());

            if (this._owner._myCharListSetter._SelectedSolInfo == null)
            {
                return;
            }
            int num = (int)this._owner._myCharListSetter._SelectedSolInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);

            if (num <= 0)
            {
                return;
            }
            this._selectedCostumeData = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeData(num);
        }
        private List <CharCostumeInfo_Data> GetCostumeDataByKind(int costumeKind)
        {
            NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(costumeKind);

            if (charKindInfo == null)
            {
                return(null);
            }
            return(NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeDataList(charKindInfo.GetCode()));
        }
示例#6
0
    public void SetPlace(string strPlace, ref int i32CastleUnique, ref int i32SectionUnique, ref float fX, ref float fZ, ref int i32SrcCharKind)
    {
        if (strPlace.Equals("off"))
        {
            i32CastleUnique = -1;
            return;
        }
        char[] array    = TKString.StringChar(strPlace);
        byte   b        = 0;
        byte   b2       = 0;
        int    charkind = 0;
        string text     = string.Empty;
        bool   flag     = false;

        while ((int)b < strPlace.Length)
        {
            if (array[(int)b] == ' ')
            {
                b += 1;
            }
            else if (array[(int)b] == '_')
            {
                if (b2 == 0)
                {
                    if (text == "pos")
                    {
                        flag = true;
                    }
                    else
                    {
                        int.TryParse(text, out i32CastleUnique);
                    }
                    text = string.Empty;
                    b2  += 1;
                }
                else if (b2 == 1)
                {
                    if (flag)
                    {
                        int.TryParse(text, out i32CastleUnique);
                    }
                    else
                    {
                        int.TryParse(text, out i32SectionUnique);
                    }
                    text = string.Empty;
                    b2  += 1;
                }
                else if (b2 == 2)
                {
                    if (flag)
                    {
                        float.TryParse(text, out fX);
                    }
                    text = string.Empty;
                    b2  += 1;
                }
                b += 1;
            }
            else if (array[(int)b] == '/')
            {
                text += '_';
                b    += 1;
            }
            else
            {
                text += array[(int)b];
                b    += 1;
            }
        }
        if (flag)
        {
            float.TryParse(text, out fZ);
        }
        else
        {
            int.TryParse(text, out i32SrcCharKind);
            int.TryParse(text, out charkind);
            NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(charkind);

            if (charKindInfo != null)
            {
                QUEST_AUTO_PATH_POS_CHARCODE autoPath = NrTSingleton <NkQuestManager> .Instance.GetAutoPath((int)((short)i32CastleUnique), 0, charKindInfo.GetCode());

                if (autoPath != null)
                {
                    fX = autoPath.fDesX;
                    fZ = autoPath.fDesY;
                }
            }
        }
    }
示例#7
0
    public void AddNpc(NrCharKindInfo charkindinfo)
    {
        if (charkindinfo.GetCHARKIND_NPCINFO() == null)
        {
            return;
        }
        int charKind = charkindinfo.GetCharKind();

        if (charKind <= 0)
        {
            return;
        }
        if (this.m_dicNPC.ContainsKey(charKind))
        {
            return;
        }
        if (charkindinfo.IsATB(8L))
        {
            if (charkindinfo.IsATB(2097152L))
            {
                CNpcUI cNpcUI = new CBlackSmith();
                cNpcUI.m_i32CharKind = charKind;
                this.m_dicNPC.Add(cNpcUI.m_i32CharKind, cNpcUI);
            }
            else if (charkindinfo.IsATB(512L))
            {
                if (NrTSingleton <NkCharManager> .Instance.GetMyCharInfo() == null)
                {
                    return;
                }
                CNpcUI cNpcUI2 = new CBuyItem();
                cNpcUI2.m_i32CharKind = charKind;
                this.m_dicNPC.Add(cNpcUI2.m_i32CharKind, cNpcUI2);
            }
            else if (charkindinfo.IsATB(536870912L))
            {
                CNpcUI cNpcUI3 = new CIndunOpen();
                cNpcUI3.m_i32CharKind = charKind;
                ((CIndunOpen)cNpcUI3).SetData();
                this.m_dicNPC.Add(cNpcUI3.m_i32CharKind, cNpcUI3);
            }
            else if (charkindinfo.IsATB(4294967296L))
            {
                CNpcUI cNpcUI4 = new CGuildOpen();
                cNpcUI4.m_i32CharKind = charKind;
                ((CGuildOpen)cNpcUI4).SetData();
                this.m_dicNPC.Add(cNpcUI4.m_i32CharKind, cNpcUI4);
            }
            else if (charkindinfo.IsATB(274877906944L) || charkindinfo.IsATB(1099511627776L))
            {
                CNpcUI cNpcUI5 = new CCharChange();
                cNpcUI5.m_i32CharKind = charKind;
                ((CCharChange)cNpcUI5).SetData();
                this.m_dicNPC.Add(cNpcUI5.m_i32CharKind, cNpcUI5);
            }
            else if (charkindinfo.IsATB(549755813888L))
            {
                CNpcUI cNpcUI6 = new CEquipReduce();
                cNpcUI6.m_i32CharKind = charKind;
                ((CEquipReduce)cNpcUI6).SetData();
                this.m_dicNPC.Add(cNpcUI6.m_i32CharKind, cNpcUI6);
            }
            else if (charkindinfo.IsATB(2199023255552L))
            {
                CNpcUI cNpcUI7 = new CItemSkill();
                cNpcUI7.m_i32CharKind = charKind;
                ((CItemSkill)cNpcUI7).SetData();
                this.m_dicNPC.Add(cNpcUI7.m_i32CharKind, cNpcUI7);
            }
            else if (charkindinfo.IsATB(288230376151711744L))
            {
                CNpcUI cNpcUI8 = new CItemRepair();
                cNpcUI8.m_i32CharKind = charKind;
                ((CItemRepair)cNpcUI8).SetData();
                this.m_dicNPC.Add(cNpcUI8.m_i32CharKind, cNpcUI8);
            }
            else if (charkindinfo.IsATB(4503599627370496L))
            {
                CNpcUI cNpcUI9 = new CExchangeJewelry();
                cNpcUI9.m_i32CharKind = charKind;
                this.m_dicNPC.Add(cNpcUI9.m_i32CharKind, cNpcUI9);
            }
            else if (charkindinfo.IsATB(18014398509481984L))
            {
                CNpcUI cNpcUI10 = new CAgitNPC(charKind);
                cNpcUI10.m_i32CharKind = charKind;
                this.m_dicNPC.Add(cNpcUI10.m_i32CharKind, cNpcUI10);
            }
            else if (charkindinfo.IsATB(36028797018963968L))
            {
                CNpcUI cNpcUI11 = new CExchangeMythice();
                cNpcUI11.m_i32CharKind = charKind;
                this.m_dicNPC.Add(cNpcUI11.m_i32CharKind, cNpcUI11);
            }
            else if (charkindinfo.IsATB(1152921504606846976L))
            {
                CNpcUI cNpcUI12 = new CExchangeGuildWar();
                cNpcUI12.m_i32CharKind = charKind;
                this.m_dicNPC.Add(cNpcUI12.m_i32CharKind, cNpcUI12);
            }
            else if (charkindinfo.IsATB(33554432L))
            {
                CNpcUI cNpcUI13 = new CExchangeEventItem();
                cNpcUI13.m_i32CharKind = charKind;
                this.m_dicNPC.Add(cNpcUI13.m_i32CharKind, cNpcUI13);
            }
            else
            {
                string code = charkindinfo.GetCode();
                if (charkindinfo.GetCode().Equals("TERRITORY_Custodian"))
                {
                    CNpcUI cNpcUI14 = new CCustodian();
                    cNpcUI14.m_i32CharKind = charKind;
                    this.m_dicNPC.Add(cNpcUI14.m_i32CharKind, cNpcUI14);
                }
                else if (code.Equals("Battle_Custodian"))
                {
                    CNpcUI cNpcUI15 = new CBattleCustodian();
                    cNpcUI15.m_i32CharKind = charKind;
                    this.m_dicNPC.Add(cNpcUI15.m_i32CharKind, cNpcUI15);
                }
                else if (code.Equals("NaGwanJoong"))
                {
                    CNpcUI cNpcUI16 = new CQuestReset();
                    cNpcUI16.m_i32CharKind = charKind;
                    this.m_dicNPC.Add(cNpcUI16.m_i32CharKind, cNpcUI16);
                }
                else
                {
                    CNpcUI cNpcUI17 = new CNpcUI();
                    cNpcUI17.m_i32CharKind = charKind;
                    this.m_dicNPC.Add(cNpcUI17.m_i32CharKind, cNpcUI17);
                }
            }
        }
    }
示例#8
0
    private void ClickStart(IUIObject obj)
    {
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char == null)
        {
            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.IsMovable())
        {
            return;
        }
        NrTSingleton <NrAutoPath> .Instance.ResetData();

        Vector3 lhs  = Vector3.zero;
        Vector2 zero = Vector2.zero;

        if (@char.m_kCharMove == null)
        {
            return;
        }
        int num = 0;

        if (this.m_CurrentQuest != null)
        {
            num = this.m_CurrentQuest.GetQuestCommon().iCastleUnique;
            NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(this.m_CurrentQuest.GetQuestCommon().GiveQuestCharCode);

            if (charKindInfoFromCode != null)
            {
                NrClientNpcPosList clientNpcPosList = NrTSingleton <NkQuestManager> .Instance.GetClientNpcPosList(num);

                if (clientNpcPosList != null)
                {
                    for (int i = 0; i < clientNpcPosList.ClientNpcPosList.Count; i++)
                    {
                        NrClientNpcInfo nrClientNpcInfo = clientNpcPosList.ClientNpcPosList[i];
                        if (nrClientNpcInfo != null && NrTSingleton <NkQuestManager> .Instance.ClinetNpcCreateCheck(nrClientNpcInfo.kStartCon, nrClientNpcInfo.kEndCon) && charKindInfoFromCode.GetCode() == nrClientNpcInfo.strCharCode && num == nrClientNpcInfo.i32MapIndex)
                        {
                            NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                            if (char2 != null && char2.m_kCharMove != null)
                            {
                                lhs    = char2.m_kCharMove.FindFirstPath(num, (short)nrClientNpcInfo.fFixPosX, (short)nrClientNpcInfo.fFixPosY, false);
                                zero.x = nrClientNpcInfo.fFixPosX;
                                zero.y = nrClientNpcInfo.fFixPosY;
                            }
                        }
                    }
                }
                if (lhs == Vector3.zero)
                {
                    NrNpcPos npcPos = NrTSingleton <NrNpcPosManager> .Instance.GetNpcPos(charKindInfoFromCode.GetPosKey(), charKindInfoFromCode.GetCharKind(), num);

                    if (npcPos != null && @char.m_kCharMove != null)
                    {
                        lhs    = @char.m_kCharMove.FindFirstPath(npcPos.nMapIndex, (short)npcPos.kPos.x, (short)npcPos.kPos.z, false);
                        zero.x = npcPos.kPos.x;
                        zero.y = npcPos.kPos.z;
                    }
                }
            }
        }
        else
        {
            num    = this.m_CurrentAdventureInfo.mapIndex;
            lhs    = @char.m_kCharMove.FindFirstPath(num, (short)this.m_CurrentAdventureInfo.destX, (short)this.m_CurrentAdventureInfo.destY, false);
            zero.x = (float)this.m_CurrentAdventureInfo.destX;
            zero.y = (float)this.m_CurrentAdventureInfo.destY;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.ShowDownLoadUI(0, num))
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        int mapIndex = myCharInfo.m_kCharMapInfo.MapIndex;

        if (num == mapIndex)
        {
            if (lhs != Vector3.zero)
            {
                GS_CHAR_FINDPATH_REQ gS_CHAR_FINDPATH_REQ = new GS_CHAR_FINDPATH_REQ();
                gS_CHAR_FINDPATH_REQ.DestPos.x = lhs.x;
                gS_CHAR_FINDPATH_REQ.DestPos.y = lhs.y;
                gS_CHAR_FINDPATH_REQ.DestPos.z = lhs.z;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_FINDPATH_REQ, gS_CHAR_FINDPATH_REQ);
                TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "QUEST", "AUTOMOVE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
            }
            if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.ADVENTURECOLLECT_DLG))
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ADVENTURECOLLECT_DLG);
            }
            base.CloseForm(null);
            NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ADVENTURE_DLG).CloseForm(null);
        }
        else
        {
            string mapName = NrTSingleton <MapManager> .Instance.GetMapName(num);

            if (mapName != string.Empty)
            {
                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI == null)
                {
                    return;
                }
                ICollection gateInfo_Col = NrTSingleton <NrBaseTableManager> .Instance.GetGateInfo_Col();

                if (gateInfo_Col == null)
                {
                    return;
                }
                int num2 = 0;
                foreach (GATE_INFO gATE_INFO in gateInfo_Col)
                {
                    if (num == gATE_INFO.DST_MAP_IDX)
                    {
                        num2 = gATE_INFO.GATE_IDX;
                    }
                }
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("4"),
                    "mapname",
                    mapName
                });

                msgBoxUI.SetMsg(new YesDelegate(this.MapWarp), num2, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("3"), empty, eMsgType.MB_OK_CANCEL, 2);
                msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("109"));
                msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11"));
                this.m_nAutoMoveMapIndex  = num;
                this.m_nAutoMoveGateIndex = num2;
                NrTSingleton <NkQuestManager> .Instance.AutoMoveMapIndex = this.m_nAutoMoveMapIndex;
                NrTSingleton <NkQuestManager> .Instance.AutoMove         = true;
                NrTSingleton <NkQuestManager> .Instance.AutoMoveDestPos  = zero;
            }
        }
    }