灵兽问题
parent
35289f9038
commit
d6236ba26e
|
@ -91,7 +91,7 @@ public class ItemUtil {
|
||||||
private static void maptoAddWithOutItem(User user, ItemMap itemObj, CommonProto.Drop.Builder dropBuilder,int reason) throws Exception {
|
private static void maptoAddWithOutItem(User user, ItemMap itemObj, CommonProto.Drop.Builder dropBuilder,int reason) throws Exception {
|
||||||
addCard(user, itemObj.getCardMap(), dropBuilder,reason);
|
addCard(user, itemObj.getCardMap(), dropBuilder,reason);
|
||||||
addEquip(user, itemObj.getEquipMap(), dropBuilder,reason);
|
addEquip(user, itemObj.getEquipMap(), dropBuilder,reason);
|
||||||
// addSpecialMonster(user,itemObj,dropBuilder,reason);
|
addSpecialMonster(user,itemObj,dropBuilder,reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -178,7 +178,6 @@ public class ItemUtil {
|
||||||
ItemMap itemObj = new ItemMap();
|
ItemMap itemObj = new ItemMap();
|
||||||
|
|
||||||
selectLongItemArr(itemArr,itemObj);
|
selectLongItemArr(itemArr,itemObj);
|
||||||
// useRandomItem(user,randomMap,reason);
|
|
||||||
int ints = addItemByMail(user, itemObj.getItemMap(), dropBuilder, reason);
|
int ints = addItemByMail(user, itemObj.getItemMap(), dropBuilder, reason);
|
||||||
maptoAddWithOutItem(user,itemObj,dropBuilder,reason);
|
maptoAddWithOutItem(user,itemObj,dropBuilder,reason);
|
||||||
return ints;
|
return ints;
|
||||||
|
@ -1595,10 +1594,7 @@ public class ItemUtil {
|
||||||
}
|
}
|
||||||
Item item = user.getItemManager().getItem(key);
|
Item item = user.getItemManager().getItem(key);
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
if(value==0){
|
return value == 0;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
LOGGER.info("checkCost uid=>{} use negative item itemId=>{} count=>{}", user.getId(), key, value);
|
LOGGER.info("checkCost uid=>{} use negative item itemId=>{} count=>{}", user.getId(), key, value);
|
||||||
|
@ -1650,12 +1646,8 @@ public class ItemUtil {
|
||||||
int itemNum = costItem[1]*times;
|
int itemNum = costItem[1]*times;
|
||||||
SItem sItem = SItem.getsItemMap().get(itemId);
|
SItem sItem = SItem.getsItemMap().get(itemId);
|
||||||
int itemType = getItemType(sItem);
|
int itemType = getItemType(sItem);
|
||||||
switch (itemType) {
|
if (itemType == GlobalItemType.ITEM) {
|
||||||
case GlobalItemType.ITEM:
|
putCountMap(itemId, itemNum, itemMap);
|
||||||
putCountMap(itemId,itemNum,itemMap);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1762,11 +1754,7 @@ public class ItemUtil {
|
||||||
public static boolean fightItemCost(User user,int[][] costItems) throws Exception {
|
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);
|
return checkCost(user, itemMap);
|
||||||
if (!result) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1811,7 +1799,7 @@ public class ItemUtil {
|
||||||
* @param itemArr
|
* @param itemArr
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static int checkCardAndEquipLimit( User user ,long[][] itemArr) {
|
public static int checkCardAndEquipLimit(User user ,long[][] itemArr) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
||||||
|
|
Loading…
Reference in New Issue