back_recharge
wangyuan 2019-04-16 10:26:03 +08:00
parent ae9a7bc1ee
commit b07a7f5673
1 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ import com.ljsd.jieling.handler.map.MapManager;
import com.ljsd.jieling.handler.map.TemporaryItems; import com.ljsd.jieling.handler.map.TemporaryItems;
import com.ljsd.jieling.logic.dao.*; import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.logic.dao.root.User; import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.item.ItemLogic; import com.ljsd.jieling.logic.fight.CombatLogic;
import com.ljsd.jieling.protocols.CommonProto; import com.ljsd.jieling.protocols.CommonProto;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -486,10 +486,11 @@ public class ItemUtil {
} }
} }
public static boolean checkCost(User user, Map<Integer, Integer> itemMap) { public static boolean checkCost(User user, Map<Integer, Integer> itemMap) throws Exception {
if (itemMap == null) { if (itemMap == null) {
return true; return true;
} }
CombatLogic.getInstance().calAdvenrureReward(user,true,0);
TemporaryItems temporaryItems = user.getMapManager().getTemporaryItems(); TemporaryItems temporaryItems = user.getMapManager().getTemporaryItems();
Map<Integer, Item> temporaryItemList = new HashMap<>(); Map<Integer, Item> temporaryItemList = new HashMap<>();
if (temporaryItems != null) { if (temporaryItems != null) {
@ -611,7 +612,7 @@ public class ItemUtil {
* @param costItems * @param costItems
* @return * @return
*/ */
public static boolean fightItemCost(User user,int[][] costItems) { public static boolean fightItemCost(User user,int[][] costItems) throws Exception {
Map<Integer, Integer> itemMap = new HashMap<>(); Map<Integer, Integer> itemMap = new HashMap<>();
selectCost(costItems,itemMap); selectCost(costItems,itemMap);
boolean result = checkCost(user, itemMap); boolean result = checkCost(user, itemMap);