125 【战斗】战斗系统 新增两个实用函数 以及修改原来战锤使用错 判断物品数量函数的问题
| | |
| | | //FightPoint 用于记录消耗战锤倍数,小于等于1时默认1倍,大于1时为对应消耗倍值,0418刷新类型22 |
| | | ulong costRate = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.FightPoint); |
| | | |
| | | int cost = (int)(costRate > 1 ? costRate : 1) * 1; // 1是默认消耗 |
| | | |
| | | ulong cost = (costRate > 1 ? costRate : 1) * 1; // 1是默认消耗 |
| | | |
| | | // 检查一下锤子的消耗 |
| | | if (!ItemLogicUtility.CheckItemCount(PackType.Item, BattleConst.BattlePointItemID, cost, true)) |
| | | if (!ItemLogicUtility.CheckCurrencyCount(41, cost, true)) |
| | | { |
| | | return; |
| | | } |
| | |
| | |
|
| | | if (null != itemConfig)
|
| | | {
|
| | | // 是否有获取途径
|
| | | // 是 弹出获取途径
|
| | | // 否 显示物品数量不足
|
| | | // SysNotifyMgr.Instance.ShowTip();
|
| | | }
|
| | | }
|
| | |
| | | return isEnough;
|
| | | }
|
| | |
|
| | | public static bool CheckCurrencyCount()
|
| | | public static bool CheckCurrencyCount(int moneyType, ulong needCount, bool needTips)
|
| | | {
|
| | | return true;
|
| | | if (needCount <= 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
|
| | | ulong haveCount = UIHelper.GetMoneyCnt(moneyType);
|
| | |
|
| | | bool isEnough = haveCount >= needCount;
|
| | |
|
| | | if (!isEnough && needTips)
|
| | | {
|
| | | // 是否有获取途径
|
| | | // 是 弹出获取途径
|
| | | // 否 显示物品数量不足
|
| | | // SysNotifyMgr.Instance.ShowTip();
|
| | | }
|
| | |
|
| | | return isEnough;
|
| | | }
|
| | |
|
| | | public event Action<string> GetBetterEquipEvent; //得到更好的装备 value 物品的实例ID
|