130 lines
2.3 KiB
Java
130 lines
2.3 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="SpiritAnimal")
|
|
public class SSpiritAnimal implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private String name;
|
|
|
|
private int piecesId;
|
|
|
|
private int piecesCount;
|
|
|
|
private int quality;
|
|
|
|
private int maxStar;
|
|
|
|
private int canChange;
|
|
|
|
private float hp;
|
|
|
|
private float attack;
|
|
|
|
private float physicalDefence;
|
|
|
|
private float magicDefence;
|
|
|
|
private int[][] skillArray;
|
|
|
|
private int[] coinReturn;
|
|
|
|
private int[] piecesCoinReturn;
|
|
|
|
private int maxLevel;
|
|
|
|
private int inVersion;
|
|
|
|
private int[] returnCost;
|
|
|
|
public static Map<Integer,SSpiritAnimal> pieceConfig;
|
|
public static Map<Integer,SSpiritAnimal> mapConfig;
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
Map<Integer, SSpiritAnimal> config = STableManager.getConfig(SSpiritAnimal.class);
|
|
Map<Integer,SSpiritAnimal> pieceConfigTemp = new HashMap<>();
|
|
Map<Integer,SSpiritAnimal> tempMap = new HashMap<>();
|
|
for(Map.Entry<Integer,SSpiritAnimal> entry :config.entrySet()){
|
|
pieceConfigTemp.put(entry.getValue().getPiecesId(),entry.getValue());
|
|
tempMap.put(entry.getKey(),entry.getValue());
|
|
}
|
|
pieceConfig = pieceConfigTemp;
|
|
mapConfig = tempMap;
|
|
}
|
|
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getPiecesId() {
|
|
return piecesId;
|
|
}
|
|
|
|
public int getPiecesCount() {
|
|
return piecesCount;
|
|
}
|
|
|
|
public int getQuality() {
|
|
return quality;
|
|
}
|
|
|
|
public int getMaxStar() {
|
|
return maxStar;
|
|
}
|
|
|
|
public int getCanChange() {
|
|
return canChange;
|
|
}
|
|
|
|
public float getHp() {
|
|
return hp;
|
|
}
|
|
|
|
public float getAttack() {
|
|
return attack;
|
|
}
|
|
|
|
public float getPhysicalDefence() {
|
|
return physicalDefence;
|
|
}
|
|
|
|
public float getMagicDefence() {
|
|
return magicDefence;
|
|
}
|
|
|
|
public int[][] getSkillArray() {
|
|
return skillArray;
|
|
}
|
|
|
|
public int[] getCoinReturn() {
|
|
return coinReturn;
|
|
}
|
|
|
|
public int[] getPiecesCoinReturn() {
|
|
return piecesCoinReturn;
|
|
}
|
|
|
|
public int getMaxLevel() {
|
|
return maxLevel;
|
|
}
|
|
|
|
public int getInVersion() {
|
|
return inVersion;
|
|
}
|
|
|
|
public int[] getReturnCost() {
|
|
return returnCost;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
} |