Ejemplo n.º 1
0
    public void SetItemInfo(int itemunique)
    {
        this.m_pkITEMINFO = NrTSingleton <ItemManager> .Instance.GetItemInfo(itemunique);

        if (this.m_pkITEMINFO != null)
        {
            this.m_pkITEMTYPE_INFO = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(itemunique);
        }
    }
Ejemplo n.º 2
0
    public void SetItemOption(ITEMTYPE_INFO ItemTypeInfo, int iSelectBattleSkillUnique)
    {
        this.m_dlItemOption.Clear();
        this.m_dlItemOption.AddItem(this.m_strText, 0);
        int index = 0;
        List <ITEMSKILL_INFO> list;

        if (ItemTypeInfo != null)
        {
            list = NrTSingleton <NrItemSkillInfoManager> .Instance.GetValueFromItemType((eITEM_TYPE)ItemTypeInfo.ITEMTYPE);
        }
        else
        {
            list = NrTSingleton <NrItemSkillInfoManager> .Instance.GetValueFromAll();
        }
        string text = string.Empty;

        for (int i = 0; i < list.Count; i++)
        {
            if (list[i].iAuctionSearch == 1)
            {
                BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(list[i].SkillUnique);

                if (battleSkillBase != null)
                {
                    if (ItemTypeInfo != null)
                    {
                        text = battleSkillBase.m_waSkillName;
                    }
                    else
                    {
                        int           eItemType    = (int)list[i].m_eItemType;
                        ITEMTYPE_INFO itemTypeInfo = NrTSingleton <NrBaseTableManager> .Instance.GetItemTypeInfo(eItemType.ToString());

                        if (itemTypeInfo == null)
                        {
                            goto IL_149;
                        }
                        text = string.Format("{0} ({1})", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(itemTypeInfo.TEXTKEY));
                    }
                    this.m_dlItemOption.AddItem(text, list[i].SkillUnique);
                    if (0 < iSelectBattleSkillUnique && iSelectBattleSkillUnique == list[i].SkillUnique)
                    {
                        index = i + 1;
                    }
                }
            }
            IL_149 :;
        }
        this.m_dlItemOption.SetViewArea(this.m_dlItemOption.Count);
        this.m_dlItemOption.RepositionItems();
        this.m_dlItemOption.SetIndex(index);
    }
Ejemplo n.º 3
0
    public void OnChangeItemType(IUIObject obj)
    {
        this.m_SearchOption.m_eItemType = eITEM_TYPE.ITEMTYPE_NONE;
        ITEMTYPE_INFO iTEMTYPE_INFO = null;

        if (this.m_dlItemType.Count > 0 && this.m_dlItemType.SelectedItem != null)
        {
            ListItem listItem = this.m_dlItemType.SelectedItem.Data as ListItem;
            if (listItem != null)
            {
                iTEMTYPE_INFO = (listItem.Key as ITEMTYPE_INFO);
                if (iTEMTYPE_INFO != null)
                {
                    this.m_SearchOption.m_eItemType = (eITEM_TYPE)iTEMTYPE_INFO.ITEMTYPE;
                }
            }
        }
        this.SetItemOption(iTEMTYPE_INFO, 0);
    }
Ejemplo n.º 4
0
    public bool SetData(NrTableData kData)
    {
        NrTableData.eResourceType typeIndex = kData.GetTypeIndex();
        int    num      = (int)typeIndex;
        string kDataKey = string.Empty;

        switch (typeIndex)
        {
        case NrTableData.eResourceType.eRT_WEAPONTYPE_INFO:
        {
            WEAPONTYPE_INFO wEAPONTYPE_INFO = kData as WEAPONTYPE_INFO;
            int             weaponType      = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponType(wEAPONTYPE_INFO.WEAPONCODE);

            kDataKey = weaponType.ToString();
            NrTSingleton <NkWeaponTypeInfoManager> .Instance.SetWeaponTypeInfo(weaponType, ref wEAPONTYPE_INFO);

            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_ATTACKINFO:
        {
            CHARKIND_ATTACKINFO cHARKIND_ATTACKINFO = kData as CHARKIND_ATTACKINFO;
            cHARKIND_ATTACKINFO.nWeaponType = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponType(cHARKIND_ATTACKINFO.WEAPONCODE);

            kDataKey = cHARKIND_ATTACKINFO.ATTACKTYPE.ToString();
            NrTSingleton <NrCharKindInfoManager> .Instance.SetAttackTypeCodeInfo(cHARKIND_ATTACKINFO.ATTACKTYPE, cHARKIND_ATTACKINFO.ATTACKCODE);

            NrCharDataCodeInfo charDataCodeInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharDataCodeInfo();

            if (charDataCodeInfo != null)
            {
                cHARKIND_ATTACKINFO.nJobType = charDataCodeInfo.GetCharJobType(cHARKIND_ATTACKINFO.JOBTYPE);
            }
            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_CLASSINFO:
        {
            CHARKIND_CLASSINFO cHARKIND_CLASSINFO = kData as CHARKIND_CLASSINFO;
            long num2       = 1L;
            int  cLASSINDEX = cHARKIND_CLASSINFO.CLASSINDEX;
            cHARKIND_CLASSINFO.CLASSTYPE = num2 << cLASSINDEX - 1;
            kDataKey = cHARKIND_CLASSINFO.CLASSTYPE.ToString();
            NrTSingleton <NrCharKindInfoManager> .Instance.SetClassTypeCodeInfo(cHARKIND_CLASSINFO.CLASSCODE, cHARKIND_CLASSINFO.CLASSTYPE);

            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_INFO:
        {
            CHARKIND_INFO cHARKIND_INFO = kData as CHARKIND_INFO;
            kDataKey = cHARKIND_INFO.CHARKIND.ToString();
            cHARKIND_INFO.nClassType = NrTSingleton <NrCharKindInfoManager> .Instance.GetClassType(cHARKIND_INFO.CLASSTYPE);

            cHARKIND_INFO.nAttackType = NrTSingleton <NrCharKindInfoManager> .Instance.GetAttackType(cHARKIND_INFO.ATTACKTYPE);

            cHARKIND_INFO.nATB = NrTSingleton <NkATB_Manager> .Instance.ParseCharATB(cHARKIND_INFO.ATB);

            NrTSingleton <NrCharKindInfoManager> .Instance.SetCharKindInfo(ref cHARKIND_INFO);

            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_STATINFO:
        {
            CHARKIND_STATINFO cHARKIND_STATINFO = kData as CHARKIND_STATINFO;
            int charKindByCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(cHARKIND_STATINFO.CharCode);

            kDataKey = charKindByCode.ToString();
            NrTSingleton <NrCharKindInfoManager> .Instance.SetStatInfo(charKindByCode, ref cHARKIND_STATINFO);

            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_MONSTERINFO:
        {
            CHARKIND_MONSTERINFO cHARKIND_MONSTERINFO = kData as CHARKIND_MONSTERINFO;
            int charKindByCode2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(cHARKIND_MONSTERINFO.CharCode);

            kDataKey = charKindByCode2.ToString();
            NrTSingleton <NrCharKindInfoManager> .Instance.SetMonsterInfo(charKindByCode2, ref cHARKIND_MONSTERINFO);

            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_MONSTATINFO:
        {
            CHARKIND_MONSTATINFO cHARKIND_MONSTATINFO = kData as CHARKIND_MONSTATINFO;
            kDataKey = NkUtil.MakeLong(cHARKIND_MONSTATINFO.MonType, (long)cHARKIND_MONSTATINFO.LEVEL).ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_NPCINFO:
        {
            CHARKIND_NPCINFO cHARKIND_NPCINFO = kData as CHARKIND_NPCINFO;
            int charKindByCode3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(cHARKIND_NPCINFO.CHARCODE);

            kDataKey = charKindByCode3.ToString();
            NrTSingleton <NrCharKindInfoManager> .Instance.SetNPCInfo(charKindByCode3, ref cHARKIND_NPCINFO);

            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_ANIINFO:
        {
            CHARKIND_ANIINFO cHARKIND_ANIINFO = kData as CHARKIND_ANIINFO;
            kDataKey = cHARKIND_ANIINFO.BUNDLENAME.ToString();
            NrTSingleton <NrCharAniInfoManager> .Instance.SetAniInfo(ref cHARKIND_ANIINFO);

            NrTSingleton <NrCharKindInfoManager> .Instance.SetAniInfo(ref cHARKIND_ANIINFO);

            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_LEGENDINFO:
        {
            CHARKIND_LEGENDINFO cHARKIND_LEGENDINFO = kData as CHARKIND_LEGENDINFO;
            int charKindByCode4 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(cHARKIND_LEGENDINFO.CharCode);

            cHARKIND_LEGENDINFO.i32Element_LegendCharkind = charKindByCode4;
            for (int i = 0; i < 5; i++)
            {
                int charKindByCode5 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(cHARKIND_LEGENDINFO.i32Base_LegendCharCode[i]);

                cHARKIND_LEGENDINFO.i32Base_CharKind[i] = charKindByCode4;
            }
            kDataKey = charKindByCode4.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_SOLDIERINFO:
        {
            CHARKIND_SOLDIERINFO cHARKIND_SOLDIERINFO = kData as CHARKIND_SOLDIERINFO;
            for (int j = 0; j < 5; j++)
            {
                int charKindByCode6 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(cHARKIND_SOLDIERINFO.kElement_CharData[j].Element_CharCode);

                cHARKIND_SOLDIERINFO.kElement_CharData[j].SetChar(charKindByCode6);
            }
            int charKindByCode7 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(cHARKIND_SOLDIERINFO.CharCode);

            cHARKIND_SOLDIERINFO.i32BaseCharKind = charKindByCode7;
            kDataKey = charKindByCode7.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_CHARKIND_SOLGRADEINFO:
        {
            BASE_SOLGRADEINFO bASE_SOLGRADEINFO = kData as BASE_SOLGRADEINFO;
            int charKindByCode8 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(bASE_SOLGRADEINFO.CharCode);

            kDataKey = charKindByCode8.ToString();
            NrTSingleton <NrCharKindInfoManager> .Instance.SetSolGradeInfo(charKindByCode8, ref bASE_SOLGRADEINFO);

            break;
        }

        case NrTableData.eResourceType.eRT_ITEMTYPE_INFO:
        {
            ITEMTYPE_INFO iTEMTYPE_INFO = kData as ITEMTYPE_INFO;
            iTEMTYPE_INFO.OPTION1 = NrTSingleton <ItemManager> .Instance.GetItemOption(iTEMTYPE_INFO.szOption1);

            iTEMTYPE_INFO.OPTION2 = NrTSingleton <ItemManager> .Instance.GetItemOption(iTEMTYPE_INFO.szOption2);

            iTEMTYPE_INFO.ITEMPART = NrTSingleton <ItemManager> .Instance.GetItemPart(iTEMTYPE_INFO.szItemPart);

            iTEMTYPE_INFO.ITEMTYPE = NrTSingleton <ItemManager> .Instance.GetItemType(iTEMTYPE_INFO.ITEMTYPECODE);

            iTEMTYPE_INFO.ATB = NrTSingleton <NkATB_Manager> .Instance.ParseItemTypeATB(iTEMTYPE_INFO.szATB);

            iTEMTYPE_INFO.ATTACKTYPE = NrTSingleton <NrCharKindInfoManager> .Instance.GetAttackType(iTEMTYPE_INFO.szAttackTypeCode);

            CHARKIND_ATTACKINFO charAttackInfo = NrTSingleton <NrBaseTableManager> .Instance.GetCharAttackInfo(iTEMTYPE_INFO.ATTACKTYPE.ToString());

            if (charAttackInfo != null)
            {
                iTEMTYPE_INFO.WEAPONTYPE = charAttackInfo.nWeaponType;
            }
            else
            {
                iTEMTYPE_INFO.WEAPONTYPE = 0;
            }
            iTEMTYPE_INFO.EQUIPCLASSTYPE = NrTSingleton <NrCharKindInfoManager> .Instance.ParseClassTypeCode(iTEMTYPE_INFO.szClassTypeCode);

            kDataKey = iTEMTYPE_INFO.ITEMTYPE.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_QUEST_NPC_POS_INFO:
        {
            QUEST_NPC_POS_INFO qUEST_NPC_POS_INFO = kData as QUEST_NPC_POS_INFO;
            kDataKey = qUEST_NPC_POS_INFO.strUnique;
            break;
        }

        case NrTableData.eResourceType.eRT_ECO_TALK:
        {
            ECO_TALK eCO_TALK = kData as ECO_TALK;
            kDataKey = eCO_TALK.strCharCode;
            break;
        }

        case NrTableData.eResourceType.eRT_ECO:
        {
            ECO eCO = kData as ECO;
            kDataKey = eCO.GroupUnique.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_MAP_INFO:
        {
            MAP_INFO mAP_INFO = kData as MAP_INFO;
            mAP_INFO.MAP_ATB = NrTSingleton <NkATB_Manager> .Instance.ParseMapATB(mAP_INFO.strMapATB);

            ICollection gateInfo_Col = NrTSingleton <NrBaseTableManager> .Instance.GetGateInfo_Col();

            foreach (GATE_INFO gATE_INFO in gateInfo_Col)
            {
                if (mAP_INFO.MAP_INDEX == gATE_INFO.SRC_MAP_IDX)
                {
                    mAP_INFO.AddGateInfo(gATE_INFO);
                }
                if (mAP_INFO.MAP_INDEX == gATE_INFO.DST_MAP_IDX)
                {
                    mAP_INFO.AddDSTGateInfo(gATE_INFO);
                }
            }
            kDataKey = mAP_INFO.MAP_INDEX.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_MAP_UNIT:
        {
            MAP_UNIT mAP_UNIT = kData as MAP_UNIT;
            kDataKey = mAP_UNIT.MAP_UNIQUE.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_GATE_INFO:
        {
            GATE_INFO gATE_INFO2 = kData as GATE_INFO;
            kDataKey = gATE_INFO2.GATE_IDX.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_ITEM_ACCESSORY:
        {
            ITEM_ACCESSORY pkItem = kData as ITEM_ACCESSORY;
            NrTSingleton <ItemManager> .Instance.AddAccessory(pkItem);

            return(true);
        }

        case NrTableData.eResourceType.eRT_ITEM_ARMOR:
        {
            ITEM_ARMOR iTEM_ARMOR = kData as ITEM_ARMOR;
            NrTSingleton <ItemManager> .Instance.AddArmor(iTEM_ARMOR);

            kDataKey = iTEM_ARMOR.ITEMUNIQUE.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_ITEM_BOX:
        {
            ITEM_BOX pkItem2 = kData as ITEM_BOX;
            NrTSingleton <ItemManager> .Instance.AddBox(pkItem2);

            return(true);
        }

        case NrTableData.eResourceType.eRT_ITEM_MATERIAL:
        {
            ITEM_MATERIAL pkItem3 = kData as ITEM_MATERIAL;
            NrTSingleton <ItemManager> .Instance.AddMaterial(pkItem3);

            return(true);
        }

        case NrTableData.eResourceType.eRT_ITEM_QUEST:
        {
            ITEM_QUEST pkItem4 = kData as ITEM_QUEST;
            NrTSingleton <ItemManager> .Instance.AddQuest(pkItem4);

            return(true);
        }

        case NrTableData.eResourceType.eRT_ITEM_SECONDEQUIP:
        {
            ITEM_SECONDEQUIP pkItem5 = kData as ITEM_SECONDEQUIP;
            NrTSingleton <ItemManager> .Instance.AddSecondEquip(pkItem5);

            return(true);
        }

        case NrTableData.eResourceType.eRT_ITEM_SUPPLIES:
        {
            ITEM_SUPPLIES pkItem6 = kData as ITEM_SUPPLIES;
            NrTSingleton <ItemManager> .Instance.AddSupply(pkItem6);

            return(true);
        }

        case NrTableData.eResourceType.eRT_ITEM_WEAPON:
        {
            ITEM_WEAPON pkItem7 = kData as ITEM_WEAPON;
            NrTSingleton <ItemManager> .Instance.AddWeapon(pkItem7);

            return(true);
        }

        case NrTableData.eResourceType.eRT_INDUN_INFO:
        {
            INDUN_INFO iNDUN_INFO = kData as INDUN_INFO;
            iNDUN_INFO.m_eIndun_Type = INDUN_DEFINE.GetIndunType(iNDUN_INFO.strIndunType);
            iNDUN_INFO.m_nNpcCode    = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(iNDUN_INFO.strNpcCode);

            kDataKey = iNDUN_INFO.m_nIndunIDX.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_GAMEGUIDE:
        {
            TableData_GameGuideInfo tableData_GameGuideInfo = kData as TableData_GameGuideInfo;
            if (tableData_GameGuideInfo.gameGuideInfo.m_eType == GameGuideType.DEFAULT)
            {
                NrTSingleton <GameGuideManager> .Instance.AddDefaultGuid(tableData_GameGuideInfo.gameGuideInfo);
            }
            else
            {
                NrTSingleton <GameGuideManager> .Instance.AddGameGuide(tableData_GameGuideInfo.gameGuideInfo);
            }
            return(true);
        }

        case NrTableData.eResourceType.eRT_LOCALMAP_INFO:
        {
            LOCALMAP_INFO lOCALMAP_INFO = kData as LOCALMAP_INFO;
            kDataKey = lOCALMAP_INFO.LOCALMAP_IDX.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_WORLDMAP_INFO:
        {
            WORLDMAP_INFO wORLDMAP_INFO = kData as WORLDMAP_INFO;
            if (wORLDMAP_INFO.TEXTKEY != string.Empty)
            {
                wORLDMAP_INFO.WORLDMAP_NAME = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(wORLDMAP_INFO.TEXTKEY);
            }
            kDataKey = wORLDMAP_INFO.WORLDMAP_IDX.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_ADVENTURE:
        {
            TableData_AdventureInfo tableData_AdventureInfo = kData as TableData_AdventureInfo;
            NrTSingleton <NkAdventureManager> .Instance.AddAdventure(tableData_AdventureInfo.adventure);

            return(true);
        }

        case NrTableData.eResourceType.eRT_SOLDIER_EVOLUTIONEXP:
        {
            Evolution_EXP evolution_EXP = kData as Evolution_EXP;
            kDataKey = (evolution_EXP.Grade - 1).ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_SOLDIER_TICKETINFO:
        {
            Ticket_Info ticket_Info = kData as Ticket_Info;
            kDataKey = (ticket_Info.Grade - 1).ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_CHARSOL_GUIDE:
        {
            SOL_GUIDE sOL_GUIDE = kData as SOL_GUIDE;
            kDataKey = sOL_GUIDE.m_i32CharKind.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_ITEM_REDUCE:
        {
            ItemReduceInfo itemReduceInfo = kData as ItemReduceInfo;
            kDataKey = itemReduceInfo.iGroupUnique.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_RECOMMEND_REWARD:
        {
            RECOMMEND_REWARD rECOMMEND_REWARD = kData as RECOMMEND_REWARD;
            kDataKey = rECOMMEND_REWARD.i8RecommendCount.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_SUPPORTER_REWARD:
        {
            SUPPORTER_REWARD sUPPORTER_REWARD = kData as SUPPORTER_REWARD;
            kDataKey = sUPPORTER_REWARD.i8SupporterLevel.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_GMHELPINFO:
        {
            GMHELP_INFO gMHELP_INFO = kData as GMHELP_INFO;
            kDataKey = gMHELP_INFO.m_bGMKind.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_SOLWAREHOUSE:
        {
            SolWarehouseInfo solWarehouseInfo = kData as SolWarehouseInfo;
            kDataKey = solWarehouseInfo.iWarehouseNumber.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_CHARSPEND:
        {
            charSpend charSpend = kData as charSpend;
            kDataKey = charSpend.iLevel.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_REINCARNATIONINFO:
        {
            ReincarnationInfo reincarnationInfo = kData as ReincarnationInfo;
            for (int k = 0; k < 6; k++)
            {
                reincarnationInfo.iCharKind[k] = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(reincarnationInfo.strText[k]);
            }
            kDataKey = reincarnationInfo.iType.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_ITEM_BOX_GROUP:
        {
            ITEM_BOX_GROUP_DATA pkItemBoxGroupData = kData as ITEM_BOX_GROUP_DATA;
            NrTSingleton <ItemManager> .Instance.AddBoxGroup(pkItemBoxGroupData);

            return(true);
        }

        case NrTableData.eResourceType.eRT_ITEM_TICKET:
        {
            ITEM_TICKET pkItem8 = kData as ITEM_TICKET;
            NrTSingleton <ItemManager> .Instance.AddTicket(pkItem8);

            return(true);
        }

        case NrTableData.eResourceType.eRT_AGIT_INFO:
        {
            AgitInfoData agitInfoData = kData as AgitInfoData;
            kDataKey = agitInfoData.i16Level.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_AGIT_NPC:
        {
            AgitNPCData agitNPCData = kData as AgitNPCData;
            kDataKey = agitNPCData.ui8NPCType.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_AGIT_MERCHNAT:
        {
            AgitMerchantData agitMerchantData = kData as AgitMerchantData;
            kDataKey = agitMerchantData.i16SellType.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_LEVELUPGUIDE:
        {
            LEVELUPGUIDE_INFO lEVELUPGUIDE_INFO = kData as LEVELUPGUIDE_INFO;
            for (int l = 0; l < lEVELUPGUIDE_INFO.explainList.Count; l++)
            {
                if (lEVELUPGUIDE_INFO.explainList[l] == "0")
                {
                    break;
                }
                AlarmManager.GetInstance().SetLevelupInfo(lEVELUPGUIDE_INFO.LEVEL, "1", lEVELUPGUIDE_INFO.explainList[l]);
            }
            break;
        }

        case NrTableData.eResourceType.eRT_MYTHRAIDINFO:
        {
            MYTHRAIDINFO_DATA mYTHRAIDINFO_DATA = kData as MYTHRAIDINFO_DATA;
            CHARKIND_INFO     baseCharKindInfo  = NrTSingleton <NrCharKindInfoManager> .Instance.GetBaseCharKindInfo(mYTHRAIDINFO_DATA.GetBossCode());

            if (baseCharKindInfo == null)
            {
                Debug.LogError("BossCode Wrong : " + mYTHRAIDINFO_DATA.GetBossCode());
            }
            else
            {
                mYTHRAIDINFO_DATA.nMainBossCharKind = baseCharKindInfo.CHARKIND;
                kDataKey = mYTHRAIDINFO_DATA.nRaidSeason.ToString() + mYTHRAIDINFO_DATA.nRaidType.ToString();
            }
            break;
        }

        case NrTableData.eResourceType.eRT_MYTHRAIDCLEARREWARD:
        {
            MYTHRAID_CLEAR_REWARD_INFO mYTHRAID_CLEAR_REWARD_INFO = kData as MYTHRAID_CLEAR_REWARD_INFO;
            kDataKey = MYTHRAID_CLEAR_REWARD_INFO.setDataKey(mYTHRAID_CLEAR_REWARD_INFO.CLEARMODE, mYTHRAID_CLEAR_REWARD_INFO.ROUND).ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_MYTHRAIDRANKREWARD:
            kDataKey = this.m_dicResourceInfo[num].Count.ToString();
            break;

        case NrTableData.eResourceType.eRT_MYTHRAIDGUARDIANANGEL:
        {
            MYTHRAID_GUARDIANANGEL_INFO mYTHRAID_GUARDIANANGEL_INFO = kData as MYTHRAID_GUARDIANANGEL_INFO;
            kDataKey = mYTHRAID_GUARDIANANGEL_INFO.UNIQUE.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_AUTOSELL:
        {
            AutoSell_info autoSell_info = kData as AutoSell_info;
            kDataKey = autoSell_info.i32SellNumber.ToString();
            break;
        }

        case NrTableData.eResourceType.eRT_ITEM_GROUP_SOL_TICKET:
        {
            GROUP_SOL_TICKET gROUP_SOL_TICKET = kData as GROUP_SOL_TICKET;
            if (kData != null)
            {
                NrTSingleton <ItemManager> .Instance.Add_GroupSolTicket(gROUP_SOL_TICKET.i64GroupUnique, gROUP_SOL_TICKET);
            }
            break;
        }

        case NrTableData.eResourceType.eRT_MYTH_EVOLUTION_SPEND:
        {
            MYTH_EVOLUTION mYTH_EVOLUTION = kData as MYTH_EVOLUTION;
            kDataKey = mYTH_EVOLUTION.m_bSeason.ToString();
            break;
        }
        }
        return(this.AddResourceInfo(num, kDataKey, kData));
    }
Ejemplo n.º 5
0
    public void Set_Item(ITEM a_cItem)
    {
        if (a_cItem == null)
        {
            return;
        }
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        NkSoldierInfo nkSoldierInfo = null;

        if (nrCharUser != null)
        {
            nkSoldierInfo = nrCharUser.GetPersonInfo().GetLeaderSoldierInfo();
        }
        this.m_cItem       = a_cItem;
        this.m_nCurItemNum = 1;
        this.m_nMaxItemNum = 12;
        if (a_cItem.m_nItemNum < 12)
        {
            this.m_nMaxItemNum = a_cItem.m_nItemNum;
        }
        this.Set_GetItemNum();
        this.m_lbNotice.Visible = true;
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1697"),
            "itemname",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_cItem),
            "count",
            this.m_nMaxItemNum
        });

        this.m_lbTitle.Text = empty;
        this.m_nlbEquipList.Clear();
        this.m_nlbEquipList.SelectStyle = "Win_B_ListBoxOrange";
        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_cItem.m_nItemUnique);

        ITEM_BOX_GROUP iTEM_BOX_GROUP = null;

        if (itemInfo.IsItemATB(65536L))
        {
            iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(this.m_cItem.m_nItemUnique);

            if (iTEM_BOX_GROUP == null)
            {
                return;
            }
        }
        int num = 0;

        for (int i = 0; i < 12; i++)
        {
            int num2;
            int num3;
            int num4;
            if (iTEM_BOX_GROUP != null)
            {
                num2 = iTEM_BOX_GROUP.i32GroupItemUnique[i];
                num3 = iTEM_BOX_GROUP.i32GroupItemNum[i];
                num4 = iTEM_BOX_GROUP.i32GroupItemGrade[i];
            }
            else
            {
                num2 = itemInfo.m_nBoxItemUnique[i];
                num3 = itemInfo.m_nBoxItemNumber[i];
                num4 = itemInfo.m_nBoxRank;
            }
            if (num2 > 0)
            {
                if (NrTSingleton <ItemManager> .Instance.IsItemATB(a_cItem.m_nItemUnique, 256L))
                {
                    NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
                    if (kMyCharInfo != null)
                    {
                        ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(num2);

                        if (itemTypeInfo != null)
                        {
                            if (nkSoldierInfo != null && nkSoldierInfo.IsEquipClassType(itemTypeInfo.WEAPONTYPE, itemTypeInfo.EQUIPCLASSTYPE))
                            {
                                num++;
                                NewListItem newListItem = new NewListItem(this.m_nlbEquipList.ColumnNum, true, string.Empty);
                                if (num4 == 0)
                                {
                                    UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(num2);

                                    newListItem.SetListItemData(1, itemTexture, NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(this.m_cItem.m_nItemUnique, i), null, null);
                                    TsLog.LogError("0 == itemRank", new object[0]);
                                }
                                else
                                {
                                    ITEM iTEM = new ITEM();
                                    if (iTEM_BOX_GROUP != null)
                                    {
                                        iTEM.m_nItemID     = -9223372036854775808L;
                                        iTEM.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[i];
                                        iTEM.m_nItemNum    = iTEM_BOX_GROUP.i32GroupItemNum[i];
                                        iTEM.m_nOption[0]  = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]);

                                        iTEM.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]);

                                        iTEM.m_nOption[2]  = iTEM_BOX_GROUP.i32GroupItemGrade[i];
                                        iTEM.m_nOption[3]  = 1;
                                        iTEM.m_nOption[4]  = iTEM_BOX_GROUP.i32GroupItemSkillUnique[i];
                                        iTEM.m_nOption[5]  = iTEM_BOX_GROUP.i32GroupItemSkillLevel[i];
                                        iTEM.m_nOption[7]  = iTEM_BOX_GROUP.i32GroupItemTradePoint[i];
                                        iTEM.m_nOption[8]  = iTEM_BOX_GROUP.i32GroupItemReducePoint[i];
                                        iTEM.m_nOption[6]  = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[i];
                                        iTEM.m_nOption[9]  = iTEM_BOX_GROUP.i32GroupItemSkill2Level[i];
                                        iTEM.m_nDurability = 100;
                                        newListItem.SetListItemData(1, iTEM, null, null, null);
                                    }
                                    else
                                    {
                                        iTEM.Set(this.m_cItem);
                                        iTEM.m_nItemUnique = num2;
                                        iTEM.m_nOption[2]  = num4;
                                        newListItem.SetListItemData(1, iTEM, null, null, null);
                                    }
                                }
                                string text = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1101"), NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(num2));
                                newListItem.SetListItemData(2, text, null, null, null);
                                string arg = Protocol_Item.Money_Format((long)num3) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442");

                                string text2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1105"), arg);
                                newListItem.SetListItemData(3, text2, null, null, null);
                                newListItem.Data = i;
                                this.m_nlbEquipList.Add(newListItem);
                            }
                        }
                    }
                }
                else
                {
                    num++;
                    NewListItem newListItem2 = new NewListItem(this.m_nlbEquipList.ColumnNum, true, string.Empty);
                    newListItem2.SetListItemData(0, string.Empty, "Win_T_ItemEmpty", null, null);
                    if (num4 == 0)
                    {
                        UIBaseInfoLoader itemTexture2 = NrTSingleton <ItemManager> .Instance.GetItemTexture(num2);

                        newListItem2.SetListItemData(1, itemTexture2, NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(this.m_cItem.m_nItemUnique, i), null, null);
                    }
                    else
                    {
                        ITEM iTEM2 = new ITEM();
                        if (iTEM_BOX_GROUP != null)
                        {
                            iTEM2.m_nItemID     = -9223372036854775808L;
                            iTEM2.m_nItemUnique = iTEM_BOX_GROUP.i32GroupItemUnique[i];
                            iTEM2.m_nItemNum    = iTEM_BOX_GROUP.i32GroupItemNum[i];
                            iTEM2.m_nOption[0]  = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]);

                            iTEM2.m_nOption[1] = (int)NrTSingleton <Item_Makerank_Manager> .Instance.GetItemAblility((byte)iTEM_BOX_GROUP.i32GroupItemGrade[i]);

                            iTEM2.m_nOption[2]  = iTEM_BOX_GROUP.i32GroupItemGrade[i];
                            iTEM2.m_nOption[3]  = 1;
                            iTEM2.m_nOption[4]  = iTEM_BOX_GROUP.i32GroupItemSkillUnique[i];
                            iTEM2.m_nOption[5]  = iTEM_BOX_GROUP.i32GroupItemSkillLevel[i];
                            iTEM2.m_nOption[7]  = iTEM_BOX_GROUP.i32GroupItemTradePoint[i];
                            iTEM2.m_nOption[8]  = iTEM_BOX_GROUP.i32GroupItemReducePoint[i];
                            iTEM2.m_nOption[6]  = iTEM_BOX_GROUP.i32GroupItemSkill2Unique[i];
                            iTEM2.m_nOption[9]  = iTEM_BOX_GROUP.i32GroupItemSkill2Level[i];
                            iTEM2.m_nDurability = 100;
                            newListItem2.SetListItemData(1, iTEM2, null, null, null);
                        }
                        else
                        {
                            iTEM2.Set(this.m_cItem);
                            iTEM2.m_nItemUnique = num2;
                            iTEM2.m_nOption[2]  = num4;
                            newListItem2.SetListItemData(1, iTEM2, null, null, null);
                        }
                    }
                    string text3 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1101"), NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(num2));
                    newListItem2.SetListItemData(2, text3, null, null, null);
                    string arg2 = Protocol_Item.Money_Format((long)num3) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442");

                    string text4 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1105"), arg2);
                    newListItem2.SetListItemData(3, text4, null, null, null);
                    newListItem2.Data = i;
                    this.m_nlbEquipList.Add(newListItem2);
                }
            }
        }
        this.m_nlbEquipList.RepositionItems();
        this.Show();
    }
Ejemplo n.º 6
0
 public void Init()
 {
     this.m_kBaseItem.Init();
     this.m_pkITEMTYPE_INFO = null;
     this.m_pkITEMINFO      = null;
 }
Ejemplo n.º 7
0
    public static Tooltip_Dlg.Tooltip_Text_Info[] Get_Item_Text_Info(ITEM pkItem, ITEM pkEquipedItem, G_ID eWidowID, bool bEquiped)
    {
        int level = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1).GetLevel(0L);

        int nItemUnique = pkItem.m_nItemUnique;
        int num;

        if (pkItem.m_nItemID > 0L)
        {
            num = pkItem.m_nDurability;
        }
        else
        {
            num = 100;
        }
        string strTextColorCode  = "1101";
        string strTextColorCode2 = "1101";
        string text = "1101";
        string strTextColorCode3 = "1101";
        string strTextColorCode4 = "1104";
        string text2             = "1401";
        string strTextColorCode5 = "1401";
        string strTextColorCode6 = "1304";
        string strTextColorCode7 = "1113";
        int    num2  = 21;
        int    num3  = 0;
        string text3 = "1101";
        string text4 = "1106";
        string text5 = "1401";
        List <Tooltip_Dlg.Tooltip_Text_Info> list = new List <Tooltip_Dlg.Tooltip_Text_Info>();

        Tooltip_Dlg.Tooltip_Text_Info item = default(Tooltip_Dlg.Tooltip_Text_Info);
        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(nItemUnique);

        if (itemInfo != null)
        {
            item.m_strText = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(pkItem);

            item.m_eAnchor          = SpriteText.Anchor_Pos.Middle_Center;
            item.m_fFontSize        = 22f;
            item.m_strTextColorCode = strTextColorCode;
            list.Add(item);
            item.m_fFontSize = 22f;
            string strText = string.Empty;
            if (bEquiped)
            {
                strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1479");

                item.m_strText          = strText;
                item.m_strTextColorCode = strTextColorCode7;
                list.Add(item);
            }
            item.m_eAnchor      = SpriteText.Anchor_Pos.Middle_Left;
            item.m_nTextureType = 1;
            list.Add(item);
            item.m_nTextureType = 0;
            int           count        = list.Count;
            ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(nItemUnique);

            int useMinLevel = itemInfo.GetUseMinLevel(pkItem);
            if (itemTypeInfo != null)
            {
                item.m_strText = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1257"), NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(itemTypeInfo.TEXTKEY));

                item.m_strTextColorCode = ((useMinLevel <= level) ? text : text2);
                list.Add(item);
            }
            if (pkItem.m_nPosType == 5 || pkItem.m_nPosType == 6 || pkItem.m_nPosType == 7)
            {
                item.m_strText = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("265"), " ", pkItem.m_nItemNum.ToString());

                list.Add(item);
            }
            item.m_strText          = ((useMinLevel > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1258") + useMinLevel) : null);
            item.m_strTextColorCode = ((useMinLevel <= level) ? text : text2);
            list.Add(item);
            item.m_strText          = ((itemInfo.m_nUseMaxLevel > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1259") + itemInfo.m_nUseMaxLevel) : null);
            item.m_strTextColorCode = ((itemInfo.m_nUseMaxLevel >= level) ? text : text2);
            list.Add(item);
            if (!NrTSingleton <ItemManager> .Instance.IsItemATB(nItemUnique, 2L))
            {
                item.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("159");

                item.m_strTextColorCode = text2;
                list.Add(item);
            }
            else
            {
                item.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("158");

                item.m_strTextColorCode = strTextColorCode4;
                list.Add(item);
            }
            if (NrTSingleton <ItemManager> .Instance.IsItemATB(nItemUnique, 4L))
            {
                item.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("160");

                item.m_strTextColorCode = strTextColorCode4;
                list.Add(item);
            }
            for (int i = count; i < list.Count; i++)
            {
                if (list[i].m_strText != null)
                {
                    item.m_nTextureType = 1;
                    list.Add(item);
                    item.m_nTextureType = 0;
                    break;
                }
            }
            count = list.Count;
            int num4 = 0;
            int num5 = 0;
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Min_Damage(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 1);
                int nValue2 = Protocol_Item.Get_Max_Damage(pkEquipedItem);
                num5 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue2, 1);
            }
            int  num6         = Protocol_Item.Get_Min_Damage(pkItem);
            int  optionValue  = Tooltip_Dlg.GetOptionValue(pkItem, num6, 1);
            int  nValue3      = Protocol_Item.Get_Max_Damage(pkItem);
            int  optionValue2 = Tooltip_Dlg.GetOptionValue(pkItem, nValue3, 1);
            bool flag         = false;
            int  num7         = optionValue - num4;
            int  num8         = optionValue2 - num5;
            if (num7 != 0 || num8 != 0)
            {
                flag = true;
            }
            if (!bEquiped && flag && pkEquipedItem != null)
            {
                string text6 = string.Empty;
                if (num8 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text6 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), " ~ ", num8.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text6 = string.Concat(new string[]
                    {
                        "(+",
                        num7.ToString(),
                        " ~ +",
                        num8.ToString(),
                        ")"
                    });
                }
                item.m_strText = ((itemInfo.m_nMinDamage > 0 && itemInfo.m_nMaxDamage > 0) ? string.Concat(new string[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1263"),
                    optionValue.ToString(),
                    " ~ ",
                    optionValue2.ToString(),
                    " ",
                    text6
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nMinDamage > 0 && itemInfo.m_nMaxDamage > 0) ? NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1263"), optionValue.ToString(), " ~ ", optionValue2.ToString()) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Defense(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 2);
            }
            num6        = Protocol_Item.Get_Defense(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 2);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text7 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text7 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text7 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nDefense > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1264"),
                    optionValue,
                    " ",
                    text7
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nDefense > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1264") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_ADDHP(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 4);
            }
            num6        = Protocol_Item.Get_ADDHP(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 4);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text8 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text8 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text8 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nAddHP > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1265"),
                    optionValue,
                    " ",
                    text8
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nAddHP > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1265") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            num6                    = Protocol_Item.Get_STR(pkItem);
            item.m_strText          = ((itemInfo.m_nSTR > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1271") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            num6                    = Protocol_Item.Get_DEX(pkItem);
            item.m_strText          = ((itemInfo.m_nDEX > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1272") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            num6                    = Protocol_Item.Get_INT(pkItem);
            item.m_strText          = ((itemInfo.m_nINT > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1274") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            num6                    = Protocol_Item.Get_VIT(pkItem);
            item.m_strText          = ((itemInfo.m_nVIT > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1263") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Critical_Plus(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 3);
            }
            num6        = Protocol_Item.Get_Critical_Plus(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 3);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text9 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text9 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text9 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nCriticalPlus > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1267"),
                    optionValue,
                    " ",
                    text9
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nCriticalPlus > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1267") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            num6                    = Protocol_Item.Get_AttackSpeed(pkItem);
            item.m_strText          = ((itemInfo.m_nAttackSpeed > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1276") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Hitrate_Plus(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 6);
            }
            num6        = Protocol_Item.Get_Hitrate_Plus(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 6);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text10 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text10 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text10 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nHitratePlus > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("173"),
                    optionValue,
                    " ",
                    text10
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nHitratePlus > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("173") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            if (pkEquipedItem != null)
            {
                int nValue = Protocol_Item.Get_Evasion_Plus(pkEquipedItem);
                num4 = Tooltip_Dlg.GetOptionValue(pkEquipedItem, nValue, 7);
            }
            num6        = Protocol_Item.Get_Evasion_Plus(pkItem);
            optionValue = Tooltip_Dlg.GetOptionValue(pkItem, num6, 7);
            num7        = optionValue - num4;
            if (!bEquiped && num7 != 0 && pkEquipedItem != null)
            {
                string text11 = string.Empty;
                if (num7 < 0)
                {
                    item.m_strTextColorCode = strTextColorCode5;
                    text11 = NrTSingleton <UIDataManager> .Instance.GetString("(", num7.ToString(), ")");
                }
                else
                {
                    item.m_strTextColorCode = strTextColorCode6;
                    text11 = NrTSingleton <UIDataManager> .Instance.GetString("(", "+", num7.ToString(), ")");
                }
                item.m_strText = ((itemInfo.m_nEvasionPlus > 0) ? string.Concat(new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("174"),
                    optionValue,
                    " ",
                    text11
                }) : null);
            }
            else
            {
                item.m_strText          = ((itemInfo.m_nEvasionPlus > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("174") + optionValue) : null);
                item.m_strTextColorCode = strTextColorCode3;
            }
            list.Add(item);
            num6                    = Protocol_Item.Get_Move_Speed(pkItem);
            item.m_strText          = ((itemInfo.m_nMoveSpeed > 0) ? (NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("175") + num6) : null);
            item.m_strTextColorCode = strTextColorCode3;
            list.Add(item);
            item.m_strText = ((itemInfo.m_nDurability > 0) ? string.Concat(new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("176"),
                num,
                " / ",
                itemInfo.m_nDurability
            }) : null);
            item.m_strTextColorCode = ((num < num2) ? ((num > num3) ? text4 : text5) : text3);
            list.Add(item);
            for (int j = count; j < list.Count; j++)
            {
                if (list[j].m_strText != null)
                {
                    item.m_nTextureType = 1;
                    list.Add(item);
                    item.m_nTextureType = 0;
                    break;
                }
            }
            count = list.Count;
            for (int k = count; k < list.Count; k++)
            {
                if (list[k].m_strText != null)
                {
                    item.m_nTextureType = 1;
                    list.Add(item);
                    item.m_nTextureType = 0;
                    break;
                }
            }
            string empty  = string.Empty;
            string empty2 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                empty2
            });

            item.m_eAnchor          = SpriteText.Anchor_Pos.Upper_Left;
            item.m_strText          = empty;
            item.m_strTextColorCode = strTextColorCode2;
            list.Add(item);
            return(list.ToArray());
        }
        return(null);
    }
Ejemplo n.º 8
0
    public override void ExcuteGameGuide()
    {
        if (this.srcItem == null)
        {
            return;
        }
        GS_ITEM_MOVE_REQ gS_ITEM_MOVE_REQ = new GS_ITEM_MOVE_REQ();
        NrPersonInfoUser charPersonInfo   = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(this.destSolID);

        if (soldierInfoFromSolID == null)
        {
            return;
        }
        if (soldierInfoFromSolID.GetSolPosType() == 2 || soldierInfoFromSolID.GetSolPosType() == 6)
        {
            return;
        }
        ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(this.srcItem.m_nItemUnique);

        if (itemTypeInfo == null)
        {
            return;
        }
        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.srcItem.m_nItemUnique);

        if (itemInfo != null && itemInfo.m_nItemType == 19 && !soldierInfoFromSolID.IsAtbCommonFlag(2L))
        {
            return;
        }
        if (!soldierInfoFromSolID.IsEquipClassType(itemTypeInfo.WEAPONTYPE, itemTypeInfo.EQUIPCLASSTYPE))
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("34");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (NrTSingleton <ItemManager> .Instance.GetItemMinLevelFromItem(this.srcItem) > (int)soldierInfoFromSolID.GetLevel())
        {
            string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("358");

            Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int equipItemPos = (int)NrTSingleton <ItemManager> .Instance.GetEquipItemPos(this.srcItem.m_nItemUnique);

        gS_ITEM_MOVE_REQ.m_nMoveType = NrTSingleton <ItemManager> .Instance.GetItemMoveType_InvenToSol(this.srcItem.m_nPosType);

        gS_ITEM_MOVE_REQ.m_nSrcItemID  = this.srcItem.m_nItemID;
        gS_ITEM_MOVE_REQ.m_nSrcItemPos = this.srcItem.m_nItemPos;
        gS_ITEM_MOVE_REQ.m_nSrcSolID   = this.srcSolID;
        if (this.destItem != null)
        {
            gS_ITEM_MOVE_REQ.m_nDestItemID  = this.destItem.m_nItemID;
            gS_ITEM_MOVE_REQ.m_nDestItemPos = equipItemPos;
            gS_ITEM_MOVE_REQ.m_nDestSolID   = this.destSolID;
        }
        else
        {
            gS_ITEM_MOVE_REQ.m_nDestItemID  = 0L;
            gS_ITEM_MOVE_REQ.m_nDestItemPos = equipItemPos;
            gS_ITEM_MOVE_REQ.m_nDestSolID   = this.destSolID;
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEM_MOVE_REQ, gS_ITEM_MOVE_REQ);
        NrTSingleton <GameGuideManager> .Instance.ExecuteGuide = true;
        string itemMaterialCode = NrTSingleton <ItemManager> .Instance.GetItemMaterialCode(this.srcItem.m_nItemUnique);

        if (!string.IsNullOrEmpty(itemMaterialCode))
        {
            TsAudioManager.Container.RequestAudioClip("UI_ITEM", itemMaterialCode, "DROP", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        }
    }
Ejemplo n.º 9
0
    public override void ExcuteGameGuide()
    {
        if (this.srcItem == null || this.destItem == null)
        {
            return;
        }
        GS_ITEM_MOVE_REQ gS_ITEM_MOVE_REQ = new GS_ITEM_MOVE_REQ();
        NrPersonInfoUser charPersonInfo   = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(this.destSolID);

        if (soldierInfoFromSolID == null)
        {
            return;
        }
        ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(this.srcItem.m_nItemUnique);

        if (itemTypeInfo == null)
        {
            return;
        }
        if (!soldierInfoFromSolID.IsEquipClassType(itemTypeInfo.WEAPONTYPE, itemTypeInfo.EQUIPCLASSTYPE))
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("34");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (NrTSingleton <ItemManager> .Instance.GetItemMinLevelFromItem(this.srcItem) > (int)soldierInfoFromSolID.GetLevel())
        {
            string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("358");

            Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int equipItemPos = (int)NrTSingleton <ItemManager> .Instance.GetEquipItemPos(this.srcItem.m_nItemUnique);

        gS_ITEM_MOVE_REQ.m_nMoveType = NrTSingleton <ItemManager> .Instance.GetItemMoveType_InvenToSol(this.srcItem.m_nPosType);

        gS_ITEM_MOVE_REQ.m_nSrcItemID  = this.srcItem.m_nItemID;
        gS_ITEM_MOVE_REQ.m_nSrcItemPos = this.srcItem.m_nItemPos;
        gS_ITEM_MOVE_REQ.m_nSrcSolID   = this.srcSolID;
        if (this.destItem != null)
        {
            gS_ITEM_MOVE_REQ.m_nDestItemID  = this.destItem.m_nItemID;
            gS_ITEM_MOVE_REQ.m_nDestItemPos = equipItemPos;
            gS_ITEM_MOVE_REQ.m_nDestSolID   = this.destSolID;
        }
        else
        {
            gS_ITEM_MOVE_REQ.m_nDestItemID  = 0L;
            gS_ITEM_MOVE_REQ.m_nDestItemPos = equipItemPos;
            gS_ITEM_MOVE_REQ.m_nDestSolID   = this.destSolID;
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEM_MOVE_REQ, gS_ITEM_MOVE_REQ);
        NrTSingleton <GameGuideManager> .Instance.ExecuteGuide = true;
    }
Ejemplo n.º 10
0
    public string GetItemFileName(NrCharDefine.eAT2ItemAssetBundle eItemIndex)
    {
        if (this.m_pkTargetKind == null)
        {
            return(string.Empty);
        }
        string           result           = string.Empty;
        int              weapontype       = this.m_pkTargetKind.GetWeaponType();
        int              data             = this.m_kCharPartInfo.m_kEquipPart.GetData(eAT2CharEquipPart.CHAREQUIPPART_WEAPON1);
        string           arg              = "001";
        NkWeaponTypeInfo nkWeaponTypeInfo = null;

        if (eItemIndex != NrCharDefine.eAT2ItemAssetBundle.weapon1)
        {
            if (eItemIndex == NrCharDefine.eAT2ItemAssetBundle.weapon2)
            {
                if (data > 0)
                {
                    ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(data);

                    if (itemTypeInfo != null)
                    {
                        weapontype = itemTypeInfo.WEAPONTYPE;
                    }
                    ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(data);

                    if (itemInfo != null)
                    {
                        arg = NkUtil.MakeCode(itemInfo.m_strModelPath);
                    }
                }
                nkWeaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);

                if (nkWeaponTypeInfo != null)
                {
                    if (!nkWeaponTypeInfo.IsATB(8L))
                    {
                        weapontype = 0;
                    }
                    if (this.m_pkTargetKind.IsATB(1L) && this.m_pkTargetKind.GetCharTribe() == 2 && this.m_pkTargetKind.GetGender() == 1)
                    {
                        if (!nkWeaponTypeInfo.IsATB(16L))
                        {
                            weapontype = 0;
                        }
                        else
                        {
                            weapontype = 9;
                        }
                    }
                    nkWeaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);
                }
            }
        }
        else
        {
            if (data > 0)
            {
                ITEMTYPE_INFO itemTypeInfo2 = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(data);

                if (itemTypeInfo2 != null)
                {
                    weapontype = itemTypeInfo2.WEAPONTYPE;
                }
                ITEMINFO itemInfo2 = NrTSingleton <ItemManager> .Instance.GetItemInfo(data);

                if (itemInfo2 != null)
                {
                    arg = NkUtil.MakeCode(itemInfo2.m_strModelPath);
                }
            }
            nkWeaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);
        }
        if (nkWeaponTypeInfo != null)
        {
            string code = nkWeaponTypeInfo.GetCode();
            result = string.Format("{0}/{0}_{1}", code, arg);
        }
        return(result);
    }
Ejemplo n.º 11
0
    public string GetWeaponTargetName(NrCharDefine.eAT2ItemAssetBundle eItemIndex, bool battleani)
    {
        string           str        = string.Empty;
        int              weapontype = this.m_pkTargetKind.GetWeaponType();
        int              data       = this.m_kCharPartInfo.m_kEquipPart.GetData(eAT2CharEquipPart.CHAREQUIPPART_WEAPON1);
        string           str2       = "1";
        NkWeaponTypeInfo weaponTypeInfo;

        if (eItemIndex == NrCharDefine.eAT2ItemAssetBundle.weapon1)
        {
            ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(data);

            if (itemTypeInfo != null)
            {
                weapontype = itemTypeInfo.WEAPONTYPE;
            }
            weaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);
        }
        else
        {
            str2 = "2";
            if (data > 0)
            {
                ITEMTYPE_INFO itemTypeInfo2 = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(data);

                if (itemTypeInfo2 != null)
                {
                    weapontype = itemTypeInfo2.WEAPONTYPE;
                }
            }
            weaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);

            if (weaponTypeInfo != null)
            {
                if (!weaponTypeInfo.IsATB(8L))
                {
                    weapontype = 0;
                }
                if (this.m_pkTargetKind.IsATB(1L) && this.m_pkTargetKind.GetCharTribe() == 2 && this.m_pkTargetKind.GetGender() == 1)
                {
                    if (!weaponTypeInfo.IsATB(16L))
                    {
                        weapontype = 0;
                    }
                    else
                    {
                        weapontype = 9;
                        if (!battleani)
                        {
                            str2 = "1";
                        }
                    }
                }
                weaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);
            }
        }
        if (weaponTypeInfo == null)
        {
            str = "dmweapon";
        }
        else if (!battleani)
        {
            str = weaponTypeInfo.GetBackDummy();
        }
        else
        {
            str = weaponTypeInfo.GetBattleDummy();
            if (weaponTypeInfo.IsATB(4L))
            {
                if (eItemIndex == NrCharDefine.eAT2ItemAssetBundle.weapon1)
                {
                    str2 = "2";
                }
                else if (eItemIndex == NrCharDefine.eAT2ItemAssetBundle.weapon2)
                {
                    str2 = "1";
                }
            }
        }
        return(str + str2);
    }
Ejemplo n.º 12
0
    public bool IsHaveEquipItem(eEQUIP_ITEM Slot, ref ITEM srcItem, NkSoldierInfo solInfo)
    {
        if (solInfo == null)
        {
            return(false);
        }
        int itemPosType;

        if (Slot == eEQUIP_ITEM.EQUIP_WEAPON1)
        {
            itemPosType = solInfo.GetItemPosTypeByWeaponType();
        }
        else
        {
            itemPosType = 1;
        }
        int      inventoryIndex = this.GetInventoryIndex(itemPosType);
        bool     result         = false;
        ITEM     iTEM           = null;
        ITEMINFO iTEMINFO       = null;

        if (inventoryIndex > -1 && inventoryIndex < 7)
        {
            for (int i = 0; i < ItemDefine.INVENTORY_ITEMSLOT_MAX; i++)
            {
                ITEM item = this.m_Inventory[inventoryIndex].GetItem(i);
                if (item != null)
                {
                    if (NrTSingleton <ItemManager> .Instance.GetItemMinLevelFromItem(item) <= (int)solInfo.GetLevel())
                    {
                        ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(item.m_nItemUnique);

                        if (itemTypeInfo != null)
                        {
                            if (solInfo.IsEquipClassType(itemTypeInfo.WEAPONTYPE, itemTypeInfo.EQUIPCLASSTYPE))
                            {
                                ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique);

                                int equipItemPos = (int)NrTSingleton <ItemManager> .Instance.GetEquipItemPos(item.m_nItemUnique);

                                if (Slot == (eEQUIP_ITEM)equipItemPos)
                                {
                                    if (itemInfo.m_nMinDamage != 0)
                                    {
                                        int num = 0;
                                        if (iTEM != null)
                                        {
                                            num = Tooltip_Dlg.GetOptionValue(iTEM.m_nOption[0], iTEMINFO.m_nMinDamage);
                                        }
                                        int optionValue = Tooltip_Dlg.GetOptionValue(item.m_nOption[0], itemInfo.m_nMinDamage);
                                        if (num < optionValue)
                                        {
                                            iTEM     = item;
                                            iTEMINFO = itemInfo;
                                            srcItem  = item;
                                            result   = true;
                                        }
                                    }
                                    else if (itemInfo.m_nDefense != 0)
                                    {
                                        int num2 = 0;
                                        if (iTEM != null)
                                        {
                                            num2 = Tooltip_Dlg.GetOptionValue(iTEM.m_nOption[0], iTEMINFO.m_nDefense);
                                        }
                                        int optionValue2 = Tooltip_Dlg.GetOptionValue(item.m_nOption[0], itemInfo.m_nDefense);
                                        if (num2 < optionValue2)
                                        {
                                            iTEM     = item;
                                            iTEMINFO = itemInfo;
                                            srcItem  = item;
                                            result   = true;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return(result);
    }
Ejemplo n.º 13
0
    public override void SetComponent()
    {
        this.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1368");

        string text = string.Empty;

        this.m_dtCostIcon1 = (base.GetControl("Icn_Money01") as DrawTexture);
        this.m_dtCostIcon2 = (base.GetControl("Icn_Money02") as DrawTexture);
        this.m_tbTab       = (base.GetControl("ToolBar") as Toolbar);
        this.m_tbTab.Control_Tab[0].Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("451");

        this.m_tbTab.Control_Tab[1].Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1490");

        UIPanelTab expr_AE = this.m_tbTab.Control_Tab[0];

        expr_AE.ButtonClick = (EZValueChangedDelegate)Delegate.Combine(expr_AE.ButtonClick, new EZValueChangedDelegate(this.OnClickTab));
        UIPanelTab expr_DC = this.m_tbTab.Control_Tab[1];

        expr_DC.ButtonClick = (EZValueChangedDelegate)Delegate.Combine(expr_DC.ButtonClick, new EZValueChangedDelegate(this.OnClickTab));
        this.m_btCost       = (base.GetControl("Button_AuctionCost") as Button);
        this.m_btCost.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickCost));
        this.m_lbCost       = (base.GetControl("Label_AuctionCost") as Label);
        this.m_btDirectCost = (base.GetControl("Button_DirectCost") as Button);
        this.m_btDirectCost.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickDirectCost));
        this.m_lbDirectCost = (base.GetControl("Label_DirectCost") as Label);
        this.m_cbHearts     = (base.GetControl("Toggle_MoneyKind01") as CheckBox);
        this.m_cbHearts.SetValueChangedDelegate(new EZValueChangedDelegate(this.ClickPayTypeHearts));
        this.m_cbHearts.SetCheckState(1);
        this.m_cbMoney = (base.GetControl("Toggle_MoneyKind02") as CheckBox);
        this.m_cbMoney.SetValueChangedDelegate(new EZValueChangedDelegate(this.ClickPayTypeMoney));
        this.m_cbMoney.SetCheckState(1);
        this.m_btSearch = (base.GetControl("Button_OK") as Button);
        this.m_btSearch.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSearch));
        this.m_dtCostIconHearts = (base.GetControl("Icon_MoneyKindHearts") as DrawTexture);
        this.m_dtCostIconMoney  = (base.GetControl("Icon_MoneyKind_Gold") as DrawTexture);
        this.m_lbCostKind       = (base.GetControl("Label_MoneyKind") as Label);
        this.m_dlItemType       = (base.GetControl("DropDownList_Base01") as DropDownList);
        this.m_dlItemType.AddItem(this.m_strText, eITEM_TYPE.ITEMTYPE_NONE);
        this.m_ItemTypeInfo.Clear();
        for (int i = 1; i <= 20; i++)
        {
            ITEMTYPE_INFO itemTypeInfo = NrTSingleton <NrBaseTableManager> .Instance.GetItemTypeInfo(i.ToString());

            if (itemTypeInfo != null)
            {
                if (0 < itemTypeInfo.AuctionSearch)
                {
                    this.m_ItemTypeInfo.Add(itemTypeInfo.AuctionSearch, itemTypeInfo);
                }
            }
        }
        foreach (ITEMTYPE_INFO current in this.m_ItemTypeInfo.Values)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(current.TEXTKEY);

            if (!(string.Empty == text))
            {
                this.m_dlItemType.AddItem(text, current);
            }
        }
        this.m_dlItemType.SetViewArea(this.m_dlItemType.Count);
        this.m_dlItemType.RepositionItems();
        this.m_dlItemType.SetFirstItem();
        this.m_dlItemType.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnChangeItemType));
        this.m_btUseMinLevel = (base.GetControl("Button_EquipLv01") as Button);
        this.m_btUseMinLevel.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickUseMinLevel));
        this.m_lbUseMinLevel = (base.GetControl("Label_EquipLv01") as Label);
        this.m_btUseMaxLevel = (base.GetControl("Button_EquipLv02") as Button);
        this.m_btUseMaxLevel.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickUseMaxLevel));
        this.m_lbUseMaxLevel = (base.GetControl("Label_EquipLv02") as Label);
        this.m_dlItemOption  = (base.GetControl("DropDownList_Option01") as DropDownList);
        this.m_dlItemOption.SetViewArea(this.m_dlItemOption.Count);
        this.m_dlItemOption.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnChangeItemOption));
        this.m_btItemSkillLevel = (base.GetControl("Button_Option01") as Button);
        this.m_btItemSkillLevel.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickItemSkillLevel));
        this.m_lbItemSkillLevel = (base.GetControl("Label_Option01") as Label);
        this.m_btItemTradeCount = (base.GetControl("Button_TradeCount") as Button);
        this.m_btItemTradeCount.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickItemTradeCount));
        this.m_lbItemTradeCount = (base.GetControl("Label_TradeCount") as Label);
        this.m_dlSolSeason      = (base.GetControl("DropDownList_Base02") as DropDownList);
        this.m_dlSolSeason.AddItem(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1317"), 0);
        this.m_SeasonData.Add(0);
        List <SOL_GUIDE> valueAllSeason = NrTSingleton <NrTableSolGuideManager> .Instance.GetValueAllSeason();

        for (int i = 0; i < valueAllSeason.Count; i++)
        {
            if (0 < valueAllSeason[i].m_bSeason)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1208"),
                    "count",
                    valueAllSeason[i].m_bSeason
                });

                this.m_dlSolSeason.AddItem(text, valueAllSeason[i].m_bSeason);
                this.m_SeasonData.Add(valueAllSeason[i].m_bSeason);
            }
        }
        this.m_dlSolSeason.SetViewArea(this.m_dlSolSeason.Count);
        this.m_dlSolSeason.RepositionItems();
        this.m_dlSolSeason.SetFirstItem();
        this.m_dlSolSeason.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnChangeSolSeason));
        this.m_btSolLevel = (base.GetControl("Button_EquipLv03") as Button);
        this.m_btSolLevel.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSolLevel));
        this.m_lbSolLevel      = (base.GetControl("Label_EquipLv03") as Label);
        this.m_tfSolName       = (base.GetControl("TextField_SearchName") as TextField);
        this.m_btSolTradeCount = (base.GetControl("Button_TradeCount01") as Button);
        this.m_btSolTradeCount.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSolTradeCount));
        this.m_lbSolTradeCount = (base.GetControl("Label_TradeCount1") as Label);
        if (!AuctionMainDlg.IsPayTypeHearts())
        {
            this.m_cbHearts.Hide(true);
            this.m_dtCostIconHearts.Hide(true);
            this.m_cbMoney.SetCheckState(1);
            AuctionMainDlg.SetChangePayTexture(this.m_dtCostIcon1, this.m_dtCostIcon2, AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD);
        }
        if (!AuctionMainDlg.IsPayTypeMoney())
        {
            this.m_cbMoney.Hide(true);
            this.m_dtCostIconMoney.Hide(true);
            this.m_cbHearts.SetCheckState(1);
            AuctionMainDlg.SetChangePayTexture(this.m_dtCostIcon1, this.m_dtCostIcon2, AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS);
        }
        if (!AuctionMainDlg.IsPayTypeHearts() || !AuctionMainDlg.IsPayTypeMoney())
        {
            this.m_lbCostKind.Hide(true);
            this.m_cbHearts.Hide(true);
            this.m_cbMoney.Hide(true);
            this.m_dtCostIconHearts.Hide(true);
            this.m_dtCostIconMoney.Hide(true);
        }
        base.SetScreenCenter();
        base.ShowBlackBG(0.5f);
    }
Ejemplo n.º 14
0
    public void SetSearchOption(AuctionSearchOption SearchOption)
    {
        this.m_SearchOption.Set(SearchOption);
        this.m_lbUseMinLevel.SetText(this.m_SearchOption.m_iUseMinLevel.ToString());
        this.m_lbUseMaxLevel.SetText(this.m_SearchOption.m_iUseMaxLevel.ToString());
        this.m_lbItemSkillLevel.SetText(this.m_SearchOption.m_iItemSkillLevel.ToString());
        this.m_lbItemTradeCount.SetText(this.m_SearchOption.m_iItemTradeCount.ToString());
        this.m_lbSolLevel.SetText(this.m_SearchOption.m_iSolLevel.ToString());
        this.m_tfSolName.SetText(this.m_SearchOption.m_strSolName);
        this.m_lbSolTradeCount.SetText(this.m_SearchOption.m_iSolTradeCount.ToString());
        if (this.m_SearchOption.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD)
        {
            this.m_lbCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_lCostMoney));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_lDirectCostMoney));
            this.m_cbMoney.SetCheckState(1);
            this.m_cbHearts.SetCheckState(0);
        }
        else if (this.m_SearchOption.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS)
        {
            this.m_lbCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_iCostHearts));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_iCostDirectHearts));
            this.m_cbMoney.SetCheckState(0);
            this.m_cbHearts.SetCheckState(1);
        }
        else
        {
            long num  = 0L;
            long num2 = 0L;
            if (AuctionMainDlg.IsPayTypeMoney())
            {
                this.m_SearchOption.m_ePayType = AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD;
                num  = this.m_SearchOption.m_lCostMoney;
                num2 = this.m_SearchOption.m_lDirectCostMoney;
            }
            else if (AuctionMainDlg.IsPayTypeHearts())
            {
                this.m_SearchOption.m_ePayType = AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS;
                num  = (long)this.m_SearchOption.m_iCostHearts;
                num2 = (long)this.m_SearchOption.m_iCostDirectHearts;
            }
            this.m_lbCost.SetText(ANNUALIZED.Convert(num));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(num2));
            this.m_cbMoney.SetCheckState(1);
            this.m_cbHearts.SetCheckState(1);
        }
        int num3 = 0;

        if (eITEM_TYPE.ITEMTYPE_NONE < this.m_SearchOption.m_eItemType)
        {
            num3 = (int)this.m_SearchOption.m_eItemType;
            this.m_dlItemType.SetIndex(num3);
        }
        ITEMTYPE_INFO itemTypeInfo = null;

        if (0 < num3)
        {
            itemTypeInfo = NrTSingleton <NrBaseTableManager> .Instance.GetItemTypeInfo(num3.ToString());
        }
        this.SetItemOption(itemTypeInfo, this.m_SearchOption.m_iItemSkillUnique);
        for (int i = 0; i < this.m_SeasonData.Count; i++)
        {
            if (this.m_SeasonData[i] == this.m_SearchOption.m_bySolSeason)
            {
                this.m_dlSolSeason.SetIndex(i);
                break;
            }
        }
        this.SelectTab();
    }