generated from root/miduo_server
增加礼物列表容错处理
parent
2a683bc8f3
commit
c03c7e525f
|
@ -127,7 +127,6 @@ public class Hero extends MongoBase implements Cloneable, Serializable {
|
|||
combatPlanMap = new HashMap<>(2);
|
||||
medalMap = new HashMap<>(4);
|
||||
this.adjustByPositionMap = hero.adjustByPositionMap;
|
||||
this.heroGiftEquipList = new HashSet<>(hero.getHeroGiftEquipList());
|
||||
}
|
||||
|
||||
public Hero(int uid, int heroTid, int initStar) {
|
||||
|
@ -661,6 +660,9 @@ public class Hero extends MongoBase implements Cloneable, Serializable {
|
|||
}
|
||||
|
||||
public void setHeroGiftEquipList(Set<Integer> heroGiftEquipList) {
|
||||
if(heroGiftEquipList == null){
|
||||
heroGiftEquipList = new HashSet<>();
|
||||
}
|
||||
this.heroGiftEquipList = heroGiftEquipList;
|
||||
updateString("heroGiftEquipList", heroGiftEquipList);
|
||||
}
|
||||
|
@ -671,6 +673,9 @@ public class Hero extends MongoBase implements Cloneable, Serializable {
|
|||
}
|
||||
|
||||
public Set<Integer> getHeroGiftEquipList() {
|
||||
if(this.heroGiftEquipList == null){
|
||||
this.heroGiftEquipList = new HashSet<>();
|
||||
}
|
||||
return heroGiftEquipList;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue