| | |
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// <param name="packType 背包类型"></param>
|
| | | /// <param name="itemId 物品ID"></param>
|
| | | /// <param name="needCount 需要数量"></param>
|
| | | /// <param name="needTips 是否需要提示"></param>
|
| | | /// <returns></returns>
|
| | | public static bool CheckItemCount(PackType packType, int itemId, int needCount, bool needTips)
|
| | | {
|
| | | if (needCount <= 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
|
| | | int haveCount = PackManager.Instance.GetItemCountByID(packType, itemId);
|
| | |
|
| | | bool isEnough = haveCount >= needCount;
|
| | |
|
| | | if (!isEnough && needTips)
|
| | | {
|
| | | var itemConfig = ItemConfig.Get(itemId);
|
| | |
|
| | | if (null != itemConfig)
|
| | | {
|
| | | // SysNotifyMgr.Instance.ShowTip();
|
| | | }
|
| | | }
|
| | |
|
| | | return isEnough;
|
| | | }
|
| | |
|
| | | public static bool CheckCurrencyCount()
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
|
| | | public event Action<string> GetBetterEquipEvent; //得到更好的装备 value 物品的实例ID
|
| | |
|
| | | // public void OnGetEquip(ItemModel item)
|