Пример #1
0
        private CItemInfo CreateNumericalItemInfo(ItemNumerical_Type numType)
        {
            string strPic  = "";
            string strName = "";

            switch (numType)
            {
            case ItemNumerical_Type.Money:
                strPic  = GOLDTICKET_SPRITE_NAME;
                strName = SystemTips.GetTipsContent("Goods_Gold");
                break;

            case ItemNumerical_Type.MCoin:
                strPic  = MCOINTICKET_SPRITE_NAME;
                strName = SystemTips.GetTipsContent("Goods_Mcoin");
                break;

            case ItemNumerical_Type.MBCoin:
                strPic  = MBINDTICKET_SPRITE_NAME;
                strName = SystemTips.GetTipsContent("Goods_MbindCoin");
                break;

            case ItemNumerical_Type.EXP:
                strPic  = EXP_SPRITE_NAME;
                strName = SystemTips.GetTipsContent("Quest_Exp");
                break;

            case ItemNumerical_Type.Honor:
                strPic  = HONOR_SPRITE_NAME;
                strName = SystemTips.GetTipsContent("Quest_Honor");
                break;

            case ItemNumerical_Type.Contribution:
                strPic  = CONTRIBUTION_SPRITE_NAME;
                strName = SystemTips.GetTipsContent("DanceGroup_ShopContribution");
                break;

            case ItemNumerical_Type.VipValue:
                strPic  = VIPVALUE_SPRITE_NAME;
                strName = SystemTips.GetTipsContent("Quest_VipValue");
                break;

            case ItemNumerical_Type.Intimacy:
                strPic  = INTIMACY_SPRITE_NAME;
                strName = SystemTips.GetTipsContent("Quest_Intimacy");
                break;

            default:
                return(null);
            }

            CItemInfo itemInfo = new CItemInfo();

            itemInfo.m_strIcon   = strPic;
            itemInfo.m_strName   = strName;
            itemInfo.m_anType[0] = (byte)ItemClass_Type.ItemClassType_Numerical;
            itemInfo.m_anType[1] = (byte)numType;

            return(itemInfo);
        }
Пример #2
0
 public CItemInfo GetByNumType(ItemNumerical_Type numType)
 {
     if (s_ItemInfoMap_Numerical != null && s_ItemInfoMap_Numerical.Contains(numType))
     {
         return((CItemInfo)s_ItemInfoMap_Numerical[numType]);
     }
     else
     {
         return(null);
     }
 }
Пример #3
0
        private Dictionary <byte, uint> m_dicEffectStoneInfo = new Dictionary <byte, uint>();           // 光效石属性

        /// <summary>
        /// 初始化数值类道具虚拟数据;
        /// </summary>
        public CItemInfoManager()
        {
            for (int i = (int)ItemNumerical_Type.None; i < (int)ItemNumerical_Type.Max; i++)
            {
                ItemNumerical_Type eKey   = (ItemNumerical_Type)i;
                CItemInfo          gtItem = CreateNumericalItemInfo(eKey);
                if (gtItem != null)
                {
                    s_ItemInfoMap_Numerical.Add(eKey, gtItem);
                }
            }
        }