miduo_server/tablemanager/src/main/java/config/SHeroSkin.java

93 lines
1.5 KiB
Java
Raw Normal View History

2020-10-31 09:58:34 +08:00
package config;
import manager.STableManager;
import manager.Table;
import java.util.HashMap;
import java.util.Map;
@Table(name ="HeroSkin")
public class SHeroSkin implements BaseConfig {
private int id;
private int type;
private int heroId;
private String readingName;
private int[][] unlockProperty;
private int[][] monomerProperty;
private int time;
private int isDefault;
private int order;
private int[] price;
public static Map<Integer,SHeroSkin> skinMapByType;
@Override
public void init() throws Exception {
Map<Integer, SHeroSkin> config = STableManager.getConfig(SHeroSkin.class);
Map<Integer,SHeroSkin> skinMapByTypeTemp = new HashMap<>();
for(Map.Entry<Integer,SHeroSkin> entry:config.entrySet()){
skinMapByTypeTemp.put(entry.getValue().getType(),entry.getValue());
}
skinMapByType =skinMapByTypeTemp;
}
public int getId() {
return id;
}
public int getType() {
return type;
}
public int getHeroId() {
return heroId;
}
public String getReadingName() {
return readingName;
}
public int[][] getUnlockProperty() {
return unlockProperty;
}
public int[][] getMonomerProperty() {
return monomerProperty;
}
public int getTime() {
return time;
}
public int getIsDefault() {
return isDefault;
}
public int getOrder() {
return order;
}
public int[] getPrice() {
return price;
}
}