道具数量改long

jiahuiwen 2021-11-22 14:23:18 +08:00
parent ad0654545b
commit 1c28ff4797
3 changed files with 6 additions and 6 deletions

View File

@ -142,7 +142,7 @@ public class CumulationData {
public int ten_challenge_time;// 挑战十绝阵num次
// public Map<Integer,Integer> finisin_daily_challenge_times;//完成type0不限、1金币、2武将经验、3武将碎片、4兵魂、5谋略的日常副本num次
public Map<Integer,Integer> expedition_floor_times= new HashMap<>();//猎妖之路通过floor层num次
public Map<Integer,Integer> itemUse = new HashMap<>(); //货币道具消耗
public Map<Integer,Long> itemUse = new HashMap<>(); //货币道具消耗
public int decompose_times;//献祭武将次数

View File

@ -3184,7 +3184,7 @@ public class HeroLogic {
// float mdScore = sPropertyConfigMagicDefence.getScore();
//
// float xishu = 10000;
float finalHp = heroAllAttribute.getOrDefault(HeroAttributeEnum.Hp.getPropertyId(), 0L).floatValue();
// float finalHp = heroAllAttribute.getOrDefault(HeroAttributeEnum.Hp.getPropertyId(), 0L).floatValue();
// // 面板攻击
// float finalAttack = heroAllAttribute.getOrDefault(HeroAttributeEnum.Attack.getPropertyId(), 0L).floatValue();
// // 面板护甲

View File

@ -17,8 +17,8 @@ public class ItemUseDataManager extends AbstractDataManager {
if(parm.length==1&&parm[0] instanceof Map){
((Map)parm[0]).forEach((o, o2) -> {
int type =(int)o;
int count =(int)o2;
data.itemUse.merge(type,count,Integer::sum);
long count =(Long)o2;
data.itemUse.merge(type,count,Long::sum);
});
}
return new CumulationData.Result(missionType);
@ -26,12 +26,12 @@ public class ItemUseDataManager extends AbstractDataManager {
@Override
public boolean isFinish(User user, CumulationData data, int[][] cfgValue, Object... parm) {
Integer orDefault = data.itemUse.getOrDefault(cfgValue[0][0], 0);
Integer orDefault = data.itemUse.getOrDefault(cfgValue[0][0], 0L).intValue();
return orDefault>=cfgValue[1][0];
}
@Override
public int getProcess(User user, CumulationData data, int[] missionSubType) {
return data.itemUse.getOrDefault(missionSubType[0], 0);
return data.itemUse.getOrDefault(missionSubType[0], 0L).intValue();
}
}