Пример #1
0
 public override void Read(ByteArray by)
 {
     base.Read(by);
     client_event = (eClientEvent)by.ReadUShort();
     action       = (eClientEventAction)by.ReadUShort();
     desc         = by.ReadString();
 }
Пример #2
0
        /// <summary>
        /// 消耗物品
        /// </summary>
        /// <param name="info"></param>
        public void Consume(PropID item_id, eClientEventAction action = eClientEventAction.Unknow)
        {
            switch (item_id.type)
            {
            case ePropType.ITEM:
                ConsumeItem(item_id.obj_type, item_id.obj_value);
                break;

            case ePropType.CURRENCY:
                ConsumeCurrency((eCurrencyType)item_id.obj_type, item_id.obj_value);
                break;
            }
        }
Пример #3
0
        /// <summary>
        /// 消耗物品
        /// </summary>
        /// <param name="info"></param>
        public void Consume(ItemID item_id, eClientEventAction action = eClientEventAction.Unknow)
        {
            switch (item_id.type)
            {
            case eMainItemType.Item:
                ConsumeItem(item_id.obj_type, item_id.obj_value);
                break;

            case eMainItemType.Currency:
                ConsumeCurrency((eCurrencyType)item_id.obj_type, item_id.obj_value);
                break;
            }
        }