예제 #1
0
        /// <summary>
        /// 物品是否合法
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public static bool IsValidItem(ItemID item_id)
        {
            switch (item_id.type)
            {
            case eMainItemType.Currency:
                eCurrencyType sub_type = (eCurrencyType)item_id.obj_type;
                if (sub_type != eCurrencyType.Diamond && sub_type != eCurrencyType.Gold && sub_type != eCurrencyType.Silver)
                {
                    return(false);
                }

                break;

            case eMainItemType.Item:
                break;

            default: return(false);
            }
            return(true);
        }
예제 #2
0
        /// <summary>
        /// 物品是否合法
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public static bool IsValidProp(PropID item_id)
        {
            switch (item_id.type)
            {
            case ePropType.CURRENCY:
                eCurrencyType sub_type = (eCurrencyType)item_id.obj_type;
                if (sub_type != eCurrencyType.Diamond && sub_type != eCurrencyType.Gold && sub_type != eCurrencyType.Silver)
                {
                    return(false);
                }

                break;

            case ePropType.ITEM:

                break;

            default:
                break;
            }
            return(true);
        }
예제 #3
0
 /// <summary>
 /// 消耗货币
 /// </summary>
 public void ConsumeCurrency(eCurrencyType type, long value)
 {
 }