点将台任务类型更新失败
parent
7d53e2c06e
commit
4fdf720e84
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue