山河社稷图
parent
79ffc31fa8
commit
3de5a18eb7
|
@ -0,0 +1,62 @@
|
|||
package com.ljsd.jieling.logic.hardStage;
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class HardStageChapter extends MongoBase {
|
||||
|
||||
private int chapterId;
|
||||
|
||||
private List<HardStageNode> nodeList = new ArrayList<>();
|
||||
|
||||
private int stars;
|
||||
|
||||
private Map<Integer,Boolean> rewardMap = new HashMap<>();
|
||||
|
||||
public int getChapterId() {
|
||||
return chapterId;
|
||||
}
|
||||
|
||||
public void setChapterId(int chapterId) {
|
||||
this.chapterId = chapterId;
|
||||
}
|
||||
|
||||
public List<HardStageNode> getNodeList() {
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
public void addNodeList(HardStageNode node) {
|
||||
this.nodeList.add(node);
|
||||
node.init(this.getRootId(), getMongoKey() + ".nodeList." + node.getId());
|
||||
updateString("nodeList." + node.getId(), node);
|
||||
}
|
||||
|
||||
public int getStars() {
|
||||
return stars;
|
||||
}
|
||||
|
||||
public void setStars(int stars) {
|
||||
this.stars = stars;
|
||||
}
|
||||
|
||||
public Map<Integer, Boolean> getRewardMap() {
|
||||
return rewardMap;
|
||||
}
|
||||
|
||||
public void setRewardMap(Map<Integer, Boolean> rewardMap) {
|
||||
this.rewardMap = rewardMap;
|
||||
}
|
||||
|
||||
public HardStageNode getNode(int id){
|
||||
for(HardStageNode node : nodeList){
|
||||
if(node.getId() == id){
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue