123456789101112131415161718192021222324252627282930313233343536 |
- using XGame;
- using XGame.Database;
- namespace FL.Data.Items
- {
- public class ItemBase : IItemBase
- {
- private ItemTable _table;
- public int TableId => _table?.Id ?? 0;
- public int ItemType => _table?.Type ?? 0;
- public EQualityLevel Quality => _table?.Quality ?? 0;
- public string Name => _table?.Name;
- public string Icon => _table?.Icon;
- public long Count { get; private set; }
- public bool IsGet { get; private set; }
- public void Init(int id, long count, bool isGet = false)
- {
- _table = ItemTableRepo.Get(id);
- Count = count;
- IsGet = isGet;
- if (_table == null)
- {
- Log.Error($"道具表不存在,id:{id}");
- }
- }
- }
- }
|