Example #1
0
        public static CUseable CreateCoinUseable(RES_SHOPBUY_COINTYPE coinType, int count)
        {
            enVirtualItemType enNull = enVirtualItemType.enNull;

            switch (coinType)
            {
            case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_COUPONS:
                enNull = enVirtualItemType.enDianQuan;
                break;

            case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_PVPCOIN:
                enNull = enVirtualItemType.enGoldCoin;
                break;

            case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_BURNINGCOIN:
                enNull = enVirtualItemType.enHeart;
                break;

            case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_ARENACOIN:
                enNull = enVirtualItemType.enArenaCoin;
                break;

            case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SKINCOIN:
                enNull = enVirtualItemType.enSkinCoin;
                break;

            case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_SYMBOLCOIN:
                enNull = enVirtualItemType.enSymbolCoin;
                break;

            case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_DIAMOND:
            case RES_SHOPBUY_COINTYPE.RES_SHOPBUY_TYPE_MIXPAY:
                enNull = enVirtualItemType.enDiamond;
                break;

            default:
                Debug.LogError("CoinType:" + coinType.ToString() + " is not supported!");
                break;
            }
            return(new CVirtualItem(enNull, count));
        }
Example #2
0
        public static CUseable CreateCoinUseable(RES_SHOPBUY_COINTYPE coinType, int count)
        {
            enVirtualItemType bType = enVirtualItemType.enNull;

            switch (coinType)
            {
            case 2:
                bType = enVirtualItemType.enDianQuan;
                goto IL_91;

            case 4:
                bType = enVirtualItemType.enGoldCoin;
                goto IL_91;

            case 5:
                bType = enVirtualItemType.enHeart;
                goto IL_91;

            case 6:
                bType = enVirtualItemType.enArenaCoin;
                goto IL_91;

            case 7:
                bType = enVirtualItemType.enSkinCoin;
                goto IL_91;

            case 9:
                bType = enVirtualItemType.enSymbolCoin;
                goto IL_91;

            case 10:
            case 11:
                bType = enVirtualItemType.enDiamond;
                goto IL_91;
            }
            Debug.LogError("CoinType:" + coinType.ToString() + " is not supported!");
IL_91:
            return(new CVirtualItem(bType, count));
        }
Example #3
0
 public static CUseable CreateVirtualUseable(enVirtualItemType vType, int bCount)
 {
     return(new CVirtualItem(vType, bCount));
 }
Example #4
0
        public CVirtualItem(enVirtualItemType bType, int bCount)
        {
            this.m_virtualType = bType;
            this.m_stackCount  = bCount;
            if (bType == enVirtualItemType.enExp)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Experience");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Description_EXP");

                this.m_grade = 0;
            }
            else if (bType == enVirtualItemType.enNoUsed)
            {
                this.m_name        = string.Empty;
                this.m_description = string.Empty;
                this.m_grade       = 2;
            }
            else if (bType == enVirtualItemType.enDianQuan)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Shop_Money_Type_DianQuan");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Description_DianQuan");

                this.m_grade = 3;
            }
            else if (bType == enVirtualItemType.enHeart)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Action_Point");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Description_AP");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enExpPool)
            {
                this.m_name        = "经验池";
                this.m_description = "经验池";
                this.m_grade       = 0;
            }
            else if (bType == enVirtualItemType.enGoldCoin)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Shop_Money_Type_GoldCoin");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Description_GoldCoin");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enBurningCoin)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Shop_Money_Type_Burning_Coin");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Description_Burning_Coin");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enArenaCoin)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Shop_Money_Type_Arena_Coin");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Description_Arena_Coin");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enSkinCoin)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Shop_Money_Type_Skin_Coin");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Description_Skin_Coin");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enGuildConstruct)
            {
                this.m_name        = string.Empty;
                this.m_description = string.Empty;
                this.m_grade       = 1;
            }
            else if (bType == enVirtualItemType.enSymbolCoin)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Symbol_Coin_Text");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Symbol_Coin_Desc");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enDiamond)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Shop_Money_Type_Diamond");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Description_Diamond");

                this.m_grade = 3;
            }
            else if (bType == enVirtualItemType.enAchievementPoint)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("Achievement_Point");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("Achievement_Point_Desc");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enHuoyueDu)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("HuoyueDu_Text");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("HuoyueDu_Desc");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enMatchPersonalPoint)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("MatchPersonalPoint_Name");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("MatchPersonalPoint_Desc");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enMatchTeamPoint)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("MatchTeamPoint_Name");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("MatchTeamPoint_Desc");

                this.m_grade = 1;
            }
            else if (bType == enVirtualItemType.enDianJuanJiFen)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("DianJuanJiFenName");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("DianJuanJiFenDesc");

                this.m_grade = 3;
            }
            else if (bType == enVirtualItemType.enMentorPoint)
            {
                this.m_name = Singleton <CTextManager> .GetInstance().GetText("MingShiDianName");

                this.m_description = Singleton <CTextManager> .GetInstance().GetText("MingShiDianDesc");

                this.m_grade = 3;
            }
        }