81 lines
2.0 KiB
Java
81 lines
2.0 KiB
Java
|
package config;
|
||
|
|
||
|
import manager.STableManager;
|
||
|
import manager.Table;
|
||
|
|
||
|
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;
|
||
|
|
||
|
public static Map<Integer,List<STreasureSunlongTaskConfig>> sTreasureTaskConfigListByTypeMapTmp;
|
||
|
@Override
|
||
|
public void init() throws Exception {
|
||
|
treasureTaskConfig = STableManager.getConfig(STreasureSunlongTaskConfig.class);
|
||
|
taskTypeMap = new HashMap<>();
|
||
|
sTreasureTaskConfigListByTypeMapTmp = new HashMap<>();
|
||
|
for(Map.Entry<Integer,STreasureSunlongTaskConfig> entry:treasureTaskConfig.entrySet()){
|
||
|
STreasureSunlongTaskConfig entryValue = entry.getValue();
|
||
|
if(!taskTypeMap.containsKey(entryValue.getType())){
|
||
|
taskTypeMap.put(entryValue.getType(),new ArrayList<>());
|
||
|
}
|
||
|
if(!sTreasureTaskConfigListByTypeMapTmp.containsKey(entryValue.getTaskType())){
|
||
|
sTreasureTaskConfigListByTypeMapTmp.put(entryValue.getTaskType(),new ArrayList<>());
|
||
|
}
|
||
|
sTreasureTaskConfigListByTypeMapTmp.get(entryValue.getTaskType()).add(entryValue);
|
||
|
taskTypeMap.get(entryValue.getType()).add(entry.getKey());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|