2019-10-11 16:32:20 +08:00
|
|
|
package config;
|
2019-09-26 09:54:17 +08:00
|
|
|
|
2019-10-11 16:32:20 +08:00
|
|
|
import manager.STableManager;
|
|
|
|
import manager.Table;
|
2019-09-26 09:54:17 +08:00
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@Table(name ="TreasureSunlongTaskConfig")
|
|
|
|
public class STreasureSunlongTaskConfig implements BaseConfig {
|
|
|
|
|
|
|
|
private int id;
|
|
|
|
|
|
|
|
private int activityId;
|
|
|
|
|
|
|
|
private int type;
|
|
|
|
|
|
|
|
private int taskType;
|
|
|
|
|
|
|
|
private int[][] taskValue;
|
|
|
|
|
|
|
|
private int[][] integral;
|
|
|
|
|
|
|
|
private int weight;
|
|
|
|
|
|
|
|
public static Map<Integer,STreasureSunlongTaskConfig> treasureTaskConfig;
|
|
|
|
|
|
|
|
public static Map<Integer, List<Integer>> taskTypeMap;
|
2019-10-10 10:04:02 +08:00
|
|
|
|
|
|
|
public static Map<Integer,List<STreasureSunlongTaskConfig>> sTreasureTaskConfigListByTypeMapTmp;
|
2019-09-26 09:54:17 +08:00
|
|
|
@Override
|
|
|
|
public void init() throws Exception {
|
|
|
|
treasureTaskConfig = STableManager.getConfig(STreasureSunlongTaskConfig.class);
|
|
|
|
taskTypeMap = new HashMap<>();
|
2019-10-10 10:04:02 +08:00
|
|
|
sTreasureTaskConfigListByTypeMapTmp = new HashMap<>();
|
2019-09-26 09:54:17 +08:00
|
|
|
for(Map.Entry<Integer,STreasureSunlongTaskConfig> entry:treasureTaskConfig.entrySet()){
|
2019-10-10 10:04:02 +08:00
|
|
|
STreasureSunlongTaskConfig entryValue = entry.getValue();
|
2019-11-25 17:11:21 +08:00
|
|
|
taskTypeMap.computeIfAbsent(entryValue.getType(),v->new ArrayList<>()).add(entry.getKey());
|
|
|
|
sTreasureTaskConfigListByTypeMapTmp.computeIfAbsent(entryValue.getTaskType(),v->new ArrayList<>()).add(entryValue);
|
2019-09-26 09:54:17 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getActivityId() {
|
|
|
|
return activityId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getType() {
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getTaskType() {
|
|
|
|
return taskType;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int[][] getTaskValue() {
|
|
|
|
return taskValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int[][] getIntegral() {
|
|
|
|
return integral;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getWeight() {
|
|
|
|
return weight;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|