点将台任务类型更新失败

back_recharge
zhangshanxue 2020-06-10 17:50:10 +08:00
parent 7d53e2c06e
commit 4fdf720e84
1 changed files with 5 additions and 6 deletions

View File

@ -7,7 +7,7 @@ import com.ljsd.jieling.logic.mission.MissionType;
import java.util.Map;
/**
* Description:
* Description:
* Author: zsx
* CreateDate: 2020/6/1 14:13
*/
@ -17,7 +17,9 @@ public class RandomAllTypeTimes extends AbstractDataManager {
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
int type =(int)parm[0];
int count =(int)parm[1];
data.card_random_type.put(0,data.card_random_type.getOrDefault(0, 0)+count);
if(type == 1 || type == 4 ||type == 5){
data.card_random_type.put(0,data.card_random_type.getOrDefault(0, 0)+count);
}
return new CumulationData.Result(missionType);
}
@ -28,9 +30,6 @@ public class RandomAllTypeTimes extends AbstractDataManager {
@Override
public int getProcess(User user, CumulationData data, int[] missionSubType) {
double sum = data.card_random_type.entrySet().stream()
.filter(integerIntegerEntry -> integerIntegerEntry.getKey() == 1 || integerIntegerEntry.getKey() == 4 || integerIntegerEntry.getKey() == 5)
.mapToDouble(Map.Entry::getValue).sum();
return (int)sum;
return data.card_random_type.getOrDefault(0, 0);
}
}