123456789101112131415161718192021222324252627282930313233 |
- 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 int Count { get; private set; }
- public void Init(int id, int count)
- {
- _table = ItemTableRepo.Get(id);
- Count = count;
- if(_table == null)
- {
- Log.Error($"道具表不存在,id:{id}");
- }
- }
- }
- }
|