| | |
| | | public virtual void Init(ItemModel model, bool isCompare = false)
|
| | | {
|
| | | itemId = model.itemId;
|
| | | InitUI(model.guid, model.itemId, (ulong)model.count, model.isAuction, model.packType, isCompare, model.useDataDict);
|
| | | InitUI(model.guid, model.itemId, model.count, model.isAuction, model.packType, isCompare, model.useDataDict);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | InitUI(model.guid, model.itemId, model.count, false, model.packType, model.isCompare, model.useDataDic);
|
| | | }
|
| | |
|
| | | private void InitUI(string guid, int itemId, ulong count, bool isAuction, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic)
|
| | | private void InitUI(string guid, int itemId, long count, bool isAuction, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic)
|
| | | {
|
| | | var config = ItemConfig.Get(itemId);
|
| | | if (config == null) return;
|
| | |
| | | {
|
| | | public string guid { get; private set; }
|
| | | public int itemId { get; private set; }
|
| | | public ulong count { get; private set; }
|
| | | public long count { get; private set; }
|
| | | public int score { get; private set; }
|
| | | public bool isCompare { get; private set; }
|
| | | public ItemConfig itemConfig { get { return ItemConfig.Get(itemId); } }
|
| | |
| | | public Dictionary<int, List<int>> useDataDic { get; private set; }
|
| | |
|
| | |
|
| | | public ItemCellModel(int itemId, bool isPreview = false, ulong count = 0, string guid = "", PackType type = PackType.Deleted, bool isCompare = false, Dictionary<int, List<int>> useDataDic = null)
|
| | | public ItemCellModel(int itemId, bool isPreview = false, long count = 0, string guid = "", PackType type = PackType.Deleted, bool isCompare = false, Dictionary<int, List<int>> useDataDic = null)
|
| | | {
|
| | | this.itemId = AdjustItemId(itemId);
|
| | | this.guid = guid;
|
| | |
| | | this.score = 0;
|
| | | }
|
| | |
|
| | | public ItemCellModel(int itemId, bool isPreview, ulong count)
|
| | | public ItemCellModel(int itemId, bool isPreview, long count)
|
| | | {
|
| | | this.itemId = AdjustItemId(itemId);
|
| | | this.guid = "";
|