代码优化

back_recharge
lvxinran 2020-10-23 14:11:02 +08:00
parent 64fcc5a485
commit 3cece5a571
1 changed files with 1 additions and 3 deletions

View File

@ -624,9 +624,7 @@ public class MapManager extends MongoBase {
return monsterTempSkill;
}
public void updateMonsterTempSkill(int monsterGroupId,int skillId,int count){
if(monsterTempSkill.get(monsterGroupId)==null){
monsterTempSkill.put(monsterGroupId,new HashMap<>());
}
monsterTempSkill.computeIfAbsent(monsterGroupId, k -> new HashMap<>());
monsterTempSkill.get(monsterGroupId).put(skillId,count);
updateString("monsterTempSkill." + monsterGroupId +"." + skillId, count);
}